Skip to main content

hardware

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

Overview​

Namehardware
TypeResource
Idovh.over_the_box.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)
iamobjectIAM resource metadata
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
getselecthardware_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.
listselectiam_tags, x_pagination_modeList 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.

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"}})
hardware_namestringThe internal name of your hardware (wire: hardwareName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

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,
iam,
mac,
model,
serial
FROM ovh.over_the_box.hardware
WHERE hardware_name = '{{ hardware_name }}' -- required
;