Skip to content

Commit 51b81d5

Browse files
Maddie Claytonazdevxps
authored andcommitted
Add ResourceGroupCompleter to Iothub
1 parent f17bd5c commit 51b81d5

17 files changed

+34
-0
lines changed

src/ResourceManager/IotHub/Commands.IotHub/IotHub/AddAzureRmIotHubEventHubConsumerGroup.cs

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

2122
[Cmdlet(VerbsCommon.Add, "AzureRmIotHubEventHubConsumerGroup", SupportsShouldProcess = true), OutputType(typeof(IEnumerable<string>))]
2223
[Alias("Add-AzureRmIotHubEHCG")]
@@ -27,6 +28,7 @@ public class AddAzureRmIotHubEventHubConsumerGroup : IotHubBaseCmdlet
2728
Mandatory = true,
2829
ValueFromPipelineByPropertyName = true,
2930
HelpMessage = "Name of the Resource Group")]
31+
[ResourceGroupCompleter]
3032
[ValidateNotNullOrEmpty]
3133
public string ResourceGroupName { get; set; }
3234

src/ResourceManager/IotHub/Commands.IotHub/IotHub/AddAzureRmIotHubKey.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2121
using Microsoft.Azure.Commands.Management.IotHub.Models;
2222
using Microsoft.Azure.Management.IotHub;
2323
using Microsoft.Azure.Management.IotHub.Models;
24+
using ResourceManager.Common.ArgumentCompleters;
2425

2526
[Cmdlet(VerbsCommon.Add, "AzureRmIotHubKey", SupportsShouldProcess = true)]
2627
[OutputType(typeof(PSSharedAccessSignatureAuthorizationRule), typeof(List<PSSharedAccessSignatureAuthorizationRule>))]
@@ -31,6 +32,7 @@ public class AddAzureRmIotHubKey : IotHubBaseCmdlet
3132
Mandatory = true,
3233
ValueFromPipelineByPropertyName = true,
3334
HelpMessage = "Name of the Resource Group")]
35+
[ResourceGroupCompleter]
3436
[ValidateNotNullOrEmpty]
3537
public string ResourceGroupName { get; set; }
3638

src/ResourceManager/IotHub/Commands.IotHub/IotHub/GetAzureRmEventHubConsumerGroup.cs

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

2425
[Cmdlet(VerbsCommon.Get, "AzureRmIotHubEventHubConsumerGroup"), OutputType(typeof(IEnumerable<string>))]
2526
[Alias("Get-AzureRmIotHubEHCG")]
@@ -30,6 +31,7 @@ public class GetAzureRmIotHubEventHubConsumerGroup : IotHubBaseCmdlet
3031
Mandatory = true,
3132
ValueFromPipelineByPropertyName = true,
3233
HelpMessage = "Name of the Resource Group")]
34+
[ResourceGroupCompleter]
3335
[ValidateNotNullOrEmpty]
3436
public string ResourceGroupName { get; set; }
3537

src/ResourceManager/IotHub/Commands.IotHub/IotHub/GetAzureRmIotHub.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2222
using Microsoft.Azure.Management.IotHub;
2323
using Microsoft.Azure.Management.IotHub.Models;
2424
using Microsoft.Rest.Azure;
25+
using ResourceManager.Common.ArgumentCompleters;
2526

2627
[Cmdlet(VerbsCommon.Get, "AzureRmIotHub", DefaultParameterSetName = "ListIotHubsByResourceGroup")]
2728
[OutputType(typeof(PSIotHub), typeof(List<PSIotHub>))]
@@ -42,6 +43,7 @@ public class GetAzureRmIotHub : IotHubBaseCmdlet
4243
Mandatory = false,
4344
ValueFromPipelineByPropertyName = true,
4445
HelpMessage = "Name of the Resource Group")]
46+
[ResourceGroupCompleter]
4547
[ValidateNotNullOrEmpty]
4648
public string ResourceGroupName { get; set; }
4749

