Skip to main content

virtual_hard_disks

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

Overview

Namevirtual_hard_disks
TypeResource
Idazure_stack.azure_stack_hci.virtual_hard_disks

Fields

NameDatatypeDescription
block_size_bytestextfield from the properties object
container_idtextfield from the properties object
disk_file_formattextfield from the properties object
disk_size_gbtextfield from the properties object
dynamictextfield from the properties object
extended_locationtextfield from the properties object
hyper_v_generationtextfield from the properties object
locationtextThe geo-location where the resource lives
logical_sector_bytestextfield from the properties object
physical_sector_bytestextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
virtualHardDiskNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualHardDiskNameGets a virtual hard disk
listSELECTresourceGroupName, subscriptionIdLists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to get the next page of virtual hard disks.
list_allSELECTsubscriptionIdLists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to get the next page of virtual hard disks.
create_or_updateINSERTresourceGroupName, subscriptionId, virtualHardDiskNameThe operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation.
deleteDELETEresourceGroupName, subscriptionId, virtualHardDiskNameThe operation to delete a virtual hard disk.
updateUPDATEresourceGroupName, subscriptionId, virtualHardDiskNameThe operation to update a virtual hard disk.

SELECT examples

Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to get the next page of virtual hard disks.

SELECT
block_size_bytes,
container_id,
disk_file_format,
disk_size_gb,
dynamic,
extended_location,
hyper_v_generation,
location,
logical_sector_bytes,
physical_sector_bytes,
provisioning_state,
resourceGroupName,
status,
subscriptionId,
tags,
virtualHardDiskName
FROM azure_stack.azure_stack_hci.vw_virtual_hard_disks
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure_stack.azure_stack_hci.virtual_hard_disks (
resourceGroupName,
subscriptionId,
virtualHardDiskName,
properties,
extendedLocation,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualHardDiskName }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a virtual_hard_disks resource.

/*+ update */
UPDATE azure_stack.azure_stack_hci.virtual_hard_disks
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualHardDiskName = '{{ virtualHardDiskName }}';

DELETE example

Deletes the specified virtual_hard_disks resource.

/*+ delete */
DELETE FROM azure_stack.azure_stack_hci.virtual_hard_disks
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualHardDiskName = '{{ virtualHardDiskName }}';