device_hardware
Creates, updates, deletes, gets or lists a device_hardware resource.
Overview​
| Name | device_hardware |
| Type | Resource |
| Id | ovh.over_the_box.device_hardware |
Fields​
The following fields are returned by SELECT queries:
- get
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) |
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 | service_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. |
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"}}) |
service_name | string | The internal name of your overTheBox offer (wire: serviceName) |
SELECT examples​
- get
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,
mac,
model,
serial
FROM ovh.over_the_box.device_hardware
WHERE service_name = '{{ service_name }}' -- required
;