Skip to main content

devices

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

Overview​

Namedevices
TypeResource
Idovh.over_the_box.devices

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
device_idstringThe id of the device (wire: deviceId)
activatedbooleanWhether or not this device is associated to a service
available_updatebooleanWhether or not an upate is available for this device (wire: availableUpdate)
last_seenstring (date-time)Last time the device has been seen on the provisionning servers (wire: lastSeen)
network_interfacesarrayNetwork interfaces of the device (wire: networkInterfaces)
public_ipstring (ipv4)The public IP of the device (example: 192.0.2.0) (wire: publicIp)
systemobjectDevice system information
system_versionstringSystem version of the device (wire: systemVersion)
versionstringVersion of the device

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameGet the device of an OverTheBox service. Returns the device ID, version, system information, public IP, network interfaces, last seen date and whether an update is available.
deletedeleteservice_nameUnlink the device of an OverTheBox service. Removes the association between the device and the service. Link another device with linkDevice.
backupexecserviceNameBack up an OverTheBox device. Creates the device action that generates a configuration backup of the device, and returns that action.
logsexecserviceNameGenerate a temporary URL for the device logs. Returns a temporary URL to download the logs of the OverTheBox device, with its expiration date.
restore_backupexecserviceName, backupIdRestore a backup on an OverTheBox device. Creates the group of device actions that restore the given backup on the device, and returns them.

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"}})
serviceNamestringThe internal name of your overTheBox offer
service_namestringThe internal name of your overTheBox offer (wire: serviceName)

SELECT examples​

Get the device of an OverTheBox service. Returns the device ID, version, system information, public IP, network interfaces, last seen date and whether an update is available.

SELECT
device_id,
activated,
available_update,
last_seen,
network_interfaces,
public_ip,
system,
system_version,
version
FROM ovh.over_the_box.devices
WHERE service_name = '{{ service_name }}' -- required
;

DELETE examples​

Unlink the device of an OverTheBox service. Removes the association between the device and the service. Link another device with linkDevice.

DELETE FROM ovh.over_the_box.devices
WHERE service_name = '{{ service_name }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Back up an OverTheBox device. Creates the device action that generates a configuration backup of the device, and returns that action.

EXEC ovh.over_the_box.devices.backup
@serviceName='{{ serviceName }}' --required
;