Skip to main content

tasks

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

Overview​

Nametasks
TypeResource
Idovh.domain.tasks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerId of the task
can_acceleratebooleanCan accelerate the task (wire: canAccelerate)
can_cancelbooleanCan cancel the task (wire: canCancel)
can_relaunchbooleanCan relaunch the task (wire: canRelaunch)
commentstringComment about the task
creation_datestring (date-time)Creation date of the task (wire: creationDate)
domainstringDomain of the task
done_datestring (date-time)Done date of the task (wire: doneDate)
functionstringFunction of the task
last_updatestring (date-time)Last update date of the task (wire: lastUpdate)
statusstringStatus of the task (cancelled, doing, done, error, problem, todo)
todo_datestring (date-time)Todo date of the task (wire: todoDate)
typestringtype of the task (alldom, domain)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameGet details about a domain task
listselectservice_namefunction, status, type, x_pagination_modeList all domain tasks
accelerateexecid, serviceNameAccelerate the task
cancelexecid, serviceNameCancel the task
relaunchexecid, serviceNameRelaunch the task

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"}})
idintegerId
serviceNamestringService name
service_namestringService name (wire: serviceName)
functionstringFilter the value of function property (like)
statusstringFilter the value of status property (=)
typestringFilter the value of type 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 details about a domain task

SELECT
id,
can_accelerate,
can_cancel,
can_relaunch,
comment,
creation_date,
domain,
done_date,
function,
last_update,
status,
todo_date,
type
FROM ovh.domain.tasks
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Accelerate the task

EXEC ovh.domain.tasks.accelerate
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
;