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

src/ResourceManager/AzureBatch/Commands.Batch/BatchAccounts/NewBatchAccountCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class NewBatchAccountCommand : BatchCmdletBase
3232

3333
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true,
3434
HelpMessage = "The region where the account will be created.")]
35+
[LocationCompleter("Microsoft.Batch/batchAccounts")]
3536
[ValidateNotNullOrEmpty]
3637
public string Location { get; set; }
3738

src/ResourceManager/AzureBatch/Commands.Batch/Locations/GetBatchLocationQuotasCommand.cs

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

1515
using Microsoft.Azure.Commands.Batch.Models;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using System.Management.Automation;
1718
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
1819

@@ -25,6 +26,7 @@ public class GetBatchLocationQuotasCommand : BatchCmdletBase
2526
{
2627
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true,
2728
HelpMessage = "The region to get the quotas of the subscription in the Batch Service from.")]
29+
[LocationCompleter("Microsoft.Batch/locations/quotas")]
2830
[ValidateNotNullOrEmpty]
2931
public string Location { get; set; }
3032

src/ResourceManager/Cdn/Commands.Cdn/Endpoint/NewAzureRmCdnEndpoint.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class NewAzureRmCdnEndpoint : AzureCdnCmdletBase
5050
public PSProfile CdnProfile { get; set; }
5151

5252
[Parameter(Mandatory = true, HelpMessage = "The location of the CDN endpoint.", ParameterSetName = FieldsParameterSet)]
53+
[LocationCompleter("Microsoft.Cdn/profiles/endpoints")]
5354
[ValidateNotNullOrEmpty]
5455
public string Location { get; set; }
5556

src/ResourceManager/Cdn/Commands.Cdn/Profile/NewAzureRmCdnProfile.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class NewAzureRmCdnProfile : AzureCdnCmdletBase
4545
/// The location in which to create the profile.
4646
/// </summary>
4747
[Parameter(Mandatory = true, HelpMessage = "The location in which to create the CDN profile.")]
48+
[LocationCompleter("Microsoft.Cdn/profiles")]
4849
[ValidateNotNullOrEmpty]
4950
public string Location { get; set; }
5051

src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/CognitiveServicesAccount/NewAzureCognitiveServicesAccount.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public class NewAzureCognitiveServicesAccountCommand : CognitiveServicesAccountB
6969
Mandatory = true,
7070
ValueFromPipelineByPropertyName = true,
7171
HelpMessage = "Cognitive Services Account Location.")]
72+
[LocationCompleter("Microsoft.CognitiveServices/accounts")]
7273
[ValidateNotNullOrEmpty]
7374
public string Location { get; set; }
7475

src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/NewAzureAvailabilitySetCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class NewAzureAvailabilitySetCommand : AvailabilitySetBaseCmdlet
4949
Position = 2,
5050
ValueFromPipelineByPropertyName = true,
5151
HelpMessage = "The location.")]
52+
[LocationCompleter("Microsoft.Compute/availabilitySets")]
5253
[ValidateNotNullOrEmpty]
5354
public string Location { get; set; }
5455

src/ResourceManager/Compute/Commands.Compute/Extension/DSC/SetAzureVMDscExtensionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet
173173
Mandatory = false,
174174
ValueFromPipelineByPropertyName = true,
175175
HelpMessage = "Location of the resource.")]
176+
[LocationCompleter("Microsoft.Storage/storageAccounts")]
176177
[ValidateNotNullOrEmpty]
177178
public string Location { get; set; }
178179

src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/SetAzureRmVMDiagnosticsExtension.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public string DiagnosticsConfigurationPath
107107
Position = 7,
108108
ValueFromPipelineByPropertyName = true,
109109
HelpMessage = "The location.")]
110+
[LocationCompleter("Microsoft.Storage/storageAccounts")]
110111
public string Location
111112
{
112113
get

src/ResourceManager/Compute/Commands.Compute/Extension/SetAzureVMExtensionBaseCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class SetAzureVMExtensionBaseCmdlet : VirtualMachineExtensionBaseCmdlet
5757
Mandatory = false,
5858
ValueFromPipelineByPropertyName = true,
5959
HelpMessage = "The location.")]
60+
[LocationCompleter("Microsoft.Compute/virtualMachines")]
6061
[ValidateNotNullOrEmpty]
6162
public string Location { get; set; }
6263

