Skip to content

Commit 99de7c9

Browse files
committed
Add LocationCompleter to Resources cmdlets
1 parent 5bed387 commit 99de7c9

File tree

6 files changed

+8
-0
lines changed

6 files changed

+8
-0
lines changed

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ManagedApplications/NewAzureManagedApplication.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public class NewAzureManagedApplicationCmdlet : ManagedApplicationCmdletBase
6767
/// Gets or sets the location.
6868
/// </summary>
6969
[Parameter(Mandatory = true, HelpMessage = "The resource location.")]
70+
[LocationCompleter("Microsoft.Solutions/applications")]
7071
[ValidateNotNullOrEmpty]
7172
public string Location { get; set; }
7273

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ManagedApplications/NewAzureManagedApplicationDefinition.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public class NewAzureManagedApplicationDefinitionCmdlet : ManagedApplicationCmdl
6262
/// Gets or sets the location.
6363
/// </summary>
6464
[Parameter(Mandatory = true, HelpMessage = "The resource location.")]
65+
[LocationCompleter("Microsoft.Solutions/applicationDefinitions")]
6566
[ValidateNotNullOrEmpty]
6667
public string Location { get; set; }
6768

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Providers/GetAzureProviderCmdlet.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
17+
using Common.ArgumentCompleters;
1718
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
1819
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
1920
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkExtensions;
@@ -50,6 +51,7 @@ public class GetAzureProviderCmdlet : ResourceManagerCmdletBase
5051
/// Gets or sets the provider namespace
5152
/// </summary>
5253
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "The location to look for provider namespace.")]
54+
[LocationCompleter("Microsoft.Resources/resourceGroups")]
5355
[ValidateNotNullOrEmpty]
5456
public string Location { get; set; }
5557

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/NewAzureResourceCmdlet.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
17+
using Common.ArgumentCompleters;
1718
using Common.Tags;
1819
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1920
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
@@ -34,6 +35,7 @@ public sealed class NewAzureResourceCmdlet : ResourceManipulationCmdletBase
3435
/// Gets or sets the location.
3536
/// </summary>
3637
[Parameter(Mandatory = false, HelpMessage = "The resource location.")]
38+
[LocationCompleter("Microsoft.Resources/resourceGroups")]
3739
[ValidateNotNullOrEmpty]
3840
public string Location { get; set; }
3941

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceGroups/GetAzureResourceGroupCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class GetAzureResourceGroupCmdlet : ResourceManagerCmdletBase
4848
public string Name { get; set; }
4949

5050
[Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group location.")]
51+
[LocationCompleter("Microsoft.Resources/resourceGroups")]
5152
[ValidateNotNullOrEmpty]
5253
public string Location { get; set; }
5354

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceGroups/NewAzureResourceGroupCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public class NewAzureResourceGroupCmdlet : ResourceManagerCmdletBase
3333
public string Name { get; set; }
3434

3535
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group location.")]
36+
[LocationCompleter("Microsoft.Resources/resourceGroups")]
3637
[ValidateNotNullOrEmpty]
3738
public string Location { get; set; }
3839

0 commit comments

Comments
 (0)