Skip to main content

tasks

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

Overview​

Nametasks
TypeResource
Idovh.dedicated_housing.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
done_datestring (date-time)Completion date (wire: doneDate)
functionstringFunction name (applyBackupFtpAcls, applyBackupFtpQuota, changePasswordBackupFTP, createBackupFTP, migrateBackupFTP, removeBackupFTP)
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
getselectservice_name, task_idGet this object properties
listselectservice_namefunction, status, x_pagination_modeView task list
cancelexecserviceName, taskIdthis action stop the task progression if it's possible

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"}})
serviceNamestringThe internal name of your Housing bay
service_namestringThe internal name of your Housing bay (wire: serviceName)
taskIdintegerthe id of the task
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 this object properties

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

Lifecycle Methods​

EXEC variables use wire (API) names.

this action stop the task progression if it's possible

EXEC ovh.dedicated_housing.tasks.cancel
@serviceName='{{ serviceName }}' --required,
@taskId='{{ taskId }}' --required
;