volumes_snapshots
Creates, updates, deletes, gets or lists a volumes_snapshots
resource.
Overview
Name | volumes_snapshots |
Type | Resource |
Id | digitalocean.block_storage.volumes_snapshots |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | `` |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
volume_snapshots_get_by_id | SELECT | snapshot_id | To retrieve the details of a snapshot that has been created from a volume, send a GET request to /v2/volumes/snapshots/$VOLUME_SNAPSHOT_ID . |
volume_snapshots_list | SELECT | volume_id | To retrieve the snapshots that have been created from a volume, send a GET request to /v2/volumes/$VOLUME_ID/snapshots . |
volume_snapshots_create | INSERT | volume_id, data__name | To create a snapshot from a volume, sent a POST request to /v2/volumes/$VOLUME_ID/snapshots . |
volume_snapshots_delete_by_id | DELETE | snapshot_id | To delete a volume snapshot, send a DELETE request to /v2/volumes/snapshots/$VOLUME_SNAPSHOT_ID . A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. |
SELECT
examples
To retrieve the snapshots that have been created from a volume, send a GET request to /v2/volumes/$VOLUME_ID/snapshots
.
SELECT
column_anon
FROM digitalocean.block_storage.volumes_snapshots
WHERE volume_id = '{{ volume_id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new volumes_snapshots
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.block_storage.volumes_snapshots (
data__name,
data__tags,
volume_id
)
SELECT
'{{ name }}',
'{{ tags }}',
'{{ volume_id }}'
;
/*+ create */
INSERT INTO digitalocean.block_storage.volumes_snapshots (
data__name,
volume_id
)
SELECT
'{{ name }}',
'{{ volume_id }}'
;
- name: volumes_snapshots
props:
- name: volume_id
value: string
- name: data__name
value: string
- name: name
value: string
- name: tags
value: array
DELETE
example
Deletes the specified volumes_snapshots
resource.
/*+ delete */
DELETE FROM digitalocean.block_storage.volumes_snapshots
WHERE snapshot_id = '{{ snapshot_id }}';