src/ResourceManager/IotHub/Commands.IotHub/IotHub/GetAzureRmIotHubConnectionString.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2121
using Microsoft.Azure.Commands.Management.IotHub.Models;
2222
using Microsoft.Azure.Management.IotHub;
2323
using Microsoft.Azure.Management.IotHub.Models;
24+
using ResourceManager.Common.ArgumentCompleters;
2425

2526
[Cmdlet(VerbsCommon.Get, "AzureRmIotHubConnectionString")]
2627
[OutputType(typeof(PSSharedAccessSignatureAuthorizationRule), typeof(List<PSSharedAccessSignatureAuthorizationRule>))]
@@ -31,6 +32,7 @@ public class GetAzureRmIotHubConnectionString : IotHubBaseCmdlet
3132
Mandatory = true,
3233
ValueFromPipelineByPropertyName = true,
3334
HelpMessage = "Name of the Resource Group")]
35+
[ResourceGroupCompleter]
3436
[ValidateNotNullOrEmpty]
3537
public string ResourceGroupName { get; set; }
3638

src/ResourceManager/IotHub/Commands.IotHub/IotHub/GetAzureRmIotHubJob.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2121
using Microsoft.Azure.Commands.Management.IotHub.Models;
2222
using Microsoft.Azure.Management.IotHub;
2323
using Microsoft.Azure.Management.IotHub.Models;
24+
using ResourceManager.Common.ArgumentCompleters;
2425

2526
[Cmdlet(VerbsCommon.Get, "AzureRmIotHubJob")]
2627
[OutputType(typeof(PSIotHubJobResponse), typeof(List<PSIotHubJobResponse>))]
@@ -31,6 +32,7 @@ public class GetAzureRmIotHubJob : IotHubBaseCmdlet
3132
Mandatory = true,
3233
ValueFromPipelineByPropertyName = true,
3334
HelpMessage = "Name of the Resource Group")]
35+
[ResourceGroupCompleter]
3436
[ValidateNotNullOrEmpty]
3537
public string ResourceGroupName { get; set; }
3638

src/ResourceManager/IotHub/Commands.IotHub/IotHub/GetAzureRmIotHubKey.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2121
using Microsoft.Azure.Commands.Management.IotHub.Models;
2222
using Microsoft.Azure.Management.IotHub;
2323
using Microsoft.Azure.Management.IotHub.Models;
24+
using ResourceManager.Common.ArgumentCompleters;
2425

2526
[Cmdlet(VerbsCommon.Get, "AzureRmIotHubKey")]
2627
[OutputType(typeof(PSSharedAccessSignatureAuthorizationRule), typeof(List<PSSharedAccessSignatureAuthorizationRule>))]
@@ -31,6 +32,7 @@ public class GetAzureRmIotHubKey : IotHubBaseCmdlet
3132
Mandatory = true,
3233
ValueFromPipelineByPropertyName = true,
3334
HelpMessage = "Name of the Resource Group")]
35+
[ResourceGroupCompleter]
3436
[ValidateNotNullOrEmpty]
3537
public string ResourceGroupName { get; set; }
3638

src/ResourceManager/IotHub/Commands.IotHub/IotHub/GetAzureRmIotHubQuotaMetric.cs

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

2425
[Cmdlet(VerbsCommon.Get, "AzureRmIotHubQuotaMetric")]
2526
[OutputType(typeof(List<PSIotHubQuotaMetric>))]
@@ -31,6 +32,7 @@ public class GetAzureRmIotHubQuotaMetric : IotHubBaseCmdlet
3132
Mandatory = true,
3233
ValueFromPipelineByPropertyName = true,
3334
HelpMessage = "Name of the Resource Group")]
35+
[ResourceGroupCompleter]
3436
[ValidateNotNullOrEmpty]
3537
public string ResourceGroupName { get; set; }
3638

