Skip to content

Commit 4bf0c5d

Browse files
committed
Keep AssignIdentity parameter with a new parameter set.
1 parent a96b0a9 commit 4bf0c5d

File tree

6 files changed

+34
-56
lines changed

6 files changed

+34
-56
lines changed

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
namespace Microsoft.Azure.Commands.Compute.Automation
3131
{
32-
[Cmdlet("New", "AzureRmVmssConfig", SupportsShouldProcess = true)]
32+
[Cmdlet("New", "AzureRmVmssConfig", SupportsShouldProcess = true, DefaultParameterSetName = "DefaultParameterSet")]
3333
[OutputType(typeof(PSVirtualMachineScaleSet))]
3434
public partial class NewAzureRmVmssConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
3535
{

src/ResourceManager/Compute/Commands.Compute/Manual/NewAzureRmVmssConfigCommand.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ namespace Microsoft.Azure.Commands.Compute.Automation
2626
{
2727
public partial class NewAzureRmVmssConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
2828
{
29-
3029
[Parameter(
31-
Mandatory = false)]
32-
[Obsolete("This parameter is obsolete. Please use IdentityType parameter instead.", false)]
30+
Mandatory = true,
31+
ParameterSetName = "AssignIdentityParameterSet")]
3332
public SwitchParameter AssignIdentity { get; set; }
34-
3533
}
3634
}
3735

src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/NewAzureVMConfigCommand.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ namespace Microsoft.Azure.Commands.Compute
2323
{
2424
[Cmdlet(
2525
VerbsCommon.New,
26-
ProfileNouns.VirtualMachineConfig),
26+
ProfileNouns.VirtualMachineConfig,
27+
DefaultParameterSetName = "DefaultParameterSet"),
2728
OutputType(
2829
typeof(PSVirtualMachine))]
2930
public class NewAzureVMConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
@@ -65,9 +66,10 @@ public class NewAzureVMConfigCommand : Microsoft.Azure.Commands.ResourceManager.
6566
public ResourceIdentityType? IdentityType { get; set; }
6667

6768
[Parameter(
69+
Mandatory = true,
70+
ParameterSetName = "AssignIdentityParameterSet",
6871
ValueFromPipelineByPropertyName = false)]
6972
[ValidateNotNullOrEmpty]
70-
[Obsolete("This parameter is obsolete. Use IdentityType parameter instead.", false)]
7173
public SwitchParameter AssignIdentity { get; set; }
7274

