Partager via


Microsoft.AzureStackHCI virtualHardDisks 2025-02-01-preview

Bicep resource definition

The virtualHardDisks resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.AzureStackHCI/virtualHardDisks resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.AzureStackHCI/virtualHardDisks@2025-02-01-preview' = {
  extendedLocation: {
    name: 'string'
    type: 'string'
  }
  location: 'string'
  name: 'string'
  properties: {
    blockSizeBytes: int
    containerId: 'string'
    createFromLocal: bool
    diskFileFormat: 'string'
    diskSizeGB: int
    downloadUrl: 'string'
    dynamic: bool
    hyperVGeneration: 'string'
    logicalSectorBytes: int
    physicalSectorBytes: int
  }
  tags: {
    {customized property}: 'string'
  }
}

Property Values

ExtendedLocation

Name Description Value
name The name of the extended location. string
type The type of the extended location. 'CustomLocation'

Microsoft.AzureStackHCI/virtualHardDisks

Name Description Value
extendedLocation The extendedLocation of the resource. ExtendedLocation
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$ (required)
properties The resource-specific properties for this resource. VirtualHardDiskProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates

TrackedResourceTags

Name Description Value

VirtualHardDiskProperties

Name Description Value
blockSizeBytes Block size in bytes int
containerId Storage ContainerID of the storage container to be used for VHD string
createFromLocal Boolean indicating whether it is an existing local hard disk or if one should be created. bool
diskFileFormat The format of the actual VHD file [vhd, vhdx] 'vhd'
'vhdx'
diskSizeGB Size of the disk in GB int
downloadUrl URL for downloading or accessing the virtual hard disk. This URL points to a secure link from where the VHD can be downloaded or accessed directly. string

Constraints:
Sensitive value. Pass in as a secure parameter.
dynamic Boolean for enabling dynamic sizing on the virtual hard disk bool
hyperVGeneration The hypervisor generation of the Virtual Machine [V1, V2] 'V1'
'V2'
logicalSectorBytes Logical sector in bytes int
physicalSectorBytes Physical sector in bytes int

ARM template resource definition

The virtualHardDisks resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.AzureStackHCI/virtualHardDisks resource, add the following JSON to your template.

{
  "type": "Microsoft.AzureStackHCI/virtualHardDisks",
  "apiVersion": "2025-02-01-preview",
  "name": "string",
  "extendedLocation": {
    "name": "string",
    "type": "string"
  },
  "location": "string",
  "properties": {
    "blockSizeBytes": "int",
    "containerId": "string",
    "createFromLocal": "bool",
    "diskFileFormat": "string",
    "diskSizeGB": "int",
    "downloadUrl": "string",
    "dynamic": "bool",
    "hyperVGeneration": "string",
    "logicalSectorBytes": "int",
    "physicalSectorBytes": "int"
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property Values

ExtendedLocation

Name Description Value
name The name of the extended location. string
type The type of the extended location. 'CustomLocation'

Microsoft.AzureStackHCI/virtualHardDisks

Name Description Value
apiVersion The api version '2025-02-01-preview'
extendedLocation The extendedLocation of the resource. ExtendedLocation
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$ (required)
properties The resource-specific properties for this resource. VirtualHardDiskProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.AzureStackHCI/virtualHardDisks'

TrackedResourceTags

Name Description Value

VirtualHardDiskProperties

Name Description Value
blockSizeBytes Block size in bytes int
containerId Storage ContainerID of the storage container to be used for VHD string
createFromLocal Boolean indicating whether it is an existing local hard disk or if one should be created. bool
diskFileFormat The format of the actual VHD file [vhd, vhdx] 'vhd'
'vhdx'
diskSizeGB Size of the disk in GB int
downloadUrl URL for downloading or accessing the virtual hard disk. This URL points to a secure link from where the VHD can be downloaded or accessed directly. string

Constraints:
Sensitive value. Pass in as a secure parameter.
dynamic Boolean for enabling dynamic sizing on the virtual hard disk bool
hyperVGeneration The hypervisor generation of the Virtual Machine [V1, V2] 'V1'
'V2'
logicalSectorBytes Logical sector in bytes int
physicalSectorBytes Physical sector in bytes int

Exemples d’utilisation

Terraform (AzAPI provider) resource definition

The virtualHardDisks resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.AzureStackHCI/virtualHardDisks resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.AzureStackHCI/virtualHardDisks@2025-02-01-preview"
  name = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    extendedLocation = {
      name = "string"
      type = "string"
    }
    properties = {
      blockSizeBytes = int
      containerId = "string"
      createFromLocal = bool
      diskFileFormat = "string"
      diskSizeGB = int
      downloadUrl = "string"
      dynamic = bool
      hyperVGeneration = "string"
      logicalSectorBytes = int
      physicalSectorBytes = int
    }
  }
}

Property Values

ExtendedLocation

Name Description Value
name The name of the extended location. string
type The type of the extended location. 'CustomLocation'

Microsoft.AzureStackHCI/virtualHardDisks

Name Description Value
extendedLocation The extendedLocation of the resource. ExtendedLocation
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$ (required)
properties The resource-specific properties for this resource. VirtualHardDiskProperties
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.AzureStackHCI/virtualHardDisks@2025-02-01-preview"

TrackedResourceTags

Name Description Value

VirtualHardDiskProperties

Name Description Value
blockSizeBytes Block size in bytes int
containerId Storage ContainerID of the storage container to be used for VHD string
createFromLocal Boolean indicating whether it is an existing local hard disk or if one should be created. bool
diskFileFormat The format of the actual VHD file [vhd, vhdx] 'vhd'
'vhdx'
diskSizeGB Size of the disk in GB int
downloadUrl URL for downloading or accessing the virtual hard disk. This URL points to a secure link from where the VHD can be downloaded or accessed directly. string

Constraints:
Sensitive value. Pass in as a secure parameter.
dynamic Boolean for enabling dynamic sizing on the virtual hard disk bool
hyperVGeneration The hypervisor generation of the Virtual Machine [V1, V2] 'V1'
'V2'
logicalSectorBytes Logical sector in bytes int
physicalSectorBytes Physical sector in bytes int