partition_snapshots
Creates, updates, deletes, gets or lists a partition_snapshots resource.
Overview​
| Name | partition_snapshots |
| Type | Resource |
| Id | ovh.dedicated_nasha.partition_snapshots |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
snapshot_type | string | the interval of snapshot (day-1, day-2, day-3, day-7, hour-1, hour-6) (wire: snapshotType) |
Partition Snapshot
| Name | Datatype | Description |
|---|---|---|
snapshot_type | string | the interval of snapshot (day-1, day-2, day-3, day-7, hour-1, hour-6) (wire: snapshotType) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | partition_name, service_name, snapshot_type | Get this object properties | |
list | select | partition_name, service_name | x_pagination_mode | Get scheduled snapshot types for this partition |
create | insert | partition_name, service_name, snapshot_type | Schedule a new snapshot type | |
delete | delete | partition_name, service_name, snapshot_type | Delete a given 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.
| 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"}}) |
partition_name | string | the given name of partition (wire: partitionName) |
service_name | string | The internal name of your storage (wire: serviceName) |
snapshot_type | string | the interval of snapshot (wire: snapshotType) |
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
SELECT
snapshot_type
FROM ovh.dedicated_nasha.partition_snapshots
WHERE partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND snapshot_type = '{{ snapshot_type }}' -- required
;
Get scheduled snapshot types for this partition
SELECT
snapshot_type
FROM ovh.dedicated_nasha.partition_snapshots
WHERE partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Schedule a new snapshot type
INSERT INTO ovh.dedicated_nasha.partition_snapshots (
snapshot_type,
partition_name,
service_name
)
SELECT
'{{ snapshot_type }}' /* 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_snapshots
props:
- name: partition_name
value: "{{ partition_name }}"
description: Required parameter for the partition_snapshots resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the partition_snapshots resource.
- name: snapshot_type
value: "{{ snapshot_type }}"
description: |
Snapshot interval to add
valid_values: ['day-1', 'day-2', 'day-3', 'day-7', 'hour-1', 'hour-6']
DELETE examples​
- delete
Delete a given snapshot
DELETE FROM ovh.dedicated_nasha.partition_snapshots
WHERE partition_name = '{{ partition_name }}' --required
AND service_name = '{{ service_name }}' --required
AND snapshot_type = '{{ snapshot_type }}' --required
;