Skip to content

Commit 96a3e1d

Browse files
grizzlytheodoreTheodore Chang
andauthored
-PerformancePlus for New-AzDiskConfig (#20937)
* add it to New-AzDiskConfig * help doc and change log * suppress false positive --------- Co-authored-by: Theodore Chang <[email protected]>
1 parent 884d4b1 commit 96a3e1d

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
-->
2222
## Upcoming Release
23+
* Added `-PerformancePlus` parameter to `New-AzDiskConfig`
2324

2425
## Version 5.4.0
2526
* Added `-SkipIdentity`, `-PathUserIdentity`, `-IsTest` parameter to `Set-AzVMAEMExtension`

src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,12 @@ public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.Reso
242242
[PSArgumentCompleter("X64", "Arm64")]
243243
public string Architecture { get; set; }
244244

245+
[Parameter(
246+
Mandatory = false,
247+
ValueFromPipelineByPropertyName = true,
248+
HelpMessage = "Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.")]
249+
public bool? PerformancePlus { get; set; }
250+
245251
protected override void ProcessRecord()
246252
{
247253
if (ShouldProcess("Disk", "New"))
@@ -351,6 +357,15 @@ private void Run()
351357
vCreationData.LogicalSectorSize = this.LogicalSectorSize;
352358
}
353359

360+
if (this.IsParameterBound(c => c.PerformancePlus))
361+
{
362+
if (vCreationData == null)
363+
{
364+
vCreationData = new CreationData();
365+
}
366+
vCreationData.PerformancePlus = this.PerformancePlus;
367+
}
368+
354369
if (this.IsParameterBound(c => c.EncryptionSettingsEnabled))
355370
{
356371
if (vEncryptionSettingsCollection == null)

src/Compute/Compute/help/New-AzDiskConfig.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ New-AzDiskConfig [[-SkuName] <String>] [-Tier <String>] [-LogicalSectorSize <Int
2525
[-DiskEncryptionSetId <String>] [-EncryptionType <String>] [-DiskAccessId <String>]
2626
[-NetworkAccessPolicy <String>] [-BurstingEnabled <Boolean>] [-PublicNetworkAccess <String>]
2727
[-AcceleratedNetwork <Boolean>] [-DataAccessAuthMode <String>] [-Architecture <String>]
28-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
28+
[-PerformancePlus <Boolean>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
29+
[<CommonParameters>]
2930
```
3031

3132
## DESCRIPTION
@@ -484,6 +485,21 @@ Accept pipeline input: True (ByPropertyName)
484485
Accept wildcard characters: False
485486
```
486487
488+
### -PerformancePlus
489+
Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.
490+
491+
```yaml
492+
Type: System.Nullable`1[System.Boolean]
493+
Parameter Sets: (All)
494+
Aliases:
495+
496+
Required: False
497+
Position: Named
498+
Default value: None
499+
Accept pipeline input: True (ByPropertyName)
500+
Accept wildcard characters: False
501+
```
502+
487503
### -PublicNetworkAccess
488504
Policy for controlling export on the disk.
489505

tools/StaticAnalysis/Exceptions/Az.Compute/SignatureIssues.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,4 @@
156156
"Az.Compute","Get-AzGalleryApplication","Get-AzGalleryApplication","2","8200","Get-AzGalleryApplication changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact."
157157
"Az.Compute","Get-AzGalleryApplicationVersion","Get-AzGalleryApplicationVersion","2","8010","Get-AzGalleryApplicationVersion Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
158158
"Az.Compute","Get-AzGalleryApplicationVersion","Get-AzGalleryApplicationVersion","2","8200","Get-AzGalleryApplicationVersion changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact."
159+
"Az.Compute","Microsoft.Azure.Commands.Compute.Automation.NewAzureRmDiskConfigCommand","New-AzDiskConfig","1","8410","Parameter PerformancePlus of cmdlet New-AzDiskConfig does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."

0 commit comments

Comments
 (0)