src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/SetAzureVMSqlServerExtensionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public class SetAzureSqlServerExtensionCommand : VirtualMachineExtensionBaseCmdl
9696
Position = 8,
9797
ValueFromPipelineByPropertyName = true,
9898
HelpMessage = "Location of the resource.")]
99+
[LocationCompleter("Microsoft.Compute/virtualMachines")]
99100
[ValidateNotNullOrEmpty]
100101
public string Location { get; set; }
101102

src/ResourceManager/Compute/Commands.Compute/ExtensionImages/GetAzureVMExtensionImageCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.Compute
2727
[OutputType(typeof(PSVirtualMachineExtensionImageDetails))]
2828
public class GetAzureVMExtensionImageCommand : VirtualMachineExtensionImageBaseCmdlet
2929
{
30-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
30+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
3131
public string Location { get; set; }
3232

3333
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]

src/ResourceManager/Compute/Commands.Compute/ExtensionImages/GetAzureVMExtensionImageTypeCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute
2424
[OutputType(typeof(PSVirtualMachineExtensionImageType))]
2525
public class GetAzureVMExtensionImageTypeCommand : VirtualMachineExtensionImageBaseCmdlet
2626
{
27-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
27+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
2828
public string Location { get; set; }
2929

3030
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/NewAzureRmContainerServiceConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class NewAzureRmContainerServiceConfigCommand : Microsoft.Azure.C
3737
Mandatory = false,
3838
Position = 0,
3939
ValueFromPipelineByPropertyName = true)]
40+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.ContainerService/containerServices")]
4041
public string Location { get; set; }
4142

4243
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.Reso
5656
Mandatory = false,
5757
Position = 3,
5858
ValueFromPipelineByPropertyName = true)]
59+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/disks")]
5960
public string Location { get; set; }
6061

6162
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/Image/Config/NewAzureRmImageConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class NewAzureRmImageConfigCommand : Microsoft.Azure.Commands.Res
3737
Mandatory = false,
3838
Position = 0,
3939
ValueFromPipelineByPropertyName = true)]
40+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/images")]
4041
public string Location { get; set; }
4142

4243
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/Snapshot/Config/NewAzureRmSnapshotConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public partial class NewAzureRmSnapshotConfigCommand : Microsoft.Azure.Commands.
5656
Mandatory = false,
5757
Position = 3,
5858
ValueFromPipelineByPropertyName = true)]
59+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/snapshots")]
5960
public string Location { get; set; }
6061

6162
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineRunCommand/VirtualMachineRunCommandGetMethod.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ protected override void ProcessRecord()
166166
ValueFromPipelineByPropertyName = true,
167167
ValueFromPipeline = false)]
168168
[AllowNull]
169+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/locations/runCommands")]
169170
public string Location { get; set; }
170171

171172
[Parameter(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public partial class NewAzureRmVmssConfigCommand : Microsoft.Azure.Commands.Reso
4343
Mandatory = false,
4444
Position = 1,
4545
ValueFromPipelineByPropertyName = true)]
46+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/virtualMachineScaleSets")]
4647
public string Location { get; set; }
4748

4849
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class GetAzureVMImageCommand : VirtualMachineImageBaseCmdlet
3939
[Parameter(ParameterSetName = GetVMImageDetailParamSetName,
4040
Mandatory = true,
4141
ValueFromPipelineByPropertyName = true)]
42+
[LocationCompleter("Microsoft.Compute/locations/publishers")]
4243
[ValidateNotNullOrEmpty]
4344
public string Location { get; set; }
4445

src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageOfferCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute
2424
[OutputType(typeof(PSVirtualMachineImageOffer))]
2525
public class GetAzureVMImageOfferCommand : VirtualMachineImageBaseCmdlet
2626
{
27-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
27+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
2828
public string Location { get; set; }
2929

3030
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]

src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImagePublisherCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute
2424
[OutputType(typeof(PSVirtualMachineImagePublisher))]
2525
public class GetAzureVMImagePublisherCommand : VirtualMachineImageBaseCmdlet
2626
{
27-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
27+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
2828
public string Location { get; set; }
2929

3030
public override void ExecuteCmdlet()

src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageSkuCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute
2424
[OutputType(typeof(PSVirtualMachineImageSku))]
2525
public class GetAzureVMImageSkuCommand : VirtualMachineImageBaseCmdlet
2626
{
27-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
27+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
2828
public string Location { get; set; }
2929

3030
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]

src/ResourceManager/Compute/Commands.Compute/Usage/GetAzureVMUsageCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class GetAzureVMUsageCommand : VirtualMachineUsageBaseCmdlet
3232
Position = 0,
3333
ValueFromPipelineByPropertyName = true,
3434
HelpMessage = "The location name.")]
35+
[LocationCompleter("Microsoft.Compute/locations/usages")]
3536
[ValidateNotNullOrEmpty]
3637
public string Location { get; set; }
3738

