Skip to main content

operations

Creates, updates, deletes, gets or lists an operations resource.

Overview​

Nameoperations
TypeResource
Idovh.cloud.operations

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringUnique ID to describe the operation
resource_idstringAffected resource of the operation (wire: resourceId)
actionstringThe action of the operation
completed_atstring (date-time)The completed date of the operation (wire: completedAt)
created_atstring (date-time)The creation date of the operation (wire: createdAt)
progressintegerThe progression in percentage of the operation
regionsarrayAffected regions of the operation
started_atstring (date-time)The started date of the operation (wire: startedAt)
statusstringOperation status (canceled, completed, created, in-error, in-progress, unknown)
sub_operationsarraySub-operations of the operation (wire: subOperations)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectoperation_id, service_nameGet information about one operation (Beta version)
listselectservice_nameinstance_idList 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.

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"}})
operation_idstringOperation ID (wire: operationId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
instance_idstringInstance ID used to filter operations (wire: instanceId)

SELECT examples​

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
;