region_share_snapshots
Creates, updates, deletes, gets or lists a region_share_snapshots resource.
Overview​
| Name | region_share_snapshots |
| Type | Resource |
| Id | ovh.cloud_storage.region_share_snapshots |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Snapshot ID |
name | string | Snapshot name |
share_id | string (uuid) | Share ID (wire: shareId) |
created_at | string (date-time) | The date and timestamp when the resource was created (wire: createdAt) |
description | string | Snapshot description |
share_protocol | string | Share protocol (NFS) (wire: shareProtocol) |
share_size | integer | Share size in GB (wire: shareSize) |
size | integer | Snapshot size in GB |
status | string | Snapshot status (available, creating, deleting, error, error_deleting, manage_error, manage_starting, restoring, unmanage_error, unmanage_starting) |
Share snapshot
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Snapshot ID |
name | string | Snapshot name |
share_id | string (uuid) | Share ID (wire: shareId) |
created_at | string (date-time) | The date and timestamp when the resource was created (wire: createdAt) |
description | string | Snapshot description |
share_protocol | string | Share protocol (NFS) (wire: shareProtocol) |
share_size | integer | Share size in GB (wire: shareSize) |
size | integer | Snapshot size in GB |
status | string | Snapshot status (available, creating, deleting, error, error_deleting, manage_error, manage_starting, restoring, unmanage_error, unmanage_starting) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | region_name, share_id, snapshot_id, service_name | Get share snapshot | |
list | select | region_name, share_id, service_name | Get share snapshots | |
create | insert | region_name, share_id, service_name | Create share snapshot | |
delete | delete | region_name, share_id, snapshot_id, service_name | Delete share 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"}}) |
region_name | string | Region name (wire: regionName) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
share_id | string (uuid) | Share ID (wire: shareId) |
snapshot_id | string (uuid) | Snapshot ID (wire: snapshotId) |
SELECT examples​
- get
- list
Get share snapshot
SELECT
id,
name,
share_id,
created_at,
description,
share_protocol,
share_size,
size,
status
FROM ovh.cloud_storage.region_share_snapshots
WHERE region_name = '{{ region_name }}' -- required
AND share_id = '{{ share_id }}' -- required
AND snapshot_id = '{{ snapshot_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Get share snapshots
SELECT
id,
name,
share_id,
created_at,
description,
share_protocol,
share_size,
size,
status
FROM ovh.cloud_storage.region_share_snapshots
WHERE region_name = '{{ region_name }}' -- required
AND share_id = '{{ share_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
INSERT examples​
- create
- Manifest
Create share snapshot
INSERT INTO ovh.cloud_storage.region_share_snapshots (
description,
name,
region_name,
share_id,
service_name
)
SELECT
'{{ description }}',
'{{ name }}',
'{{ region_name }}',
'{{ share_id }}',
'{{ service_name }}'
RETURNING
id,
name,
share_id,
created_at,
description,
share_protocol,
share_size,
size,
status
;
# Description fields are for documentation purposes
- name: region_share_snapshots
props:
- name: region_name
value: "{{ region_name }}"
description: Required parameter for the region_share_snapshots resource.
- name: share_id
value: "{{ share_id }}"
description: Required parameter for the region_share_snapshots resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the region_share_snapshots resource.
- name: description
value: "{{ description }}"
description: |
Snapshot description
- name: name
value: "{{ name }}"
description: |
Snapshot name
DELETE examples​
- delete
Delete share snapshot
DELETE FROM ovh.cloud_storage.region_share_snapshots
WHERE region_name = '{{ region_name }}' --required
AND share_id = '{{ share_id }}' --required
AND snapshot_id = '{{ snapshot_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;