Skip to main content

device_actions

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

Overview​

Namedevice_actions
TypeResource
Idovh.over_the_box.device_actions

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringThe name of the action
action_idstringThe id of the action (wire: actionId)
created_atstring (date-time)Date of creation of the action (wire: createdAt)
detailsstringThe details of the action
statusstringThe status of the action (doing, done, error, todo)
todo_datestring (date-time)Date of execution of the action (wire: todoDate)
updated_atstring (date-time)Last time the action was updated (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaction_id, service_nameGet an action of an OverTheBox device. Returns the name, status, details and the creation, update and execution dates of an action of the device.
listselectservice_namename, status, x_pagination_modeList the actions of an OverTheBox device. Returns the IDs of the actions scheduled on the device, which can be filtered by status and name.
createinsertservice_name, nameCreate an action on an OverTheBox device. Schedules one of the available device actions, given by its name, and returns the created action.

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
action_idstringThe id of the action (wire: actionId)
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)
namestringFilter the value of name property (=)
statusstringFilter the value of status property (=)
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 action of an OverTheBox device. Returns the name, status, details and the creation, update and execution dates of an action of the device.

SELECT
name,
action_id,
created_at,
details,
status,
todo_date,
updated_at
FROM ovh.over_the_box.device_actions
WHERE action_id = '{{ action_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create an action on an OverTheBox device. Schedules one of the available device actions, given by its name, and returns the created action.

INSERT INTO ovh.over_the_box.device_actions (
name,
service_name
)
SELECT
'{{ name }}' /* required */,
'{{ service_name }}'
RETURNING
name,
action_id,
created_at,
details,
status,
todo_date,
updated_at
;