region_workflow_backups
Creates, updates, deletes, gets or lists a region_workflow_backups resource.
Overview​
| Name | region_workflow_backups |
| Type | Resource |
| Id | ovh.cloud.region_workflow_backups |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Workflow id |
name | string | Workflow name identifier |
instance_id | string | Instance id (wire: instanceId) |
backup_name | string | Backup name (wire: backupName) |
distant_backup_name | string | Name of the distant backup if the workflow creates a distant backup (wire: distantBackupName) |
created_at | string (date-time) | Creation date of the workflow (wire: createdAt) |
cron | string | Workflow cron pattern |
distant_region | string | Name of the distant region if the workflow creates a distant backup (wire: distantRegion) |
executions | array | Executions logs |
next_execution_time | string (date-time) | Next execution time (wire: nextExecutionTime) |
rotation | integer | Number of backup to keep |
List your automated backups
| Name | Datatype | Description |
|---|---|---|
id | string | Workflow id |
name | string | Workflow name identifier |
instance_id | string | Instance id (wire: instanceId) |
backup_name | string | Backup name (wire: backupName) |
distant_backup_name | string | Name of the distant backup if the workflow creates a distant backup (wire: distantBackupName) |
created_at | string (date-time) | Creation date of the workflow (wire: createdAt) |
cron | string | Workflow cron pattern |
distant_region | string | Name of the distant region if the workflow creates a distant backup (wire: distantRegion) |
executions | array | Executions logs |
next_execution_time | string (date-time) | Next execution time (wire: nextExecutionTime) |
rotation | integer | Number of backup to keep |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | backup_workflow_id, region_name, service_name | Get details about a backup workflow process | |
list | select | region_name, service_name | List your automated backups | |
create | insert | region_name, service_name, cron, instance_id, name, rotation | Create a new automated backup | |
delete | delete | backup_workflow_id, region_name, service_name | Delete 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.
| 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"}}) |
backup_workflow_id | string | Backup workflow ID (wire: backupWorkflowId) |
region_name | string | Region name (wire: regionName) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
SELECT examples​
- get
- list
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
;
List your automated backups
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 region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: region_workflow_backups
props:
- name: region_name
value: "{{ region_name }}"
description: Required parameter for the region_workflow_backups resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the region_workflow_backups resource.
- name: cron
value: "{{ cron }}"
description: |
Unix Cron pattern (eg: '* * * * *')
- name: instance_id
value: "{{ instance_id }}"
description: |
Instance ID to backup
- name: max_execution_count
value: {{ max_execution_count }}
description: |
Number of execution to process before ending the job. Null value means that the job will never end.
- name: name
value: "{{ name }}"
description: |
Name of your backup job
- name: rotation
value: {{ rotation }}
description: |
Number of backup to keep
DELETE examples​
- delete
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
;