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

NameDatatypeDescription
idtextResource Id
nametextResource name
active_keytextfield from the properties object
auto_key_rotation_errortextfield from the properties object
diskEncryptionSetNametextfield from the properties object
encryption_typetextfield from the properties object
federated_client_idtextfield from the properties object
identitytextThe managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.
last_key_rotation_timestamptextfield from the properties object
locationtextResource location
previous_keystextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
rotation_to_latest_key_version_enabledtextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags
typetextResource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTdiskEncryptionSetName, resourceGroupName, subscriptionIdGets information about a disk encryption set.
listSELECTsubscriptionIdLists all the disk encryption sets under a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all the disk encryption sets under a resource group.
create_or_updateINSERTdiskEncryptionSetName, resourceGroupName, subscriptionIdCreates or updates a disk encryption set
deleteDELETEdiskEncryptionSetName, resourceGroupName, subscriptionIdDeletes a disk encryption set.
updateUPDATEdiskEncryptionSetName, resourceGroupName, subscriptionIdUpdates (patches) a disk encryption set.

SELECT examples

Lists all the disk encryption sets under a subscription.

SELECT
id,
name,
active_key,
auto_key_rotation_error,
diskEncryptionSetName,
encryption_type,
federated_client_id,
identity,
last_key_rotation_timestamp,
location,
previous_keys,
provisioning_state,
resourceGroupName,
rotation_to_latest_key_version_enabled,
subscriptionId,
tags,
type
FROM azure.compute.vw_disk_encryption_sets
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.compute.disk_encryption_sets (
diskEncryptionSetName,
resourceGroupName,
subscriptionId,
identity,
properties,
location,
tags
)
SELECT
'{{ diskEncryptionSetName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ identity }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a disk_encryption_sets resource.

/*+ update */
UPDATE azure.compute.disk_encryption_sets
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
diskEncryptionSetName = '{{ diskEncryptionSetName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified disk_encryption_sets resource.

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