Skip to main content

region_workflow_backups

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

Overview​

Nameregion_workflow_backups
TypeResource
Idovh.cloud.region_workflow_backups

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringWorkflow id
namestringWorkflow name identifier
instance_idstringInstance id (wire: instanceId)
backup_namestringBackup name (wire: backupName)
distant_backup_namestringName of the distant backup if the workflow creates a distant backup (wire: distantBackupName)
created_atstring (date-time)Creation date of the workflow (wire: createdAt)
cronstringWorkflow cron pattern
distant_regionstringName of the distant region if the workflow creates a distant backup (wire: distantRegion)
executionsarrayExecutions logs
next_execution_timestring (date-time)Next execution time (wire: nextExecutionTime)
rotationintegerNumber of backup to keep

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbackup_workflow_id, region_name, service_nameGet details about a backup workflow process
listselectregion_name, service_nameList your automated backups
createinsertregion_name, service_name, cron, instance_id, name, rotationCreate a new automated backup
deletedeletebackup_workflow_id, region_name, service_nameDelete a backup workflow process

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"}})
backup_workflow_idstringBackup workflow ID (wire: backupWorkflowId)
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.

SELECT examples​

Get details about a backup workflow process

SELECT
id,
name,
instance_id,
backup_name,
distant_backup_name,
created_at,
cron,
distant_region,
executions,
next_execution_time,
rotation
FROM ovh.cloud.region_workflow_backups
WHERE backup_workflow_id = '{{ backup_workflow_id }}' -- required
AND region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a new automated backup

INSERT INTO ovh.cloud.region_workflow_backups (
cron,
instance_id,
max_execution_count,
name,
rotation,
region_name,
service_name
)
SELECT
'{{ cron }}' /* required */,
'{{ instance_id }}' /* required */,
{{ max_execution_count }},
'{{ name }}' /* required */,
{{ rotation }} /* required */,
'{{ region_name }}',
'{{ service_name }}'
RETURNING
id,
name,
instance_id,
backup_name,
distant_backup_name,
created_at,
cron,
distant_region,
executions,
next_execution_time,
rotation
;

DELETE examples​

Delete a backup workflow process

DELETE FROM ovh.cloud.region_workflow_backups
WHERE backup_workflow_id = '{{ backup_workflow_id }}' --required
AND region_name = '{{ region_name }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;