Skip to content

Commit f17bd5c

Browse files
Maddie Claytonazdevxps
authored andcommitted
Add ResourceGroupCompleter to Insights
1 parent a9ca39e commit f17bd5c

8 files changed

+16
-0
lines changed

src/ResourceManager/Insights/Commands.Insights/ActionGroups/GetAzureRmActionGroupCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using Microsoft.Azure.Commands.Insights.OutputClasses;
2020
using Microsoft.Azure.Management.Monitor.Management;
2121
using Microsoft.Azure.Management.Monitor.Management.Models;
22+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2223

2324
namespace Microsoft.Azure.Commands.Insights.ActionGroups
2425
{
@@ -40,6 +41,7 @@ public class GetAzureRmActionGroupCommand : ManagementCmdletBase
4041
/// </summary>
4142
[Parameter(ParameterSetName = BySubscriptionOrResourceGroup, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name")]
4243
[Parameter(ParameterSetName = ByName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name")]
44+
[ResourceGroupCompleter]
4345
[ValidateNotNullOrEmpty]
4446
public string ResourceGroupName { get; set; }
4547

src/ResourceManager/Insights/Commands.Insights/ActionGroups/RemoveAzureRmActionGroupCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace Microsoft.Azure.Commands.Insights.ActionGroups
2222
using System;
2323

2424
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
25+
using ResourceManager.Common.ArgumentCompleters;
2526

2627
/// <summary>
2728
/// Gets an Azure Action Group.
@@ -42,6 +43,7 @@ public class RemoveAzureRmActionGroupCommand : ManagementCmdletBase
4243
/// Gets or sets the resource group parameter.
4344
/// </summary>
4445
[Parameter(ParameterSetName = ByPropertyName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name")]
46+
[ResourceGroupCompleter]
4547
[ValidateNotNullOrEmpty]
4648
public string ResourceGroupName { get; set; }
4749

src/ResourceManager/Insights/Commands.Insights/ActionGroups/SetAzureRmActionGroupCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace Microsoft.Azure.Commands.Insights.ActionGroups
2525

2626
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
2727
using Microsoft.Azure.Management.Monitor.Management;
28+
using ResourceManager.Common.ArgumentCompleters;
2829

2930
/// <summary>
3031
/// Gets an Azure Action Group.
@@ -45,6 +46,7 @@ public class SetAzureRmActionGroupCommand : ManagementCmdletBase
4546
/// Gets or sets the resource group parameter.
4647
/// </summary>
4748
[Parameter(ParameterSetName = ByPropertyName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name")]
49+
[ResourceGroupCompleter]
4850
[ValidateNotNullOrEmpty]
4951
public string ResourceGroupName { get; set; }
5052

src/ResourceManager/Insights/Commands.Insights/ActivityLogAlert/DisableAzureRmActivityLogAlertCommand.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.Insights.OutputClasses;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.Monitor.Management;
1718
using Microsoft.Azure.Management.Monitor.Management.Models;
1819
using System.Collections.Generic;
@@ -43,6 +44,7 @@ public class DisableAzureRmActivityLogAlertCommand : ManagementCmdletBase
4344
/// Gets or set the resource group name
4445
/// </summary>
4546
[Parameter(ParameterSetName = DisableActivityLogAlertDefaultParamGroup, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name of the activity log rule resource")]
47+
[ResourceGroupCompleter]
4648
[ValidateNotNullOrEmpty]
4749
public string ResourceGroupName { get; set; }
4850

src/ResourceManager/Insights/Commands.Insights/ActivityLogAlert/EnableAzureRmActivityLogAlertCommand.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.Insights.OutputClasses;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.Monitor.Management;
1718
using Microsoft.Azure.Management.Monitor.Management.Models;
1819
using System.Collections.Generic;
@@ -43,6 +44,7 @@ public class EnableAzureRmActivityLogAlertCommand : ManagementCmdletBase
4344
/// Gets or set the resource group name
4445
/// </summary>
4546
[Parameter(ParameterSetName = EnableActivityLogAlertDefaultParamGroup, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name of the activity log rule resource")]
47+
[ResourceGroupCompleter]
4648
[ValidateNotNullOrEmpty]
4749
public string ResourceGroupName { get; set; }
4850

src/ResourceManager/Insights/Commands.Insights/ActivityLogAlert/GetAzureRmActivityLogAlertCommand.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.Insights.OutputClasses;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.Monitor.Management;
1718
using System.Collections.Generic;
1819
using System.Linq;
@@ -36,6 +37,7 @@ public class GetAzureRmActivityLogAlertCommand : ManagementCmdletBase
3637
/// </summary>
3738
[Parameter(ParameterSetName = GetActivityLogAlertDefaultParamGroup, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name")]
3839
[Parameter(ParameterSetName = GetActivityLogAlertHelperParamGroup, Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name")]
40+
[ResourceGroupCompleter]
3941
[ValidateNotNullOrEmpty]
4042
public string ResourceGroupName { get; set; }
4143

src/ResourceManager/Insights/Commands.Insights/ActivityLogAlert/RemoveAzureRmActivityLogAlertCommand.cs

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

1920
namespace Microsoft.Azure.Commands.Insights.ActivityLogAlert
2021
{
@@ -34,6 +35,7 @@ public class RemoveAzureRmActivityLogAlertCommand : ManagementCmdletBase
3435
/// Gets or sets the ResourceGroupName parameter of the cmdlet
3536
/// </summary>
3637
[Parameter(ParameterSetName = RemoveActivityLogAlertDefaultParamGroup, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name")]
38+
[ResourceGroupCompleter]
3739
[ValidateNotNullOrEmpty]
3840
public string ResourceGroupName { get; set; }
3941

src/ResourceManager/Insights/Commands.Insights/ActivityLogAlert/SetAzureRmActivityLogAlertCommand.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.Insights.OutputClasses;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.Monitor.Management;
1718
using Microsoft.Azure.Management.Monitor.Management.Models;
1819
using System.Collections.Generic;
@@ -51,6 +52,7 @@ public class SetAzureRmActivityLogAlertCommand : ManagementCmdletBase
5152
/// Gets or set the resource group name
5253
/// </summary>
5354
[Parameter(ParameterSetName = SetActivityLogAlertDefaultParamGroup, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name of the activity log rule resource")]
55+
[ResourceGroupCompleter]
5456
[ValidateNotNullOrEmpty]
5557
public string ResourceGroupName { get; set; }
5658

0 commit comments

Comments
 (0)