Skip to content

Added missing validators and completers in Deployment Stacks cmdlets. #23817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class NewAzManagementGroupDeploymentStack : DeploymentStacksCreateCmdletB

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true,
HelpMessage = "Location of the stack")]
[ValidateNotNullOrEmpty]
public string Location { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Signal to delete both unmanaged Resources and ResourceGroups after updating stack.")]
Expand Down Expand Up @@ -83,8 +84,7 @@ public class NewAzManagementGroupDeploymentStack : DeploymentStacksCreateCmdletB
[Parameter(Mandatory = false, HelpMessage = "The tags to put on the deployment.")]
public Hashtable Tag { get; set; }

[Parameter(Mandatory = false,
HelpMessage = "Do not ask for confirmation when overwriting an existing stack.")]
[Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation when overwriting an existing stack.")]
public SwitchParameter Force { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.CmdletBase;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
using Microsoft.Azure.Management.Resources.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
Expand Down Expand Up @@ -45,6 +46,7 @@ public class NewAzSubscriptionDeploymentStack : DeploymentStacksCreateCmdletBase

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true,
HelpMessage = "Location of the stack.")]
[ValidateNotNullOrEmpty]
public string Location { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Signal to delete both resources and resource groups after updating stack.")]
Expand All @@ -69,16 +71,16 @@ public class NewAzSubscriptionDeploymentStack : DeploymentStacksCreateCmdletBase
[Parameter(Mandatory = false, HelpMessage = "Apply to child scopes.")]
public SwitchParameter DenySettingsApplyToChildScopes { get; set; }

[Parameter(Mandatory = false,
HelpMessage = "The ResourceGroup at which the deployment will be created. If none is specified, it will default to the " +
"subscription level scope of the deployment stack.")]
[Parameter(Mandatory = false, HelpMessage = "The ResourceGroup at which the deployment will be created. If none is specified, " +
"it will default to the subscription level scope of the deployment stack.")]
[ResourceGroupCompleter]
[ValidateNotNullOrEmpty]
public string DeploymentResourceGroupName { get; set; }

[Parameter(Mandatory = false, HelpMessage = "The tags to put on the deployment.")]
public Hashtable Tag { get; set; }

[Parameter(Mandatory = false,
HelpMessage = "Do not ask for confirmation when overwriting an existing stack.")]
[Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation when overwriting an existing stack.")]
public SwitchParameter Force { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.CmdletBase;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
using Microsoft.Azure.Management.Resources.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
Expand Down Expand Up @@ -46,11 +47,14 @@ public class SetAzSubscriptionDeploymentStack : DeploymentStacksCreateCmdletBase

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true,
HelpMessage = "Location of the stack.")]
[ValidateNotNullOrEmpty]
public string Location { get; set; }

[Parameter(Mandatory = false,
HelpMessage = "The ResourceGroup at which the deployment will be created. If none is specified, it will default to the " +
"subscription level scope of the deployment stack.")]
[ResourceGroupCompleter]
[ValidateNotNullOrEmpty]
public string DeploymentResourceGroupName { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Signal to delete both unmanaged Resources and ResourceGroups after deleting stack.")]
Expand Down
Loading