Share via


NetworkExtensions.GetVirtualRouters Method

Definition

Overloads

GetVirtualRouters(SubscriptionResource, CancellationToken)

Gets all the Virtual Routers in a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters
  • Operation Id: VirtualRouters_List
  • Default Api Version: 2024-03-01
  • Resource: VirtualRouterResource
GetVirtualRouters(ResourceGroupResource)

Gets a collection of VirtualRouterResources in the ResourceGroupResource. MockingTo mock this method, please mock GetVirtualRouters() instead.

GetVirtualRouters(SubscriptionResource, CancellationToken)

Source:
NetworkExtensions.cs
Source:
NetworkExtensions.cs

Gets all the Virtual Routers in a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters
  • Operation Id: VirtualRouters_List
  • Default Api Version: 2024-03-01
  • Resource: VirtualRouterResource
public static Azure.Pageable<Azure.ResourceManager.Network.VirtualRouterResource> GetVirtualRouters (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default);
static member GetVirtualRouters : Azure.ResourceManager.Resources.SubscriptionResource * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Network.VirtualRouterResource>
<Extension()>
Public Function GetVirtualRouters (subscriptionResource As SubscriptionResource, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of VirtualRouterResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of VirtualRouterResource that may take multiple service requests to iterate over.

Exceptions

subscriptionResource is null.

Applies to

GetVirtualRouters(ResourceGroupResource)

Source:
NetworkExtensions.cs
Source:
NetworkExtensions.cs

Gets a collection of VirtualRouterResources in the ResourceGroupResource. MockingTo mock this method, please mock GetVirtualRouters() instead.

public static Azure.ResourceManager.Network.VirtualRouterCollection GetVirtualRouters (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource);
static member GetVirtualRouters : Azure.ResourceManager.Resources.ResourceGroupResource -> Azure.ResourceManager.Network.VirtualRouterCollection
<Extension()>
Public Function GetVirtualRouters (resourceGroupResource As ResourceGroupResource) As VirtualRouterCollection

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of VirtualRouterResources and their operations over a VirtualRouterResource.

Exceptions

resourceGroupResource is null.

Applies to