tasks
Creates, updates, deletes, gets or lists a tasks resource.
Overview​
| Name | tasks |
| Type | Resource |
| Id | ovh.hosting_private_database.tasks |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | The id of the task |
dump_id | integer | DumpId on which the task is working (wire: dumpId) |
database_name | string | Database name on which the task is working (wire: databaseName) |
user_name | string | User name on which the task is working (wire: userName) |
done_date | string (date-time) | Completion date (wire: doneDate) |
function | string | Function name (abuse, changeFtpPassword, changeRam, changeVersion, configuration/update, create, database/copy, database/copyRestore, database/create, database/delete, database/dump, database/dump/delete, database/extension/create, database/extension/delete, database/import, database/restore, database/wizard, delete, grant/create, grant/delete, grant/update, install, overquota/in, overquota/out, quotaRefresh, refresh, reopen, restart, start, stop, suspend, user/changePassword, user/create, user/delete, webhostingNetwork/disable, webhostingNetwork/enable, whitelist/create, whitelist/delete, whitelist/update) |
last_update | string (date-time) | Last update (wire: lastUpdate) |
start_date | string (date-time) | Task creation date (wire: startDate) |
status | string | Task status (cancelled, doing, done, error, todo) |
Web Cloud Database task
| Name | Datatype | Description |
|---|---|---|
id | integer | The id of the task |
dump_id | integer | DumpId on which the task is working (wire: dumpId) |
database_name | string | Database name on which the task is working (wire: databaseName) |
user_name | string | User name on which the task is working (wire: userName) |
done_date | string (date-time) | Completion date (wire: doneDate) |
function | string | Function name (abuse, changeFtpPassword, changeRam, changeVersion, configuration/update, create, database/copy, database/copyRestore, database/create, database/delete, database/dump, database/dump/delete, database/extension/create, database/extension/delete, database/import, database/restore, database/wizard, delete, grant/create, grant/delete, grant/update, install, overquota/in, overquota/out, quotaRefresh, refresh, reopen, restart, start, stop, suspend, user/changePassword, user/create, user/delete, webhostingNetwork/disable, webhostingNetwork/enable, whitelist/create, whitelist/delete, whitelist/update) |
last_update | string (date-time) | Last update (wire: lastUpdate) |
start_date | string (date-time) | Task creation date (wire: startDate) |
status | string | Task status (cancelled, doing, done, error, todo) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Returns the function, status and dates of the task, and the database, user or dump it works on. | |
list | select | service_name | function, status, x_pagination_mode | Returns the IDs of the tasks of the service. |
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 |
|---|---|---|
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"}}) |
id | integer | Id |
service_name | string | Service name (wire: serviceName) |
function | string | Filter the value of function 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
Returns the function, status and dates of the task, and the database, user or dump it works on.
SELECT
id,
dump_id,
database_name,
user_name,
done_date,
function,
last_update,
start_date,
status
FROM ovh.hosting_private_database.tasks
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Returns the IDs of the tasks of the service.
SELECT
id,
dump_id,
database_name,
user_name,
done_date,
function,
last_update,
start_date,
status
FROM ovh.hosting_private_database.tasks
WHERE service_name = '{{ service_name }}' -- required
AND function = '{{ function }}'
AND status = '{{ status }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;