Skip to main content

tasks

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

Overview​

Nametasks
TypeResource
Idovh.ip.tasks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_idintegerthe id of the task (wire: taskId)
commentstringDetails of this task
destinationobjectDestination for moveFloatingIp tasks
done_datestring (date-time)Completion date (wire: doneDate)
functionstringFunction name (arinBlockReassign, changeRipeOrg, checkAndReleaseIp, genericMoveFloatingIp, supernetByoipFailoverPartitioning)
last_updatestring (date-time)last update (wire: lastUpdate)
start_datestring (date-time)Task Creation date (wire: startDate)
statusstringTask status (cancelled, customerError, doing, done, init, ovhError, todo)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip, task_idGet a task. Returns the task's function, status, details, and its start, last update and completion dates.
listselectipfunction, status, x_pagination_modeList tasks. Returns the IDs of the block's asynchronous operations, filterable by function or status.

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"}})
ipstring (ip-block)
task_idintegerthe id of the task (wire: taskId)
functionstringFilter the value of function 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 a task. Returns the task's function, status, details, and its start, last update and completion dates.

SELECT
task_id,
comment,
destination,
done_date,
function,
last_update,
start_date,
status
FROM ovh.ip.tasks
WHERE ip = '{{ ip }}' -- required
AND task_id = '{{ task_id }}' -- required
;