Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-AzDiskUpdateConfig
- Module:
- Az.Compute Module
Creates a configurable disk update object.
Syntax
Default (Default)
New-AzDiskUpdateConfig
[[-SkuName] <String>]
[-Tier <String>]
[-DiskIOPSReadOnly <Int64>]
[-DiskMBpsReadOnly <Int64>]
[-MaxSharesCount <Int32>]
[-NetworkAccessPolicy <String>]
[-DiskAccessId <String>]
[[-OsType] <OperatingSystemTypes>]
[[-DiskSizeGB] <Int32>]
[[-Tag] <Hashtable>]
[-DiskIOPSReadWrite <Int32>]
[-DiskMBpsReadWrite <Int32>]
[-PurchasePlan <PSPurchasePlan>]
[-SupportsHibernation <Boolean>]
[-EncryptionSettingsEnabled <Boolean>]
[-DiskEncryptionKey <KeyVaultAndSecretReference>]
[-KeyEncryptionKey <KeyVaultAndKeyReference>]
[-DiskEncryptionSetId <String>]
[-EncryptionType <String>]
[-BurstingEnabled <Boolean>]
[-PublicNetworkAccess <String>]
[-AcceleratedNetwork <Boolean>]
[-DataAccessAuthMode <String>]
[-ActionOnDiskDelay <String>]
[-Architecture <String>]
[-SupportedSecurityOption <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzDiskUpdateConfig cmdlet creates a configurable disk update object.
Examples
Example 1
$diskupdateconfig = New-AzDiskUpdateConfig -DiskSizeGB 10 -SkuName Premium_LRS -OsType Windows -EncryptionSettingsEnabled $true;
$secretUrl = 'https://myvault.vault-int.azure-int.net/secrets/123/';
$secretId = '/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.KeyVault/vaults/TestVault123';
$keyUrl = 'https://myvault.vault-int.azure-int.net/keys/456';
$keyId = '/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.KeyVault/vaults/TestVault456';
$diskupdateconfig = Set-AzDiskUpdateDiskEncryptionKey -DiskUpdate $diskupdateconfig -SecretUrl $secretUrl -SourceVaultId $secretId;
$diskupdateconfig = Set-AzDiskUpdateKeyEncryptionKey -DiskUpdate $diskupdateconfig -KeyUrl $keyUrl -SourceVaultId $keyId;
Update-AzDisk -ResourceGroupName 'ResourceGroup01' -DiskName 'Disk01' -DiskUpdate $diskupdateconfig;
The first command creates a local empty disk update object with size 10GB in Premium_LRS storage account type. It also sets Windows OS type and enables encryption settings. The second and third commands set the disk encryption key and key encryption key settings for the disk update object. The last command takes the disk update object and updates an existing disk with name 'Disk01' in resource group 'ResourceGroup01'.
Example 2
New-AzDiskUpdateConfig -DiskSizeGB 10 | Update-AzDisk -ResourceGroupName 'ResourceGroup01' -DiskName 'Disk01';
This command updates an existing disk with name 'Disk01' in resource group 'ResourceGroup01' to 10 GB disk size.
Parameters
-AcceleratedNetwork
True if the image from which the OS disk is created supports accelerated networking.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ActionOnDiskDelay
Specifies how to handle disks with slow I/O. Allowed values are 'None' and 'AutomaticReattach'.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Architecture
CPU architecture supported by an OS disk. Possible values are "X64" and "Arm64".
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-BurstingEnabled
Enables bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DataAccessAuthMode
Additional authentication requirements when exporting or uploading to a disk or snapshot.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-DiskAccessId
ARM id of the DiskAccess resource for using private endpoints on disks
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DiskEncryptionKey
Specifies the disk encryption key object on a disk.
Parameter properties
| Type: | KeyVaultAndSecretReference |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DiskEncryptionSetId
Specifies the resource Id of the disk encryption set to use for enabling encryption at rest.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DiskIOPSReadOnly
The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DiskIOPSReadWrite
The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DiskMBpsReadOnly
The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DiskMBpsReadWrite
The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DiskSizeGB
Specifies the size of the disk in GB.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-EncryptionSettingsEnabled
Enable encryption settings on the disk
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-EncryptionType
The type of key used to encrypt the data of the disk. Available values are: EncryptionAtRestWithPlatformKey, EncryptionAtRestWithCustomerKey
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-KeyEncryptionKey
Specifies the Key encryption key on a disk.
Parameter properties
| Type: | KeyVaultAndKeyReference |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-MaxSharesCount
The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-NetworkAccessPolicy
Policy for accessing the disk via network. Available values are: AllowAll, AllowPrivate, DenyAll
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-OsType
Specifies the OS type.
Parameter properties
| Type: | |
| Default value: | None |
| Accepted values: | Windows, Linux |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PublicNetworkAccess
Policy for controlling export on the disk.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PurchasePlan
Sets the purchase plan for the disk. Used for establishing the purchase context of any 3rd Party artifact through Marketplace.
Parameter properties
| Type: | PSPurchasePlan |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SkuName
Specifies the Sku name of the storage account. Available values are Standard_LRS, Premium_LRS, StandardSSD_LRS, and UltraSSD_LRS. UltraSSD_LRS can only be used with Empty value for CreateOption parameter.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AccountType |
Parameter sets
-SupportsHibernation
Indicates if the OS on the disk supports hibernation with $true or $false
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}
Parameter properties
| Type: | Hashtable |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Tier
Performance tier of the disk.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
Nullable<T>
Int32
Hashtable
Nullable<T>
KeyVaultAndSecretReference
KeyVaultAndKeyReference
Outputs
PSDiskUpdate
Azure PowerShell
Feedback
Was this page helpful?