7375
[Parameter(

src/ResourceManager/Compute/Commands.Compute/help/New-AzureRmVMConfig.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ Creates a configurable virtual machine object.
1313

1414
## SYNTAX
1515

16+
### DefaultParameterSet (Default)
17+
```
18+
New-AzureRmVMConfig [-VMName] <String> [-VMSize] <String> [[-AvailabilitySetId] <String>]
19+
[[-LicenseType] <String>] [[-IdentityType] <ResourceIdentityType>] [-IdentityId <String[]>] [-Zone <String[]>]
20+
[-Tags <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
21+
```
22+
23+
### AssignIdentityParameterSet
1624
```
1725
New-AzureRmVMConfig [-VMName] <String> [-VMSize] <String> [[-AvailabilitySetId] <String>]
1826
[[-LicenseType] <String>] [[-IdentityType] <ResourceIdentityType>] [-AssignIdentity] [-IdentityId <String[]>]
@@ -44,10 +52,10 @@ Specify the system assigned identity for the virtual machine.
4452

4553
```yaml
4654
Type: SwitchParameter
47-
Parameter Sets: (All)
55+
Parameter Sets: AssignIdentityParameterSet
4856
Aliases:
4957

50-
Required: False
58+
Required: True
5159
Position: Named
5260
Default value: None
5361
Accept pipeline input: False

src/ResourceManager/Compute/Commands.Compute/help/New-AzureRmVmssConfig.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@ Creates a VMSS configuration object.
1313

1414
## SYNTAX
1515

16+
### DefaultParameterSet (Default)
17+
```
18+
New-AzureRmVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [[-Tag] <Hashtable>]
19+
[[-SkuName] <String>] [[-SkuTier] <String>] [[-SkuCapacity] <Int32>] [[-UpgradePolicyMode] <UpgradeMode>]
20+
[[-OsProfile] <VirtualMachineScaleSetOSProfile>] [[-StorageProfile] <VirtualMachineScaleSetStorageProfile>]
21+
[[-NetworkInterfaceConfiguration] <VirtualMachineScaleSetNetworkConfiguration[]>]
22+
[[-Extension] <VirtualMachineScaleSetExtension[]>] [-SinglePlacementGroup <Boolean>] [-Zone <String[]>]
23+
[-PlanName <String>] [-PlanPublisher <String>] [-PlanProduct <String>] [-PlanPromotionCode <String>]
24+
[-RollingUpgradePolicy <RollingUpgradePolicy>] [-AutoOSUpgrade] [-HealthProbeId <String>]
25+
[-BootDiagnostic <BootDiagnostics>] [-LicenseType <String>] [-Priority <String>]
26+
[-IdentityType <ResourceIdentityType>] [-IdentityId <String[]>] [-DefaultProfile <IAzureContextContainer>]
27+
[-WhatIf] [-Confirm] [<CommonParameters>]
28+
```
29+
30+
### AssignIdentityParameterSet
1631
```
1732
New-AzureRmVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [[-Tag] <Hashtable>]
1833
[[-SkuName] <String>] [[-SkuTier] <String>] [[-SkuCapacity] <Int32>] [[-UpgradePolicyMode] <UpgradeMode>]
@@ -63,10 +78,10 @@ Specify the system assigned identity for the virtual machine scale set.
6378

6479
```yaml
6580
Type: SwitchParameter
66-
Parameter Sets: (All)
81+
Parameter Sets: AssignIdentityParameterSet
6782
Aliases:
6883

69-
Required: False
84+
Required: True
7085
Position: Named
7186
Default value: None
7287
Accept pipeline input: False

src/ResourceManager/Compute/documentation/upcoming-breaking-changes.md

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,9 @@
1-
<!--
2-
Please leave this section at the top of the breaking change documentation.
3-
4-
New breaking changes should go under the section titled "Upcoming Breaking Changes", and should adhere to the following format:
5-
6-
# Upcoming Breaking Changes
7-
8-
## Release X.0.0 - January 2017
9-
10-
The following cmdlets were affected this release:
11-
12-
**Cmdlet 1**
13-
- Description of what has changed
14-
15-
```powershell
16-
# Old
17-
# Sample of how the cmdlet was previously called
18-
19-
# New
20-
# Sample of how the cmdlet should now be called
21-
```
22-
23-
Note: the above section follows the template found in the link below:
24-
25-
https://github.com/Azure/azure-powershell/blob/dev/documentation/breaking-changes/breaking-change-template.md
26-
-->
27-
281
# Upcoming Breaking Changes
292

303
## Release X.0.0 - May 2018
314

325
The following cmdlets were affected this release:
336

34-
**New-AzureRmVMConfig**
35-
**Update-AzureRmVM**
36-
**New-AzureRmVmssConfig**
37-
- Switch parameter, AssignIdentity, will be replaced with IdentityType parameter which takes a value from 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssinged', and 'None'.
38-
Previously, only 'SystemAssigned' identity type was available, and AssignIdentity parameter sets 'SystemAssigned' identity.
39-
Now, more types of identities are available, so new parameter 'IdentityType' is introduced and will replace 'AssignIdentity' parameter.
40-
41-
```powershell
42-
# Old
43-
# New-AzureRmVMConfig -AssignIdentity
44-
# New-AzureRmVmssConfig -AssignIdentity
45-
46-
47-
# New
48-
# New-AzureRmVMConfig -IdentityType 'SystemAssigned'
49-
# New-AzureRmVmssConfig -IdentityType 'SystemAssigned'
50-
```
51-
527
**New-AzureRmAvailabilitySet**
538
- Switch parameter, Managed, will be replaced with Sku parameter.
549
In order to set a managed availability set, a user should give Sku parameter with 'Aligned' value.

0 commit comments

Comments
 (0)