From 8a9fa4911f069b84675705d3b580fa9f4aff5dbf Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Wed, 27 Jan 2021 15:52:17 -0500 Subject: [PATCH 1/2] bursting enabled --- src/Compute/Compute.Test/Compute.Test.csproj | 2 +- src/Compute/Compute/Compute.csproj | 2 +- .../Config/NewAzureRmDiskConfigCommand.cs | 7 ++++++- .../NewAzureRmDiskUpdateConfigCommand.cs | 7 +++++++ .../DiskEncryptionSetUpdateMethod.cs | 6 ++++-- .../Compute/Generated/Models/PSDisk.cs | 2 ++ .../Compute/Generated/Models/PSDiskUpdate.cs | 1 + src/Compute/Compute/help/New-AzDiskConfig.md | 19 +++++++++++++++++-- .../Compute/help/New-AzDiskUpdateConfig.md | 19 +++++++++++++++++-- src/Network/Network.Test/Network.Test.csproj | 2 +- .../RecoveryServices.Backup.Test.csproj | 2 +- .../RecoveryServices.SiteRecovery.Test.csproj | 2 +- .../SqlVirtualMachine.Test.csproj | 2 +- 13 files changed, 60 insertions(+), 13 deletions(-) diff --git a/src/Compute/Compute.Test/Compute.Test.csproj b/src/Compute/Compute.Test/Compute.Test.csproj index 4416592578a1..41174e31135a 100644 --- a/src/Compute/Compute.Test/Compute.Test.csproj +++ b/src/Compute/Compute.Test/Compute.Test.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Compute/Compute/Compute.csproj b/src/Compute/Compute/Compute.csproj index 3263b8796a25..0767590a10b1 100644 --- a/src/Compute/Compute/Compute.csproj +++ b/src/Compute/Compute/Compute.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs index d0597da232bb..a9f0792d2475 100644 --- a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs +++ b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs @@ -62,6 +62,10 @@ public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.Reso ValueFromPipelineByPropertyName = true)] public OperatingSystemTypes? OsType { get; set; } + [Parameter( + Mandatory = false)] + public SwitchParameter BurstingEnabled { get; set; } + [Parameter( Mandatory = false, Position = 2, @@ -377,7 +381,8 @@ private void Run() Encryption = vEncryption, NetworkAccessPolicy = this.IsParameterBound(c => c.NetworkAccessPolicy) ? this.NetworkAccessPolicy : null, DiskAccessId = this.IsParameterBound(c => c.DiskAccessId) ? this.DiskAccessId : null, - Tier = this.IsParameterBound(c => c.Tier) ? this.Tier : null + Tier = this.IsParameterBound(c => c.Tier) ? this.Tier : null, + BurstingEnabled = this.BurstingEnabled.IsPresent ? true : (bool?)null }; WriteObject(vDisk); diff --git a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs index db0f06bfcec7..fe8408b57786 100644 --- a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs +++ b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs @@ -127,8 +127,14 @@ public partial class NewAzureRmDiskUpdateConfigCommand : Microsoft.Azure.Command Mandatory = false, ValueFromPipelineByPropertyName = true)] [PSArgumentCompleter("EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerKey")] + public string EncryptionType { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true)] + public bool? BurstingEnabled { get; set; } + protected override void ProcessRecord() { if (ShouldProcess("DiskUpdate", "New")) @@ -245,6 +251,7 @@ private void Run() Encryption = vEncryption, Sku = vSku, Tier = this.IsParameterBound(c => c.Tier) ? this.Tier : null, + BurstingEnabled = this.IsParameterBound(c => c.BurstingEnabled) ? this.BurstingEnabled : null, }; WriteObject(vDiskUpdate); diff --git a/src/Compute/Compute/Generated/DiskEncryptionSet/DiskEncryptionSetUpdateMethod.cs b/src/Compute/Compute/Generated/DiskEncryptionSet/DiskEncryptionSetUpdateMethod.cs index d8d1f4b8d295..10f1adb8667b 100644 --- a/src/Compute/Compute/Generated/DiskEncryptionSet/DiskEncryptionSetUpdateMethod.cs +++ b/src/Compute/Compute/Generated/DiskEncryptionSet/DiskEncryptionSetUpdateMethod.cs @@ -147,7 +147,8 @@ private void BuildPatchObject() } if (this.DiskEncryptionSetUpdate.ActiveKey == null) { - this.DiskEncryptionSetUpdate.ActiveKey = new KeyVaultAndKeyReference(); + //this.DiskEncryptionSetUpdate.ActiveKey = new KeyVaultAndKeyReference(); + this.DiskEncryptionSetUpdate.ActiveKey = new KeyForDiskEncryptionSet(); } this.DiskEncryptionSetUpdate.ActiveKey.KeyUrl = this.KeyUrl; } @@ -160,7 +161,8 @@ private void BuildPatchObject() } if (this.DiskEncryptionSetUpdate.ActiveKey == null) { - this.DiskEncryptionSetUpdate.ActiveKey = new KeyVaultAndKeyReference(); + //this.DiskEncryptionSetUpdate.ActiveKey = new KeyVaultAndKeyReference(); + this.DiskEncryptionSetUpdate.ActiveKey = new KeyForDiskEncryptionSet(); } if (this.DiskEncryptionSetUpdate.ActiveKey.SourceVault == null) { diff --git a/src/Compute/Compute/Generated/Models/PSDisk.cs b/src/Compute/Compute/Generated/Models/PSDisk.cs index 79441d606470..2623065254ce 100644 --- a/src/Compute/Compute/Generated/Models/PSDisk.cs +++ b/src/Compute/Compute/Generated/Models/PSDisk.cs @@ -72,5 +72,7 @@ public string ResourceGroupName public string Tier { get; set; } + public bool? BurstingEnabled { get; set; } + } } diff --git a/src/Compute/Compute/Generated/Models/PSDiskUpdate.cs b/src/Compute/Compute/Generated/Models/PSDiskUpdate.cs index 8e72dccf495a..5b05dabcb920 100644 --- a/src/Compute/Compute/Generated/Models/PSDiskUpdate.cs +++ b/src/Compute/Compute/Generated/Models/PSDiskUpdate.cs @@ -42,6 +42,7 @@ public partial class PSDiskUpdate public string DiskAccessId { get; set; } public string Tier { get; set; } + public bool? BurstingEnabled { get; set; } } } diff --git a/src/Compute/Compute/help/New-AzDiskConfig.md b/src/Compute/Compute/help/New-AzDiskConfig.md index 29ca7514f4a5..41e94cd47719 100644 --- a/src/Compute/Compute/help/New-AzDiskConfig.md +++ b/src/Compute/Compute/help/New-AzDiskConfig.md @@ -14,8 +14,8 @@ Creates a configurable disk object. ``` New-AzDiskConfig [[-SkuName] ] [-Tier ] [-LogicalSectorSize ] - [[-OsType] ] [[-DiskSizeGB] ] [[-Location] ] [-Zone ] - [-HyperVGeneration ] [-DiskIOPSReadWrite ] [-DiskMBpsReadWrite ] + [[-OsType] ] [-BurstingEnabled] [[-DiskSizeGB] ] [[-Location] ] + [-Zone ] [-HyperVGeneration ] [-DiskIOPSReadWrite ] [-DiskMBpsReadWrite ] [-DiskIOPSReadOnly ] [-DiskMBpsReadOnly ] [-MaxSharesCount ] [-Tag ] [-CreateOption ] [-StorageAccountId ] [-ImageReference ] [-GalleryImageReference ] [-SourceUri ] [-SourceResourceId ] @@ -80,6 +80,21 @@ Create a disk from a Shared Gallery Image Version. Id is the id of the shared g ## PARAMETERS +### -BurstingEnabled +Enables bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -CreateOption Specifies whether this cmdlet creates a disk in the virtual machine from a platform or user image, creates an empty disk, or attaches an existing disk. diff --git a/src/Compute/Compute/help/New-AzDiskUpdateConfig.md b/src/Compute/Compute/help/New-AzDiskUpdateConfig.md index 21e64cb4524b..097da0c51b7a 100644 --- a/src/Compute/Compute/help/New-AzDiskUpdateConfig.md +++ b/src/Compute/Compute/help/New-AzDiskUpdateConfig.md @@ -18,8 +18,8 @@ New-AzDiskUpdateConfig [[-SkuName] ] [-Tier ] [-DiskIOPSReadOnly [[-OsType] ] [[-DiskSizeGB] ] [[-Tag] ] [-DiskIOPSReadWrite ] [-DiskMBpsReadWrite ] [-EncryptionSettingsEnabled ] [-DiskEncryptionKey ] [-KeyEncryptionKey ] - [-DiskEncryptionSetId ] [-EncryptionType ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-DiskEncryptionSetId ] [-EncryptionType ] [-BurstingEnabled ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -54,6 +54,21 @@ This command updates an existing disk with name 'Disk01' in resource group 'Reso ## PARAMETERS +### -BurstingEnabled +Enables bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + +```yaml +Type: System.Nullable`1[System.Boolean] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with azure. diff --git a/src/Network/Network.Test/Network.Test.csproj b/src/Network/Network.Test/Network.Test.csproj index 1924e706d9f9..cea5a0a553ba 100644 --- a/src/Network/Network.Test/Network.Test.csproj +++ b/src/Network/Network.Test/Network.Test.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Test/RecoveryServices.Backup.Test.csproj b/src/RecoveryServices/RecoveryServices.Backup.Test/RecoveryServices.Backup.Test.csproj index 1d7bde7b4a54..d02bbd584170 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Test/RecoveryServices.Backup.Test.csproj +++ b/src/RecoveryServices/RecoveryServices.Backup.Test/RecoveryServices.Backup.Test.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Test/RecoveryServices.SiteRecovery.Test.csproj b/src/RecoveryServices/RecoveryServices.SiteRecovery.Test/RecoveryServices.SiteRecovery.Test.csproj index 937d2f8ad4ca..d5d8890ceb8e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Test/RecoveryServices.SiteRecovery.Test.csproj +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Test/RecoveryServices.SiteRecovery.Test.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/SqlVirtualMachine/SqlVirtualMachine.Test/SqlVirtualMachine.Test.csproj b/src/SqlVirtualMachine/SqlVirtualMachine.Test/SqlVirtualMachine.Test.csproj index de5e21ffcd0f..1d32358aa001 100644 --- a/src/SqlVirtualMachine/SqlVirtualMachine.Test/SqlVirtualMachine.Test.csproj +++ b/src/SqlVirtualMachine/SqlVirtualMachine.Test/SqlVirtualMachine.Test.csproj @@ -15,7 +15,7 @@ - + From c6ae07db317d91a5961a65e4ae550dea02faf67d Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Wed, 27 Jan 2021 16:10:36 -0500 Subject: [PATCH 2/2] update --- src/Compute/Compute/ChangeLog.md | 1 + .../Disk/Config/NewAzureRmDiskConfigCommand.cs | 11 ++++++----- src/Compute/Compute/help/New-AzDiskConfig.md | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index b93f2ba3f372..fa719795331d 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -30,6 +30,7 @@ - `Remove-AzContainerService` - `Remove-AzContainerServiceAgentPoolProfile` - `Update-AzContainerService` +* Added parameter `-BurstingEnabled` to `New-AzDiskConfig` and `New-AzDiskUpdateConfig` ## Version 4.8.0 * New parameter `VM` in new parameter set `VMParameterSet` added to `Get-AzVMDscExtensionStatus` and `Get-AzVMDscExtension` cmdlets. diff --git a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs index a9f0792d2475..3ed18b2cf1a9 100644 --- a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs +++ b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs @@ -62,10 +62,6 @@ public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.Reso ValueFromPipelineByPropertyName = true)] public OperatingSystemTypes? OsType { get; set; } - [Parameter( - Mandatory = false)] - public SwitchParameter BurstingEnabled { get; set; } - [Parameter( Mandatory = false, Position = 2, @@ -192,6 +188,11 @@ public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.Reso [PSArgumentCompleter("AllowAll", "AllowPrivate", "DenyAll")] public string NetworkAccessPolicy { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true)] + public bool? BurstingEnabled { get; set; } + protected override void ProcessRecord() { if (ShouldProcess("Disk", "New")) @@ -382,7 +383,7 @@ private void Run() NetworkAccessPolicy = this.IsParameterBound(c => c.NetworkAccessPolicy) ? this.NetworkAccessPolicy : null, DiskAccessId = this.IsParameterBound(c => c.DiskAccessId) ? this.DiskAccessId : null, Tier = this.IsParameterBound(c => c.Tier) ? this.Tier : null, - BurstingEnabled = this.BurstingEnabled.IsPresent ? true : (bool?)null + BurstingEnabled = this.IsParameterBound(c => c.BurstingEnabled) ? this.BurstingEnabled : null, }; WriteObject(vDisk); diff --git a/src/Compute/Compute/help/New-AzDiskConfig.md b/src/Compute/Compute/help/New-AzDiskConfig.md index 41e94cd47719..dfd33ec3a25e 100644 --- a/src/Compute/Compute/help/New-AzDiskConfig.md +++ b/src/Compute/Compute/help/New-AzDiskConfig.md @@ -14,7 +14,7 @@ Creates a configurable disk object. ``` New-AzDiskConfig [[-SkuName] ] [-Tier ] [-LogicalSectorSize ] - [[-OsType] ] [-BurstingEnabled] [[-DiskSizeGB] ] [[-Location] ] + [[-OsType] ] [[-DiskSizeGB] ] [[-Location] ] [-Zone ] [-HyperVGeneration ] [-DiskIOPSReadWrite ] [-DiskMBpsReadWrite ] [-DiskIOPSReadOnly ] [-DiskMBpsReadOnly ] [-MaxSharesCount ] [-Tag ] [-CreateOption ] [-StorageAccountId ] [-ImageReference ] @@ -22,7 +22,7 @@ New-AzDiskConfig [[-SkuName] ] [-Tier ] [-LogicalSectorSize ] [-EncryptionSettingsEnabled ] [-DiskEncryptionKey ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-DiskAccessId ] - [-NetworkAccessPolicy ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NetworkAccessPolicy ] [-BurstingEnabled ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -84,14 +84,14 @@ Create a disk from a Shared Gallery Image Version. Id is the id of the shared g Enables bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. ```yaml -Type: System.Management.Automation.SwitchParameter +Type: System.Nullable`1[System.Boolean] Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ```