snapshots
Creates, updates, deletes, gets or lists a snapshots
resource.
Overview
Name | snapshots |
Type | Resource |
Id | azure.container_storage.snapshots |
Fields
- vw_snapshots
- snapshots
Name | Datatype | Description |
---|---|---|
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 |
source | text | field from the properties object |
status | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Volume Snapshot Properties |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | poolName, resourceGroupName, snapshotName, subscriptionId | Get a Snapshot |
list_by_pool | SELECT | poolName, resourceGroupName, subscriptionId | List Snapshot resources by Pool |
create_or_update | INSERT | poolName, resourceGroupName, snapshotName, subscriptionId | Create a Snapshot |
delete | DELETE | poolName, resourceGroupName, snapshotName, subscriptionId | Delete a Snapshot |
SELECT
examples
List Snapshot resources by Pool
- vw_snapshots
- snapshots
SELECT
poolName,
provisioning_state,
resourceGroupName,
snapshotName,
source,
status,
subscriptionId
FROM azure.container_storage.vw_snapshots
WHERE poolName = '{{ poolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.container_storage.snapshots
WHERE poolName = '{{ poolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new snapshots
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.container_storage.snapshots (
poolName,
resourceGroupName,
snapshotName,
subscriptionId,
properties
)
SELECT
'{{ poolName }}',
'{{ resourceGroupName }}',
'{{ snapshotName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: []
- name: status
value:
- name: state
value: []
- name: message
value: string
- name: source
value: string
DELETE
example
Deletes the specified snapshots
resource.
/*+ delete */
DELETE FROM azure.container_storage.snapshots
WHERE poolName = '{{ poolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND snapshotName = '{{ snapshotName }}'
AND subscriptionId = '{{ subscriptionId }}';