Skip to content

Commit 992e65a

Browse files
author
Maddie Clayton
authored
Merge pull request #7583 from maddieclayton/network
Add resource name completer to Network
2 parents 1dc601d + 464e350 commit 992e65a

File tree

121 files changed

+157
-10
lines changed

Some content is hidden

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

121 files changed

+157
-10
lines changed

src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayBackendHealthCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class GetAzureApplicationGatewayBackendHealthCommand : ApplicationGateway
2929
Mandatory = true,
3030
ValueFromPipelineByPropertyName = true,
3131
HelpMessage = "The resource name.")]
32+
[ResourceNameCompleter("Microsoft.Network/applicationGateways", "ResourceGroupName")]
3233
[ValidateNotNullOrEmpty]
3334
public virtual string Name { get; set; }
3435

src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class GetAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet
3030
Mandatory = false,
3131
ValueFromPipelineByPropertyName = true,
3232
HelpMessage = "The resource name.")]
33+
[ResourceNameCompleter("Microsoft.Network/applicationGateways", "ResourceGroupName")]
3334
[ValidateNotNullOrEmpty]
3435
public virtual string Name { get; set; }
3536

src/ResourceManager/Network/Commands.Network/ApplicationGateway/RemoveAzureApplicationGatewayCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class RemoveAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet
2828
Mandatory = true,
2929
ValueFromPipelineByPropertyName = true,
3030
HelpMessage = "The resource name.")]
31+
[ResourceNameCompleter("Microsoft.Network/applicationGateways", "ResourceGroupName")]
3132
[ValidateNotNullOrEmpty]
3233
public virtual string Name { get; set; }
3334

src/ResourceManager/Network/Commands.Network/AzureFirewall/GetAzureFirewallCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using System.Linq;
1717
using System.Management.Automation;
1818
using Microsoft.Azure.Commands.Network.Models;
19+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1920
using Microsoft.Azure.Management.Network;
2021
using Microsoft.Azure.Management.Network.Models;
2122
using Microsoft.Rest.Azure;
@@ -30,6 +31,7 @@ public class GetAzureFirewallCommand : AzureFirewallBaseCmdlet
3031
Mandatory = false,
3132
ValueFromPipelineByPropertyName = true,
3233
HelpMessage = "The resource name.")]
34+
[ResourceNameCompleter("Microsoft.Network/azureFirewalls", "ResourceGroupName")]
3335
[ValidateNotNullOrEmpty]
3436
public virtual string Name { get; set; }
3537

src/ResourceManager/Network/Commands.Network/AzureFirewall/RemoveAzureFirewallCommand.cs

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

1515
using System.Management.Automation;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.Network;
1718

1819
namespace Microsoft.Azure.Commands.Network
@@ -25,6 +26,7 @@ public class RemoveAzureFirewallCommand : AzureFirewallBaseCmdlet
2526
Mandatory = true,
2627
ValueFromPipelineByPropertyName = true,
2728
HelpMessage = "The resource name.")]
29+
[ResourceNameCompleter("Microsoft.Network/azureFirewalls", "ResourceGroupName")]
2830
[ValidateNotNullOrEmpty]
2931
public virtual string Name { get; set; }
3032

src/ResourceManager/Network/Commands.Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
--->
2020
## Current Release
2121
* Update cmdlet Test-AzureRmNetworkWatcherConnectivity, pass the protocol value to backend.
22+
* Added ResourceName argument completer to all cmdlets.
2223

2324
## Version 6.9.0
2425
* Added NetworkProfile functionality. new cmdlets added

src/ResourceManager/Network/Commands.Network/Cortex/HubVnetConnection/GetAzureRmHubVirtualNetworkConnectionCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class GetHubVirtualNetworkConnectionCommand : HubVnetConnectionBaseCmdlet
4141
Mandatory = true,
4242
ParameterSetName = CortexParameterSetNames.ByVirtualHubName,
4343
HelpMessage = "The parent resource name.")]
44-
[ResourceGroupCompleter]
44+
[ResourceNameCompleter("Microsoft.Network/virtualHubs", "ResourceGroupName")]
4545
public string ParentResourceName { get; set; }
4646

4747
[Alias("VirtualHub", "ParentVirtualHub")]
@@ -65,6 +65,7 @@ public class GetHubVirtualNetworkConnectionCommand : HubVnetConnectionBaseCmdlet
6565
[Parameter(
6666
Mandatory = false,
6767
HelpMessage = "The resource name.")]
68+
[ResourceNameCompleter("Microsoft.Network/virtualHubs/hubVirtualNetworkConnections", "ResourceGroupName", "ParentResourceName")]
6869
[ValidateNotNullOrEmpty]
6970
public string Name { get; set; }
7071

src/ResourceManager/Network/Commands.Network/Cortex/HubVnetConnection/NewAzureRmHubVirtualNetworkConnectionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class NewHubVirtualNetworkConnectionCommand : HubVnetConnectionBaseCmdlet
5757
Mandatory = true,
5858
ParameterSetName = CortexParameterSetNames.ByVirtualHubName + CortexParameterSetNames.ByRemoteVirtualNetworkObject,
5959
HelpMessage = "The resource group name.")]
60+
[ResourceNameCompleter("Microsoft.Network/virtualHubs", "ResourceGroupName")]
6061
public string ParentResourceName { get; set; }
6162

6263
[Alias("VirtualHub", "ParentVirtualHub")]

src/ResourceManager/Network/Commands.Network/Cortex/HubVnetConnection/RemoveAzureRmHubVirtualNetworkConnectionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ public class RemoveHubVirtualNetworkConnectionCommand : HubVnetConnectionBaseCmd
4949
Mandatory = true,
5050
ParameterSetName = CortexParameterSetNames.ByHubVirtualNetworkConnectionName,
5151
HelpMessage = "The parent resource name.")]
52+
[ResourceNameCompleter("Microsoft.Network/virtualHubs", "ResourceGroupName")]
5253
public string ParentResourceName { get; set; }
5354

5455
[Alias("ResourceName", "HubVirtualNetworkConnectionName")]
5556
[Parameter(
5657
Mandatory = true,
5758
ParameterSetName = CortexParameterSetNames.ByHubVirtualNetworkConnectionName,
5859
HelpMessage = "The resource name.")]
60+
[ResourceNameCompleter("Microsoft.Network/virtualHubs/hubVirtualNetworkConnections", "ResourceGroupName", "ParentResourceName")]
5961
[ValidateNotNullOrEmpty]
6062
public string Name { get; set; }
6163

src/ResourceManager/Network/Commands.Network/Cortex/VirtualHub/GetAzureRmVirtualHubCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class GetAzureRmVirtualHubCommand : VirtualHubBaseCmdlet
3939
Mandatory = false,
4040
ParameterSetName = "ListByResourceGroupName",
4141
HelpMessage = "The resource name.")]
42+
[ResourceNameCompleter("Microsoft.Network/virtualHubs", "ResourceGroupName")]
4243
[ValidateNotNullOrEmpty]
4344
public string Name { get; set; }
4445

0 commit comments

Comments
 (0)