Skip to main content

snapshots

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

Overview

Namesnapshots
TypeResource
Idazure.container_service.snapshots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
creationDataobjectCreationData to be used to specify the source agent pool resource ID to create this snapshot.
enableFIPSbooleanWhether to use a FIPS-enabled OS.
kubernetesVersionstringThe version of Kubernetes.
locationstringThe geo-location where the resource lives. Required.
nodeImageVersionstringThe version of node image.
osSkustringSpecifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "WindowsAnnual", "Ubuntu2404", and "AzureContainerLinux". (Ubuntu, AzureLinux, AzureLinux3, Mariner, Flatcar, CBLMariner, Windows2019, Windows2022, Ubuntu2204, Windows2025, WindowsAnnual, Ubuntu2404, AzureContainerLinux)
osTypestringThe operating system type. The default is Linux. Known values are: "Linux" and "Windows". (Linux, Windows)
snapshotTypestringThe type of a snapshot. The default is NodePool. Known values are: "NodePool" and "ManagedCluster". (NodePool, ManagedCluster)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
vmSizestringThe size of the VM.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, resource_name, subscription_idGets a snapshot.
list_by_resource_groupselectresource_group_name, subscription_idLists snapshots in the specified subscription and resource group.
listselectsubscription_idGets a list of snapshots in the specified subscription.
create_or_updateinsertresource_group_name, resource_name, subscription_id, locationCreates or updates a snapshot.
update_tagsupdateresource_group_name, resource_name, subscription_idUpdates tags on a snapshot.
create_or_updatereplaceresource_group_name, resource_name, subscription_id, locationCreates or updates a snapshot.
deletedeleteresource_group_name, resource_name, subscription_idDeletes 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.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the managed cluster resource. Required.
subscription_idstring

SELECT examples

Gets a snapshot.

SELECT
id,
name,
creationData,
enableFIPS,
kubernetesVersion,
location,
nodeImageVersion,
osSku,
osType,
snapshotType,
systemData,
tags,
type,
vmSize
FROM azure.container_service.snapshots
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a snapshot.

INSERT INTO azure.container_service.snapshots (
tags,
location,
properties,
resource_group_name,
resource_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates tags on a snapshot.

UPDATE azure.container_service.snapshots
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Creates or updates a snapshot.

REPLACE azure.container_service.snapshots
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a snapshot.

DELETE FROM azure.container_service.snapshots
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;