Skip to main content

zone_tasks

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

Overview​

Namezone_tasks
TypeResource
Idovh.domain.zone_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)
done_datestring (date-time)Done date of the task (wire: doneDate)
functionstringFunction of the task (DnsAnycastActivate, DnsAnycastDeactivate, DnssecDisable, DnssecEnable, DnssecResigning, DnssecRollKsk, DnssecRollZsk, ZoneCheck, ZoneCreate, ZoneCut, ZoneDelete, ZoneImport, ZoneRefresh, ZoneRestore)
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)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, zone_nameReturns a task: function, status, dates, and whether it can be accelerated, canceled or relaunched.
listselectzone_namefunction, status, x_pagination_modeReturns the identifiers of the zone tasks. Can be filtered by function and status.
accelerateexecid, zoneNameAccelerates a task. Only possible when canAccelerate is true on the task.
cancelexecid, zoneNameCancels a task. Only possible when canCancel is true on the task.
relaunchexecid, zoneNameRelaunches a task. Only possible when canRelaunch is true on 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
zoneNamestringZone name
zone_namestringZone name (wire: zoneName)
functionstring
statusstring
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​

Returns a task: function, status, dates, and whether it can be accelerated, canceled or relaunched.

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

Lifecycle Methods​

EXEC variables use wire (API) names.

Accelerates a task. Only possible when canAccelerate is true on the task.

EXEC ovh.domain.zone_tasks.accelerate
@id='{{ id }}' --required,
@zoneName='{{ zoneName }}' --required
;