Skip to main content

disk_encryption_sets

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

Overview

Namedisk_encryption_sets
TypeResource
Idazure.compute.disk_encryption_sets

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.
activeKeyobjectKey Vault Key Url to be used for server side encryption of Managed Disks and Snapshots.
autoKeyRotationErrorobjectThe error that was encountered during auto-key rotation. If an error is present, then auto-key rotation will not be attempted until the error on this disk encryption set is fixed.
encryptionTypestringThe type of key used to encrypt the data of the disk. Known values are: "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys", and "ConfidentialVmEncryptedWithCustomerKey". (EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys, ConfidentialVmEncryptedWithCustomerKey)
federatedClientIdstringMulti-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the property.
identityobjectThe managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.
lastKeyRotationTimestampstring (date-time)The time when the active key of this disk encryption set was updated.
locationstringThe geo-location where the resource lives. Required.
previousKeysarrayA readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation.
provisioningStatestringThe disk encryption set provisioning state.
rotationToLatestKeyVersionEnabledbooleanSet this flag to true to enable auto-updating of this disk encryption set to the latest key version.
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".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, disk_encryption_set_name, subscription_idGets information about a disk encryption set.
list_by_resource_groupselectresource_group_name, subscription_idLists all the disk encryption sets under a resource group.
listselectsubscription_idLists all the disk encryption sets under a subscription.
create_or_updateinsertresource_group_name, disk_encryption_set_name, subscription_id, locationCreates or updates a disk encryption set.
updateupdateresource_group_name, disk_encryption_set_name, subscription_idUpdates (patches) a disk encryption set.
create_or_updatereplaceresource_group_name, disk_encryption_set_name, subscription_id, locationCreates or updates a disk encryption set.
deletedeleteresource_group_name, disk_encryption_set_name, subscription_idDeletes a disk encryption set.
list_associated_resourcesexecresource_group_name, disk_encryption_set_name, subscription_idLists all resources that are encrypted with this disk encryption set.

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
disk_encryption_set_namestringThe name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets information about a disk encryption set.

SELECT
id,
name,
activeKey,
autoKeyRotationError,
encryptionType,
federatedClientId,
identity,
lastKeyRotationTimestamp,
location,
previousKeys,
provisioningState,
rotationToLatestKeyVersionEnabled,
systemData,
tags,
type
FROM azure.compute.disk_encryption_sets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND disk_encryption_set_name = '{{ disk_encryption_set_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a disk encryption set.

INSERT INTO azure.compute.disk_encryption_sets (
tags,
location,
properties,
identity,
resource_group_name,
disk_encryption_set_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ disk_encryption_set_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates (patches) a disk encryption set.

UPDATE azure.compute.disk_encryption_sets
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND disk_encryption_set_name = '{{ disk_encryption_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Creates or updates a disk encryption set.

REPLACE azure.compute.disk_encryption_sets
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND disk_encryption_set_name = '{{ disk_encryption_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a disk encryption set.

DELETE FROM azure.compute.disk_encryption_sets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND disk_encryption_set_name = '{{ disk_encryption_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Lists all resources that are encrypted with this disk encryption set.

EXEC azure.compute.disk_encryption_sets.list_associated_resources 
@resource_group_name='{{ resource_group_name }}' --required,
@disk_encryption_set_name='{{ disk_encryption_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;