src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/NewAzureVMCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureVMCommand : VirtualMachineBaseCmdlet
4848
Mandatory = true,
4949
Position = 1,
5050
ValueFromPipelineByPropertyName = true)]
51+
[LocationCompleter("Microsoft.Compute/virtualMachines")]
5152
[ValidateNotNullOrEmpty]
5253
public string Location { get; set; }
5354

src/ResourceManager/Compute/Commands.Compute/VirtualMachineSizes/GetAzureVMSizeCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class GetAzureVMSizeCommand : VirtualMachineSizeBaseCmdlet
3737
ParameterSetName = ListVirtualMachineSizeParamSet,
3838
ValueFromPipelineByPropertyName = true,
3939
HelpMessage = "The location name.")]
40+
[LocationCompleter("Microsoft.Compute/locations/vmSizes")]
4041
[ValidateNotNullOrEmpty]
4142
public string Location { get; set; }
4243

src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public class NewAzureContainerGroupCommand : ContainerInstanceCmdletBase
7979
[Parameter(
8080
Mandatory = false,
8181
HelpMessage = "The container group Location. Default to the location of the resource group.")]
82+
[LocationCompleter("Microsoft.ContainerInstance/containerGroups")]
8283
[ValidateNotNullOrEmpty]
8384
public string Location { get; set; }
8485

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands/NewAzureContainerRegistry.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public class NewAzureContainerRegistry : ContainerRegistryCmdletBase
5858
[Parameter(
5959
Mandatory = false,
6060
HelpMessage = "Container Registry Location. Default to the location of the resource group.")]
61+
[LocationCompleter("Microsoft.ContainerRegistry/registries")]
6162
[ValidateNotNullOrEmpty]
6263
public string Location { get; set; }
6364

src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/NewAzureDataFactoryCommand.cs

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

1515
using Microsoft.Azure.Commands.DataFactories.Models;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using System.Collections;
1718
using System.Management.Automation;
1819
using System.Security.Permissions;
@@ -30,6 +31,7 @@ public class NewAzureDataFactoryCommand : DataFactoryBaseCmdlet
3031

3132
[Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true,
3233
HelpMessage = "The geographic region to create the data factory.")]
34+
[LocationCompleter("Microsoft.DataFactory/datafactories")]
3335
[ValidateNotNullOrEmpty]
3436
public string Location { get; set; }
3537

src/ResourceManager/DataFactories/Commands.DataFactoryV2/DataFactories/SetAzureDataFactoryCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class SetAzureDataFactoryCommand : DataFactoryBaseCmdlet
3737

3838
[Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true,
3939
HelpMessage = "The geographic region to create the data factory.")]
40+
[LocationCompleter("Microsoft.DataFactory/factories")]
4041
[ValidateNotNullOrEmpty]
4142
public string Location { get; set; }
4243

src/ResourceManager/DataFactories/Commands.DataFactoryV2/IntegrationRuntimes/SetAzureDataFactoryIntegrationRuntimeCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
using Microsoft.Azure.Commands.DataFactoryV2.Models;
2121
using Microsoft.Azure.Commands.DataFactoryV2.Properties;
2222
using Microsoft.Azure.Management.DataFactory.Models;
23+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2324

2425
namespace Microsoft.Azure.Commands.DataFactoryV2
2526
{
@@ -50,6 +51,7 @@ public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCm
5051
[Parameter(
5152
Mandatory = false,
5253
HelpMessage = Constants.HelpIntegrationRuntimeLocation)]
54+
[LocationCompleter("Microsoft.DataFactory/factories")]
5355
[ValidateNotNullOrEmpty]
5456
public string Location { get; set; }
5557

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsAccount.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class NewAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
3939

4040
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = true,
4141
HelpMessage = "Azure region where the account should be created.")]
42+
[LocationCompleter("Microsoft.DataLakeAnalytics/accounts")]
4243
[ValidateNotNullOrEmpty]
4344
public string Location { get; set; }
4445

0 commit comments

Comments
 (0)