Skip to main content

partition_custom_snapshots

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

Overview​

Namepartition_custom_snapshots
TypeResource
Idovh.dedicated_nasha.partition_custom_snapshots

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringname of the snapshot
expirationstringdate and time at which snapshot will be automatically destroyed

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectname, partition_name, service_nameGet this object properties (Beta version)
listselectpartition_name, service_namex_pagination_modeGet custom snapshots for this partition (Beta version)
createinsertpartition_name, service_name, nameCreate a new snapshot (Beta version)
deletedeletename, partition_name, service_nameDelete a given snapshot (Beta version)

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"}})
namestringname of the snapshot
partition_namestringthe given name of partition (wire: partitionName)
service_namestringThe internal name of your storage (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get this object properties (Beta version)

SELECT
name,
expiration
FROM ovh.dedicated_nasha.partition_custom_snapshots
WHERE name = '{{ name }}' -- required
AND partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a new snapshot (Beta version)

INSERT INTO ovh.dedicated_nasha.partition_custom_snapshots (
expiration,
name,
partition_name,
service_name
)
SELECT
'{{ expiration }}',
'{{ name }}' /* required */,
'{{ partition_name }}',
'{{ service_name }}'
RETURNING
task_id,
partition_name,
storage_name,
details,
done_date,
last_update,
operation,
status,
todo_date
;

DELETE examples​

Delete a given snapshot (Beta version)

DELETE FROM ovh.dedicated_nasha.partition_custom_snapshots
WHERE name = '{{ name }}' --required
AND partition_name = '{{ partition_name }}' --required
AND service_name = '{{ service_name }}' --required
;