Skip to main content

device_hardware

Creates, updates, deletes, gets or lists a device_hardware resource.

Overview​

Namedevice_hardware
TypeResource
Idovh.over_the_box.device_hardware

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringHardware name
pretty_model_namestringThe hardware pretty model name (wire: prettyModelName)
can_be_linked_to_servicebooleanTrue if hardware can be linked to a service without deviceID (wire: canBeLinkedToService)
macstring (mac-address)Hardware MAC address (example: 00:00:5e:00:53:01)
modelstringHardware model
serialstringHardware serial

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameGet 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.

NameDatatypeDescription
api_hoststringThe 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_namestringThe internal name of your overTheBox offer (wire: serviceName)

SELECT examples​

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
;