operations
Creates, updates, deletes, gets or lists an operations resource.
Overview​
| Name | operations |
| Type | Resource |
| Id | ovh.cloud.operations |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID to describe the operation |
resource_id | string | Affected resource of the operation (wire: resourceId) |
action | string | The action of the operation |
completed_at | string (date-time) | The completed date of the operation (wire: completedAt) |
created_at | string (date-time) | The creation date of the operation (wire: createdAt) |
progress | integer | The progression in percentage of the operation |
regions | array | Affected regions of the operation |
started_at | string (date-time) | The started date of the operation (wire: startedAt) |
status | string | Operation status (canceled, completed, created, in-error, in-progress, unknown) |
sub_operations | array | Sub-operations of the operation (wire: subOperations) |
An operation is an async process on your Project
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID to describe the operation |
resource_id | string | Affected resource of the operation (wire: resourceId) |
action | string | The action of the operation |
completed_at | string (date-time) | The completed date of the operation (wire: completedAt) |
created_at | string (date-time) | The creation date of the operation (wire: createdAt) |
progress | integer | The progression in percentage of the operation |
regions | array | Affected regions of the operation |
started_at | string (date-time) | The started date of the operation (wire: startedAt) |
status | string | Operation status (canceled, completed, created, in-error, in-progress, unknown) |
sub_operations | array | Sub-operations of the operation (wire: subOperations) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | operation_id, service_name | Get information about one operation (Beta version) | |
list | select | service_name | instance_id | List your operations (Beta version) |
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"}}) |
operation_id | string | Operation ID (wire: operationId) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
instance_id | string | Instance ID used to filter operations (wire: instanceId) |
SELECT examples​
- get
- list
Get information about one operation (Beta version)
SELECT
id,
resource_id,
action,
completed_at,
created_at,
progress,
regions,
started_at,
status,
sub_operations
FROM ovh.cloud.operations
WHERE operation_id = '{{ operation_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
List your operations (Beta version)
SELECT
id,
resource_id,
action,
completed_at,
created_at,
progress,
regions,
started_at,
status,
sub_operations
FROM ovh.cloud.operations
WHERE service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND instance_id = '{{ instance_id }}'
;