Skip to content

Commit 7ff1390

Browse files
committed
added parameter set
1 parent b4aea1b commit 7ff1390

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Network/Network/ApplicationGateway/NewAzureApplicationGatewayCommand.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
namespace Microsoft.Azure.Commands.Network
2626
{
27-
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ApplicationGateway", SupportsShouldProcess = true), OutputType(typeof(PSApplicationGateway))]
27+
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ApplicationGateway", DefaultParameterSetName = "IdentityByUserAssignedIdentityId", SupportsShouldProcess = true), OutputType(typeof(PSApplicationGateway))]
2828
public class NewAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet
2929
{
3030
[Alias("ResourceName")]
@@ -183,6 +183,7 @@ public class NewAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet
183183
public Hashtable Tag { get; set; }
184184

185185
[Parameter(
186+
ParameterSetName = "IdentityByUserAssignedIdentityId",
186187
Mandatory = false,
187188
ValueFromPipelineByPropertyName = true,
188189
HelpMessage = "ResourceId of the user assigned identity to be assigned to Application Gateway.")]
@@ -191,7 +192,8 @@ public class NewAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet
191192
public string UserAssignedIdentityId { get; set; }
192193

193194
[Parameter(
194-
Mandatory = false,
195+
ParameterSetName = "IdentityByIdentityObject",
196+
Mandatory = true,
195197
ValueFromPipelineByPropertyName = true,
196198
HelpMessage = "Application Gateway Identity to be assigned to Application Gateway.")]
197199
[ValidateNotNullOrEmpty]

0 commit comments

Comments
 (0)