Skip to main content

snapshots

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

Overview​

Namesnapshots
TypeResource
Idovh.vps.snapshots

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring
creation_datestring (date-time) (wire: creationDate)
descriptionstring
regionstring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameReturns the ID, creation date, description and region of the snapshot of the VPS.
updateupdateservice_nameUpdates the description of the snapshot of the VPS.
deletedeleteservice_nameDeletes the snapshot of the VPS and returns the task that performs it.
revertexecserviceNameReverts 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.

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"}})
serviceNamestringService name
service_namestringService name (wire: serviceName)

SELECT examples​

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​

Updates the description of the snapshot of the VPS.

UPDATE ovh.vps.snapshots
SET
description = '{{ description }}'
WHERE
service_name = '{{ service_name }}' --required;

DELETE examples​

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.

Reverts the VPS to its snapshot and returns the task that performs it.

EXEC ovh.vps.snapshots.revert
@serviceName='{{ serviceName }}' --required
;