partition_custom_snapshots
Creates, updates, deletes, gets or lists a partition_custom_snapshots resource.
Overview​
| Name | partition_custom_snapshots |
| Type | Resource |
| Id | ovh.dedicated_nasha.partition_custom_snapshots |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | name of the snapshot |
expiration | string | date and time at which snapshot will be automatically destroyed |
Custom Snapshot
| Name | Datatype | Description |
|---|---|---|
name | string | name of the snapshot |
expiration | string | date and time at which snapshot will be automatically destroyed |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, partition_name, service_name | Get this object properties (Beta version) | |
list | select | partition_name, service_name | x_pagination_mode | Get custom snapshots for this partition (Beta version) |
create | insert | partition_name, service_name, name | Create a new snapshot (Beta version) | |
delete | delete | name, partition_name, service_name | Delete 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.
| 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"}}) |
name | string | name of the snapshot |
partition_name | string | the given name of partition (wire: partitionName) |
service_name | string | The internal name of your storage (wire: serviceName) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
Get custom snapshots for this partition (Beta version)
SELECT
name,
expiration
FROM ovh.dedicated_nasha.partition_custom_snapshots
WHERE partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: partition_custom_snapshots
props:
- name: partition_name
value: "{{ partition_name }}"
description: Required parameter for the partition_custom_snapshots resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the partition_custom_snapshots resource.
- name: expiration
value: "{{ expiration }}"
description: |
optional expiration date/time, in iso8601 format
- name: name
value: "{{ name }}"
description: |
the name of the snapshot
DELETE examples​
- delete
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
;