Skip to main content

volume_snapshots

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

Overview​

Namevolume_snapshots
TypeResource
Idovh.cloud_storage.volume_snapshots

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringSnapshot id
namestringSnapshot name
volume_idstringVolume source id (wire: volumeId)
creation_datestring (date-time)Snapshot creation date (wire: creationDate)
descriptionstringSnapshot description
plan_codestringOrder plan code (wire: planCode)
regionstringSnapshot region
sizeintegerSnapshot size
statusstringSnapshot status (available, creating, deleting, error, error_deleting)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsnapshot_id, service_nameGet volume snapshot details
listselectservice_nameregionGet volume snapshots
deletedeletesnapshot_id, service_nameDelete a volume snapshot

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"}})
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
snapshot_idstringSnapshot ID (wire: snapshotId)
regionstringSnapshots region

SELECT examples​

Get volume snapshot details

SELECT
id,
name,
volume_id,
creation_date,
description,
plan_code,
region,
size,
status
FROM ovh.cloud_storage.volume_snapshots
WHERE snapshot_id = '{{ snapshot_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

DELETE examples​

Delete a volume snapshot

DELETE FROM ovh.cloud_storage.volume_snapshots
WHERE snapshot_id = '{{ snapshot_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;