Skip to content

Commit fd415ae

Browse files
author
maddieclayton
authored
Merge pull request #5039 from maddieclayton/addLC1
Add LocationCompleter to cmdlets
2 parents 334ce89 + 702f3d0 commit fd415ae

File tree

116 files changed

+135
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+135
-8
lines changed

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AddAzureApiManagementRegion.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
19+
using ResourceManager.Common.ArgumentCompleters;
1920
using System.Management.Automation;
2021

2122
[Cmdlet(VerbsCommon.Add, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))]
@@ -32,7 +33,7 @@ public class AddAzureApiManagementRegion : AzureApiManagementCmdletBase
3233
ValueFromPipelineByPropertyName = false,
3334
Mandatory = true,
3435
HelpMessage = "Location of the new deployment region.")]
35-
36+
[LocationCompleter("Microsoft.ApiManagement/service")]
3637
[ValidateNotNullOrEmpty]
3738
public string Location { get; set; }
3839

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagement.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class NewAzureApiManagement : AzureApiManagementCmdletBase
3838
ValueFromPipelineByPropertyName = true,
3939
Mandatory = true,
4040
HelpMessage = "Location where want to create API Management.")]
41+
[LocationCompleter("Microsoft.ApiManagement/service")]
4142
[ValidateNotNullOrEmpty]
4243
public string Location { get; set; }
4344

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementRegion.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
1919
using ResourceManager.Common;
20+
using ResourceManager.Common.ArgumentCompleters;
2021
using System;
2122
using System.Management.Automation;
2223

@@ -27,6 +28,7 @@ public class NewAzureApiManagementRegion : AzureRMCmdlet
2728
ValueFromPipelineByPropertyName = false,
2829
Mandatory = true,
2930
HelpMessage = "Location of the additional deployment region.")]
31+
[LocationCompleter("Microsoft.ApiManagement/service")]
3032
[ValidateNotNullOrEmpty]
3133
public string Location { get; set; }
3234

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
1919
using ResourceManager.Common;
20+
using ResourceManager.Common.ArgumentCompleters;
2021
using System;
2122
using System.Management.Automation;
2223

@@ -27,7 +28,7 @@ public class NewAzureApiManagementVirtualNetwork : AzureRMCmdlet
2728
ValueFromPipelineByPropertyName = false,
2829
Mandatory = true,
2930
HelpMessage = "Location of the virtual network.")]
30-
31+
[LocationCompleter("Microsoft.ApiManagement/service")]
3132
[ValidateNotNullOrEmpty]
3233
public string Location { get; set; }
3334

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagementRegion.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1616
{
1717
using Microsoft.Azure.Commands.ApiManagement.Models;
18+
using ResourceManager.Common.ArgumentCompleters;
1819
using System.Management.Automation;
1920

2021
[Cmdlet(VerbsCommon.Remove, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))]
@@ -31,6 +32,7 @@ public class RemoveAzureApiManagementRegion : AzureApiManagementCmdletBase
3132
ValueFromPipelineByPropertyName = true,
3233
Mandatory = true,
3334
HelpMessage = "Location of the deployment region to remove.")]
35+
[LocationCompleter("Microsoft.ApiManagement/service")]
3436
[ValidateNotNullOrEmpty]
3537
public string Location { get; set; }
3638

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementDeployment.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public class UpdateAzureApiManagementDeployment : AzureApiManagementCmdletBase
5555
ValueFromPipelineByPropertyName = true,
5656
Mandatory = true,
5757
HelpMessage = "Location of master API Management deployment region.")]
58+
[LocationCompleter("Microsoft.ApiManagement/service")]
5859
public string Location { get; set; }
5960

6061
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementRegion.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
19+
using ResourceManager.Common.ArgumentCompleters;
1920
using System.Management.Automation;
2021

2122
[Cmdlet(VerbsData.Update, "AzureRmApiManagementRegion"), OutputType(typeof(PsApiManagement))]
@@ -32,7 +33,7 @@ public class UpdateAzureApiManagementRegion : AzureApiManagementCmdletBase
3233
ValueFromPipelineByPropertyName = true,
3334
Mandatory = true,
3435
HelpMessage = "Location of the deployment region to update.")]
35-
36+
[LocationCompleter("Microsoft.ApiManagement/service")]
3637
[ValidateNotNullOrEmpty]
3738
public string Location { get; set; }
3839

src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/ApplicationInsights/NewApplicationInsights.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class NewAzureApplicationInsights : ApplicationInsightsBaseCmdlet
4545
Position = 2,
4646
Mandatory = true,
4747
HelpMessage = "Application Insights Resource Location.")]
48+
[LocationCompleter("Microsoft.Insights/components")]
4849
[ValidateNotNullOrEmpty]
4950
public string Location { get; set; }
5051

src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationAccount.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public IAutomationClient AutomationClient
7070
/// Gets or sets the location.
7171
/// </summary>
7272
[Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The geo region of the automation account")]
73+
[LocationCompleter("Microsoft.Automation/automationAccounts")]
7374
public string Location { get; set; }
7475

7576
/// <summary>

src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Vault/NewAzureRMBackupVault.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class NewAzureRMBackupVault : AzureBackupCmdletBase
3737
public string Name { get; set; }
3838

3939
[Parameter(Position = 2, Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.Location)]
40+
[LocationCompleter("Microsoft.Backup/BackupVault")]
4041
[ValidateNotNullOrEmpty]
4142
public string Region { get; set; }
4243

0 commit comments

Comments
 (0)