src/ResourceManager/IotHub/Commands.IotHub/IotHub/GetAzureRmIotHubRegistryStatistic.cs

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

2425
[Cmdlet(VerbsCommon.Get, "AzureRmIotHubRegistryStatistic"), OutputType(typeof(IList<PSIotHubRegistryStatistics>))]
2526
public class GetAzureRmIotHubRegistryStatistic : IotHubBaseCmdlet
@@ -29,6 +30,7 @@ public class GetAzureRmIotHubRegistryStatistic : IotHubBaseCmdlet
2930
Mandatory = true,
3031
ValueFromPipelineByPropertyName = true,
3132
HelpMessage = "Name of the Resource Group")]
33+
[ResourceGroupCompleter]
3234
[ValidateNotNullOrEmpty]
3335
public string ResourceGroupName { get; set; }
3436

src/ResourceManager/IotHub/Commands.IotHub/IotHub/GetAzureRmIotHubValidSku.cs

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

2425
[Cmdlet(VerbsCommon.Get, "AzureRmIotHubValidSku"), OutputType(typeof(IList<PSIotHubSkuDescription>))]
2526
public class GetAzureRmIotHubValidSku : IotHubBaseCmdlet
@@ -29,6 +30,7 @@ public class GetAzureRmIotHubValidSku : IotHubBaseCmdlet
2930
Mandatory = true,
3031
ValueFromPipelineByPropertyName = true,
3132
HelpMessage = "Name of the Resource Group")]
33+
[ResourceGroupCompleter]
3234
[ValidateNotNullOrEmpty]
3335
public string ResourceGroupName { get; set; }
3436

src/ResourceManager/IotHub/Commands.IotHub/IotHub/NewAzureRmIotHub.cs

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

2425
[Cmdlet(VerbsCommon.New, "AzureRmIotHub", SupportsShouldProcess = true)]
2526
[OutputType(typeof(PSIotHub))]
@@ -29,6 +30,7 @@ public class NewAzureRmIotHub : IotHubBaseCmdlet
2930
Mandatory = true,
3031
ValueFromPipelineByPropertyName = true,
3132
HelpMessage = "Name of the Resource Group")]
33+
[ResourceGroupCompleter]
3234
[ValidateNotNullOrEmpty]
3335
public string ResourceGroupName { get; set; }
3436

src/ResourceManager/IotHub/Commands.IotHub/IotHub/NewAzureRmIotHubExportDevices.cs

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

2425
[Cmdlet(VerbsCommon.New, "AzureRmIotHubExportDevices", SupportsShouldProcess = true)]
2526
[OutputType(typeof(PSIotHubJobResponse))]
@@ -30,6 +31,7 @@ public class NewAzureRmIotHubExportDevices : IotHubBaseCmdlet
3031
Mandatory = true,
3132
ValueFromPipelineByPropertyName = true,
3233
HelpMessage = "Name of the Resource Group")]
34+
[ResourceGroupCompleter]
3335
[ValidateNotNullOrEmpty]
3436
public string ResourceGroupName { get; set; }
3537

src/ResourceManager/IotHub/Commands.IotHub/IotHub/NewAzureRmIotHubImportDevices.cs

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

2425
[Cmdlet(VerbsCommon.New, "AzureRmIotHubImportDevices", SupportsShouldProcess = true)]
2526
[OutputType(typeof(PSIotHubJobResponse))]
@@ -30,6 +31,7 @@ public class NewAzureRmIotHubImportDevices : IotHubBaseCmdlet
3031
Mandatory = true,
3132
ValueFromPipelineByPropertyName = true,
3233
HelpMessage = "Name of the Resource Group")]
34+
[ResourceGroupCompleter]
3335
[ValidateNotNullOrEmpty]
3436
public string ResourceGroupName { get; set; }
3537

