device_actions
Creates, updates, deletes, gets or lists a device_actions resource.
Overview​
| Name | device_actions |
| Type | Resource |
| Id | ovh.over_the_box.device_actions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the action |
action_id | string | The id of the action (wire: actionId) |
created_at | string (date-time) | Date of creation of the action (wire: createdAt) |
details | string | The details of the action |
status | string | The status of the action (doing, done, error, todo) |
todo_date | string (date-time) | Date of execution of the action (wire: todoDate) |
updated_at | string (date-time) | Last time the action was updated (wire: updatedAt) |
Device action
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the action |
action_id | string | The id of the action (wire: actionId) |
created_at | string (date-time) | Date of creation of the action (wire: createdAt) |
details | string | The details of the action |
status | string | The status of the action (doing, done, error, todo) |
todo_date | string (date-time) | Date of execution of the action (wire: todoDate) |
updated_at | string (date-time) | Last time the action was updated (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | action_id, service_name | 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. | |
list | select | service_name | name, status, x_pagination_mode | List the actions of an OverTheBox device. Returns the IDs of the actions scheduled on the device, which can be filtered by status and name. |
create | insert | service_name, name | Create 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.
| Name | Datatype | Description |
|---|---|---|
action_id | string | The id of the action (wire: actionId) |
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) |
name | string | Filter the value of name property (=) |
status | string | Filter the value of status property (=) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
List the actions of an OverTheBox device. Returns the IDs of the actions scheduled on the device, which can be filtered by status and name.
SELECT
name,
action_id,
created_at,
details,
status,
todo_date,
updated_at
FROM ovh.over_the_box.device_actions
WHERE service_name = '{{ service_name }}' -- required
AND name = '{{ name }}'
AND status = '{{ status }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: device_actions
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the device_actions resource.
- name: name
value: "{{ name }}"
description: |
Name of the action