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

The following fields are returned by SELECT queries:

NameDatatypeDescription
extendedLocationobjectThe extendedLocation of the resource.
locationstringThe geo-location where the resource lives
propertiesobjectProperties under the virtual hard disk resource
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, virtualHardDiskNameGets a virtual hard disk
listselectsubscriptionId, resourceGroupNameLists 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_updateinsertsubscriptionId, resourceGroupName, virtualHardDiskNameThe operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation.
updateupdatesubscriptionId, resourceGroupName, virtualHardDiskNameThe operation to update a virtual hard disk.
deletedeletesubscriptionId, resourceGroupName, virtualHardDiskNameThe operation to delete a virtual hard disk.

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
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
virtualHardDiskNamestringName of the virtual hard disk

SELECT examples

Gets a virtual hard disk

SELECT
extendedLocation,
location,
properties,
tags
FROM azure_stack.azure_stack_hci.virtual_hard_disks
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND virtualHardDiskName = '{{ virtualHardDiskName }}' -- required
;

INSERT examples

The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation.

INSERT INTO azure_stack.azure_stack_hci.virtual_hard_disks (
data__properties,
data__extendedLocation,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
virtualHardDiskName
)
SELECT
'{{ properties }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ virtualHardDiskName }}'
RETURNING
extendedLocation,
location,
properties,
tags
;

UPDATE examples

The operation to update a virtual hard disk.

UPDATE azure_stack.azure_stack_hci.virtual_hard_disks
SET
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND virtualHardDiskName = '{{ virtualHardDiskName }}' --required
RETURNING
extendedLocation,
location,
properties,
tags;

DELETE examples

The operation to delete a virtual hard disk.

DELETE FROM azure_stack.azure_stack_hci.virtual_hard_disks
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND virtualHardDiskName = '{{ virtualHardDiskName }}' --required
;