Skip to main content

disks

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

Overview

Namedisks
TypeResource
Idazure.compute.disks

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
bursting_enabledtextfield from the properties object
bursting_enabled_timetextfield from the properties object
completion_percenttextfield from the properties object
creation_datatextfield from the properties object
data_access_auth_modetextfield from the properties object
diskNametextfield from the properties object
disk_access_idtextfield from the properties object
disk_iops_read_onlytextfield from the properties object
disk_iops_read_writetextfield from the properties object
disk_mbps_read_onlytextfield from the properties object
disk_mbps_read_writetextfield 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
last_ownership_update_timetextfield from the properties object
locationtextResource location
managed_bytextfield from the properties object
managed_by_extendedtextfield from the properties object
max_sharestextfield from the properties object
network_access_policytextfield from the properties object
optimized_for_frequent_attachtextfield from the properties object
os_typetextfield from the properties object
property_updates_in_progresstextfield 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
share_infotextfield from the properties object
skutextThe disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.
subscriptionIdtextfield from the properties object
supported_capabilitiestextfield from the properties object
supports_hibernationtextfield from the properties object
tagstextResource tags
tiertextfield from the properties object
time_createdtextfield from the properties object
typetextResource type
unique_idtextfield from the properties object
zonestextThe Logical zone list for Disk.

Methods

NameAccessible byRequired ParamsDescription
getSELECTdiskName, resourceGroupName, subscriptionIdGets information about a disk.
listSELECTsubscriptionIdLists all the disks under a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all the disks under a resource group.
create_or_updateINSERTdiskName, resourceGroupName, subscriptionIdCreates or updates a disk.
deleteDELETEdiskName, resourceGroupName, subscriptionIdDeletes a disk.
updateUPDATEdiskName, resourceGroupName, subscriptionIdUpdates (patches) a disk.
grant_accessEXECdiskName, resourceGroupName, subscriptionId, data__access, data__durationInSecondsGrants access to a disk.
revoke_accessEXECdiskName, resourceGroupName, subscriptionIdRevokes access to a disk.

SELECT examples

Lists all the disks under a subscription.

SELECT
id,
name,
bursting_enabled,
bursting_enabled_time,
completion_percent,
creation_data,
data_access_auth_mode,
diskName,
disk_access_id,
disk_iops_read_only,
disk_iops_read_write,
disk_mbps_read_only,
disk_mbps_read_write,
disk_size_bytes,
disk_size_gb,
disk_state,
encryption,
encryption_settings_collection,
extended_location,
hyper_v_generation,
last_ownership_update_time,
location,
managed_by,
managed_by_extended,
max_shares,
network_access_policy,
optimized_for_frequent_attach,
os_type,
property_updates_in_progress,
provisioning_state,
public_network_access,
purchase_plan,
resourceGroupName,
security_profile,
share_info,
sku,
subscriptionId,
supported_capabilities,
supports_hibernation,
tags,
tier,
time_created,
type,
unique_id,
zones
FROM azure.compute.vw_disks
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

UPDATE example

Updates a disks resource.

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

DELETE example

Deletes the specified disks resource.

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