snapshots
Creates, updates, deletes, gets or lists a snapshots
resource.
Overview
Name | snapshots |
Type | Resource |
Id | google.netapp.snapshots |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the snapshot. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id} . |
createTime | string (google-datetime) | Output only. The time when the snapshot was created. |
description | string | A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected. |
labels | object | Resource labels to represent user provided metadata. |
state | string | Output only. The snapshot state. |
stateDetails | string | Output only. State details of the storage pool |
usedBytes | number (double) | Output only. Current storage usage for the snapshot in bytes. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the snapshot. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id} . |
createTime | string (google-datetime) | Output only. The time when the snapshot was created. |
description | string | A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected. |
labels | object | Resource labels to represent user provided metadata. |
state | string | Output only. The snapshot state. |
stateDetails | string | Output only. State details of the storage pool |
usedBytes | number (double) | Output only. Current storage usage for the snapshot in bytes. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , volumesId , snapshotsId | Describe a snapshot for a volume. | |
list | select | projectsId , locationsId , volumesId | pageSize , pageToken , orderBy , filter | Returns descriptions of all snapshots for a volume. |
create | insert | projectsId , locationsId , volumesId | snapshotId | Create a new snapshot for a volume. |
patch | update | projectsId , locationsId , volumesId , snapshotsId | updateMask | Updates the settings of a specific snapshot. |
delete | delete | projectsId , locationsId , volumesId , snapshotsId | Deletes a 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 |
---|---|---|
locationsId | string | |
projectsId | string | |
snapshotsId | string | |
volumesId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
snapshotId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Describe a snapshot for a volume.
SELECT
name,
createTime,
description,
labels,
state,
stateDetails,
usedBytes
FROM google.netapp.snapshots
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND volumesId = '{{ volumesId }}' -- required
AND snapshotsId = '{{ snapshotsId }}' -- required;
Returns descriptions of all snapshots for a volume.
SELECT
name,
createTime,
description,
labels,
state,
stateDetails,
usedBytes
FROM google.netapp.snapshots
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND volumesId = '{{ volumesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
Create a new snapshot for a volume.
INSERT INTO google.netapp.snapshots (
data__name,
data__description,
data__labels,
projectsId,
locationsId,
volumesId,
snapshotId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ volumesId }}',
'{{ snapshotId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: snapshots
props:
- name: projectsId
value: string
description: Required parameter for the snapshots resource.
- name: locationsId
value: string
description: Required parameter for the snapshots resource.
- name: volumesId
value: string
description: Required parameter for the snapshots resource.
- name: name
value: string
description: >
Identifier. The resource name of the snapshot. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
- name: description
value: string
description: >
A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
- name: labels
value: object
description: >
Resource labels to represent user provided metadata.
- name: snapshotId
value: string
UPDATE
examples
- patch
Updates the settings of a specific snapshot.
UPDATE google.netapp.snapshots
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND snapshotsId = '{{ snapshotsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a snapshot.
DELETE FROM google.netapp.snapshots
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND snapshotsId = '{{ snapshotsId }}' --required;