Skip to main content

snapshots

Creates, updates, deletes, gets or lists a snapshots resource.

Overview

Namesnapshots
TypeResource
Idazure.compute.snapshots

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
completion_percenttextfield from the properties object
copy_completion_errortextfield from the properties object
creation_datatextfield from the properties object
data_access_auth_modetextfield from the properties object
disk_access_idtextfield from the properties object
disk_size_bytestextfield from the properties object
disk_size_gbtextfield from the properties object
disk_statetextfield from the properties object
encryptiontextfield from the properties object
encryption_settings_collectiontextfield from the properties object
extended_locationtextfield from the properties object
hyper_v_generationtextfield from the properties object
incrementaltextfield from the properties object
incremental_snapshot_family_idtextfield from the properties object
locationtextResource location
managed_bytextfield from the properties object
network_access_policytextfield from the properties object
os_typetextfield from the properties object
provisioning_statetextfield from the properties object
public_network_accesstextfield from the properties object
purchase_plantextfield from the properties object
resourceGroupNametextfield from the properties object
security_profiletextfield from the properties object
skutextThe snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
snapshotNametextfield from the properties object
subscriptionIdtextfield from the properties object
supported_capabilitiestextfield from the properties object
supports_hibernationtextfield from the properties object
tagstextResource tags
time_createdtextfield from the properties object
typetextResource type
unique_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, snapshotName, subscriptionIdGets information about a snapshot.
listSELECTsubscriptionIdLists snapshots under a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists snapshots under a resource group.
create_or_updateINSERTresourceGroupName, snapshotName, subscriptionIdCreates or updates a snapshot.
deleteDELETEresourceGroupName, snapshotName, subscriptionIdDeletes a snapshot.
updateUPDATEresourceGroupName, snapshotName, subscriptionIdUpdates (patches) a snapshot.
grant_accessEXECresourceGroupName, snapshotName, subscriptionId, data__access, data__durationInSecondsGrants access to a snapshot.
revoke_accessEXECresourceGroupName, snapshotName, subscriptionIdRevokes access to a snapshot.

SELECT examples

Lists snapshots under a subscription.

SELECT
id,
name,
completion_percent,
copy_completion_error,
creation_data,
data_access_auth_mode,
disk_access_id,
disk_size_bytes,
disk_size_gb,
disk_state,
encryption,
encryption_settings_collection,
extended_location,
hyper_v_generation,
incremental,
incremental_snapshot_family_id,
location,
managed_by,
network_access_policy,
os_type,
provisioning_state,
public_network_access,
purchase_plan,
resourceGroupName,
security_profile,
sku,
snapshotName,
subscriptionId,
supported_capabilities,
supports_hibernation,
tags,
time_created,
type,
unique_id
FROM azure.compute.vw_snapshots
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new snapshots resource.

/*+ create */
INSERT INTO azure.compute.snapshots (
resourceGroupName,
snapshotName,
subscriptionId,
sku,
extendedLocation,
properties,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ snapshotName }}',
'{{ subscriptionId }}',
'{{ sku }}',
'{{ extendedLocation }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a snapshots resource.

/*+ update */
UPDATE azure.compute.snapshots
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
sku = '{{ sku }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND snapshotName = '{{ snapshotName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified snapshots resource.

/*+ delete */
DELETE FROM azure.compute.snapshots
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND snapshotName = '{{ snapshotName }}'
AND subscriptionId = '{{ subscriptionId }}';