snapshots
Creates, updates, deletes, gets or lists a snapshots
resource.
Overview
Name | snapshots |
Type | Resource |
Id | azure_isv.netapp.snapshots |
Fields
- vw_snapshots
- snapshots
Name | Datatype | Description |
---|---|---|
accountName | text | field from the properties object |
created | text | field from the properties object |
location | text | Resource location |
poolName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
snapshotName | text | field from the properties object |
snapshot_id | text | field from the properties object |
subscriptionId | text | field from the properties object |
volumeName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
location | string | Resource location |
properties | object | Snapshot properties |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, poolName, resourceGroupName, snapshotName, subscriptionId, volumeName | Get details of the specified snapshot |
list | SELECT | accountName, poolName, resourceGroupName, subscriptionId, volumeName | List all snapshots associated with the volume |
create | INSERT | accountName, poolName, resourceGroupName, snapshotName, subscriptionId, volumeName, data__location | Create the specified snapshot within the given volume |
delete | DELETE | accountName, poolName, resourceGroupName, snapshotName, subscriptionId, volumeName | Delete snapshot |
update | UPDATE | accountName, poolName, resourceGroupName, snapshotName, subscriptionId, volumeName | Patch a snapshot |
restore_files | EXEC | accountName, poolName, resourceGroupName, snapshotName, subscriptionId, volumeName, data__filePaths | Restore the specified files from the specified snapshot to the active filesystem |
SELECT
examples
List all snapshots associated with the volume
- vw_snapshots
- snapshots
SELECT
accountName,
created,
location,
poolName,
provisioning_state,
resourceGroupName,
snapshotName,
snapshot_id,
subscriptionId,
volumeName
FROM azure_isv.netapp.vw_snapshots
WHERE accountName = '{{ accountName }}'
AND poolName = '{{ poolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND volumeName = '{{ volumeName }}';
SELECT
location,
properties
FROM azure_isv.netapp.snapshots
WHERE accountName = '{{ accountName }}'
AND poolName = '{{ poolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND volumeName = '{{ volumeName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new snapshots
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure_isv.netapp.snapshots (
accountName,
poolName,
resourceGroupName,
snapshotName,
subscriptionId,
volumeName,
data__location,
location,
properties
)
SELECT
'{{ accountName }}',
'{{ poolName }}',
'{{ resourceGroupName }}',
'{{ snapshotName }}',
'{{ subscriptionId }}',
'{{ volumeName }}',
'{{ data__location }}',
'{{ location }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: location
value: string
- name: properties
value:
- name: snapshotId
value: string
- name: created
value: string
- name: provisioningState
value: string
UPDATE
example
Updates a snapshots
resource.
/*+ update */
UPDATE azure_isv.netapp.snapshots
SET
WHERE
accountName = '{{ accountName }}'
AND poolName = '{{ poolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND snapshotName = '{{ snapshotName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND volumeName = '{{ volumeName }}';
DELETE
example
Deletes the specified snapshots
resource.
/*+ delete */
DELETE FROM azure_isv.netapp.snapshots
WHERE accountName = '{{ accountName }}'
AND poolName = '{{ poolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND snapshotName = '{{ snapshotName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND volumeName = '{{ volumeName }}';