src/ResourceManager/IotHub/Commands.IotHub/IotHub/RemoveAzureRmIotHub.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
1919
using System.Management.Automation;
2020
using Microsoft.Azure.Management.IotHub;
2121
using PSIotHubProperties = Microsoft.Azure.Commands.Management.IotHub.Properties;
22+
using ResourceManager.Common.ArgumentCompleters;
2223

2324
[Cmdlet(VerbsCommon.Remove, "AzureRmIotHub", SupportsShouldProcess = true)]
2425
public class RemoveAzureRmIotHub : IotHubBaseCmdlet
@@ -29,6 +30,7 @@ public class RemoveAzureRmIotHub : IotHubBaseCmdlet
2930
Mandatory = true,
3031
ValueFromPipelineByPropertyName = true,
3132
HelpMessage = "Name of the Resource Group")]
33+
[ResourceGroupCompleter]
3234
[ValidateNotNullOrEmpty]
3335
public string ResourceGroupName { get; set; }
3436

src/ResourceManager/IotHub/Commands.IotHub/IotHub/RemoveAzureRmIotHubEventHubConsumerGroup.cs

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

2425
[Cmdlet(VerbsCommon.Remove, "AzureRmIotHubEventHubConsumerGroup", SupportsShouldProcess = true), OutputType(typeof(IEnumerable<string>))]
2526
[Alias("Remove-AzureRmIotHubEHCG")]
@@ -30,6 +31,7 @@ public class RemoveAzureRmIotHubEventHubConsumerGroup : IotHubBaseCmdlet
3031
Mandatory = true,
3132
ValueFromPipelineByPropertyName = true,
3233
HelpMessage = "Name of the Resource Group")]
34+
[ResourceGroupCompleter]
3335
[ValidateNotNullOrEmpty]
3436
public string ResourceGroupName { get; set; }
3537

src/ResourceManager/IotHub/Commands.IotHub/IotHub/RemoveAzureRmIotHubKey.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2424
using Microsoft.Azure.Management.IotHub;
2525
using Microsoft.Azure.Management.IotHub.Models;
2626
using PSIotHubProperties = Microsoft.Azure.Commands.Management.IotHub.Properties;
27+
using ResourceManager.Common.ArgumentCompleters;
2728

2829
[Cmdlet(VerbsCommon.Remove, "AzureRmIotHubKey", SupportsShouldProcess = true)]
2930
[OutputType(typeof(List<PSSharedAccessSignatureAuthorizationRule>))]
@@ -35,6 +36,7 @@ public class RemoveAzureRmIotHubKey : IotHubBaseCmdlet
3536
Mandatory = true,
3637
ValueFromPipelineByPropertyName = true,
3738
HelpMessage = "Name of the Resource Group")]
39+
[ResourceGroupCompleter]
3840
[ValidateNotNullOrEmpty]
3941
public string ResourceGroupName { get; set; }
4042

src/ResourceManager/IotHub/Commands.IotHub/IotHub/SetAzureRmIotHub.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2121
using Microsoft.Azure.Commands.Management.IotHub.Models;
2222
using Microsoft.Azure.Management.IotHub;
2323
using Microsoft.Azure.Management.IotHub.Models;
24+
using ResourceManager.Common.ArgumentCompleters;
2425

2526
[Cmdlet(VerbsCommon.Set, "AzureRmIotHub", DefaultParameterSetName = "UpdateSku", SupportsShouldProcess = true)]
2627
[OutputType(typeof(PSIotHub))]
@@ -39,6 +40,7 @@ public class SetAzureRmIotHub : IotHubBaseCmdlet
3940
Mandatory = true,
4041
ValueFromPipelineByPropertyName = true,
4142
HelpMessage = "Name of the Resource Group")]
43+
[ResourceGroupCompleter]
4244
[ValidateNotNullOrEmpty]
4345
public string ResourceGroupName { get; set; }
4446

0 commit comments

Comments
 (0)