snapshots
Creates, updates, deletes, gets or lists a snapshots resource.
Overview​
| Name | snapshots |
| Type | Resource |
| Id | ovh.vps.snapshots |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | |
creation_date | string (date-time) | (wire: creationDate) |
description | string | |
region | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | Returns the ID, creation date, description and region of the snapshot of the VPS. | |
update | update | service_name | Updates the description of the snapshot of the VPS. | |
delete | delete | service_name | Deletes the snapshot of the VPS and returns the task that performs it. | |
revert | exec | serviceName | Reverts the VPS to its snapshot and returns the task that performs it. |
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"}}) |
serviceName | string | Service name |
service_name | string | Service name (wire: serviceName) |
SELECT examples​
- get
Returns the ID, creation date, description and region of the snapshot of the VPS.
SELECT
id,
creation_date,
description,
region
FROM ovh.vps.snapshots
WHERE service_name = '{{ service_name }}' -- required
;
UPDATE examples​
- update
Updates the description of the snapshot of the VPS.
UPDATE ovh.vps.snapshots
SET
description = '{{ description }}'
WHERE
service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Deletes the snapshot of the VPS and returns the task that performs it.
DELETE FROM ovh.vps.snapshots
WHERE service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- revert
Reverts the VPS to its snapshot and returns the task that performs it.
EXEC ovh.vps.snapshots.revert
@serviceName='{{ serviceName }}' --required
;