hardware
Creates, updates, deletes, gets or lists a hardware resource.
Overview​
| Name | hardware |
| Type | Resource |
| Id | ovh.over_the_box.hardware |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Hardware name |
pretty_model_name | string | The hardware pretty model name (wire: prettyModelName) |
can_be_linked_to_service | boolean | True if hardware can be linked to a service without deviceID (wire: canBeLinkedToService) |
iam | object | IAM resource metadata |
mac | string (mac-address) | Hardware MAC address (example: 00:00:5e:00:53:01) |
model | string | Hardware model |
serial | string | Hardware serial |
Hardware properties
| Name | Datatype | Description |
|---|---|---|
name | string | Hardware name |
pretty_model_name | string | The hardware pretty model name (wire: prettyModelName) |
can_be_linked_to_service | boolean | True if hardware can be linked to a service without deviceID (wire: canBeLinkedToService) |
iam | object | IAM resource metadata |
mac | string (mac-address) | Hardware MAC address (example: 00:00:5e:00:53:01) |
model | string | Hardware model |
serial | string | Hardware serial |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | hardware_name | Get an OverTheBox hardware. Returns the name, model, serial and MAC address of a hardware, and whether it can be linked to a service without a device ID. | |
list | select | iam_tags, x_pagination_mode | List OverTheBox hardware. Returns the names of the OverTheBox hardware of the account. Get a hardware for its model, serial and MAC address. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
hardware_name | string | The internal name of your hardware (wire: hardwareName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get an OverTheBox hardware. Returns the name, model, serial and MAC address of a hardware, and whether it can be linked to a service without a device ID.
SELECT
name,
pretty_model_name,
can_be_linked_to_service,
iam,
mac,
model,
serial
FROM ovh.over_the_box.hardware
WHERE hardware_name = '{{ hardware_name }}' -- required
;
List OverTheBox hardware. Returns the names of the OverTheBox hardware of the account. Get a hardware for its model, serial and MAC address.
SELECT
name,
pretty_model_name,
can_be_linked_to_service,
iam,
mac,
model,
serial
FROM ovh.over_the_box.hardware
WHERE iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;