disks
Creates, updates, deletes, gets or lists a disks
resource.
Overview
Name | disks |
Type | Resource |
Id | azure.compute.disks |
Fields
- vw_disks
- disks
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
bursting_enabled | text | field from the properties object |
bursting_enabled_time | text | field from the properties object |
completion_percent | text | field from the properties object |
creation_data | text | field from the properties object |
data_access_auth_mode | text | field from the properties object |
diskName | text | field from the properties object |
disk_access_id | text | field from the properties object |
disk_iops_read_only | text | field from the properties object |
disk_iops_read_write | text | field from the properties object |
disk_mbps_read_only | text | field from the properties object |
disk_mbps_read_write | text | field from the properties object |
disk_size_bytes | text | field from the properties object |
disk_size_gb | text | field from the properties object |
disk_state | text | field from the properties object |
encryption | text | field from the properties object |
encryption_settings_collection | text | field from the properties object |
extended_location | text | field from the properties object |
hyper_v_generation | text | field from the properties object |
last_ownership_update_time | text | field from the properties object |
location | text | Resource location |
managed_by | text | field from the properties object |
managed_by_extended | text | field from the properties object |
max_shares | text | field from the properties object |
network_access_policy | text | field from the properties object |
optimized_for_frequent_attach | text | field from the properties object |
os_type | text | field from the properties object |
property_updates_in_progress | text | field from the properties object |
provisioning_state | text | field from the properties object |
public_network_access | text | field from the properties object |
purchase_plan | text | field from the properties object |
resourceGroupName | text | field from the properties object |
security_profile | text | field from the properties object |
share_info | text | field from the properties object |
sku | text | The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. |
subscriptionId | text | field from the properties object |
supported_capabilities | text | field from the properties object |
supports_hibernation | text | field from the properties object |
tags | text | Resource tags |
tier | text | field from the properties object |
time_created | text | field from the properties object |
type | text | Resource type |
unique_id | text | field from the properties object |
zones | text | The Logical zone list for Disk. |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
extendedLocation | object | The complex type of the extended location. |
location | string | Resource location |
managedBy | string | A relative URI containing the ID of the VM that has the disk attached. |
managedByExtended | array | List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. |
properties | object | Disk resource properties. |
sku | object | The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. |
tags | object | Resource tags |
type | string | Resource type |
zones | array | The Logical zone list for Disk. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | diskName, resourceGroupName, subscriptionId | Gets information about a disk. |
list | SELECT | subscriptionId | Lists all the disks under a subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Lists all the disks under a resource group. |
create_or_update | INSERT | diskName, resourceGroupName, subscriptionId | Creates or updates a disk. |
delete | DELETE | diskName, resourceGroupName, subscriptionId | Deletes a disk. |
update | UPDATE | diskName, resourceGroupName, subscriptionId | Updates (patches) a disk. |
grant_access | EXEC | diskName, resourceGroupName, subscriptionId, data__access, data__durationInSeconds | Grants access to a disk. |
revoke_access | EXEC | diskName, resourceGroupName, subscriptionId | Revokes access to a disk. |
SELECT
examples
Lists all the disks under a subscription.
- vw_disks
- disks
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 }}';
SELECT
id,
name,
extendedLocation,
location,
managedBy,
managedByExtended,
properties,
sku,
tags,
type,
zones
FROM azure.compute.disks
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new disks
resource.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: managedBy
value: string
- name: managedByExtended
value:
- string
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: zones
value:
- string
- name: extendedLocation
value:
- name: name
value: string
- name: type
value: []
- name: properties
value:
- name: timeCreated
value: string
- name: osType
value: string
- name: hyperVGeneration
value: string
- name: purchasePlan
value:
- name: name
value: string
- name: publisher
value: string
- name: product
value: string
- name: promotionCode
value: string
- name: supportedCapabilities
value:
- name: diskControllerTypes
value: string
- name: acceleratedNetwork
value: boolean
- name: architecture
value: string
- name: creationData
value:
- name: createOption
value: string
- name: storageAccountId
value: string
- name: imageReference
value:
- name: id
value: string
- name: sharedGalleryImageId
value: string
- name: communityGalleryImageId
value: string
- name: lun
value: integer
- name: sourceUri
value: string
- name: sourceResourceId
value: string
- name: sourceUniqueId
value: string
- name: uploadSizeBytes
value: integer
- name: logicalSectorSize
value: integer
- name: securityDataUri
value: string
- name: performancePlus
value: boolean
- name: elasticSanResourceId
value: string
- name: provisionedBandwidthCopySpeed
value: string
- name: diskSizeGB
value: integer
- name: diskSizeBytes
value: integer
- name: uniqueId
value: string
- name: encryptionSettingsCollection
value:
- name: enabled
value: boolean
- name: encryptionSettings
value:
- - name: diskEncryptionKey
value:
- name: sourceVault
value:
- name: id
value: string
- name: secretUrl
value: string
- name: keyEncryptionKey
value:
- name: keyUrl
value: string
- name: encryptionSettingsVersion
value: string
- name: provisioningState
value: string
- name: diskIOPSReadWrite
value: integer
- name: diskMBpsReadWrite
value: integer
- name: diskIOPSReadOnly
value: integer
- name: diskMBpsReadOnly
value: integer
- name: diskState
value: []
- name: encryption
value:
- name: diskEncryptionSetId
value: string
- name: type
value: []
- name: maxShares
value: integer
- name: shareInfo
value:
- - name: vmUri
value: string
- name: networkAccessPolicy
value: []
- name: diskAccessId
value: string
- name: burstingEnabledTime
value: string
- name: tier
value: string
- name: burstingEnabled
value: boolean
- name: propertyUpdatesInProgress
value:
- name: targetTier
value: string
- name: supportsHibernation
value: boolean
- name: securityProfile
value:
- name: securityType
value: []
- name: secureVMDiskEncryptionSetId
value: string
- name: completionPercent
value: number
- name: publicNetworkAccess
value: []
- name: dataAccessAuthMode
value: []
- name: optimizedForFrequentAttach
value: boolean
- name: LastOwnershipUpdateTime
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
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 }}';