共用方式為


NetworkExtensions.GetVirtualNetworks Method

Definition

Overloads

GetVirtualNetworks(ResourceGroupResource)

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

GetVirtualNetworks(SubscriptionResource, CancellationToken)

Gets all virtual networks in a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks
  • Operation Id: VirtualNetworks_ListAll
  • Default Api Version: 2024-03-01
  • Resource: VirtualNetworkResource

GetVirtualNetworks(ResourceGroupResource)

Source:
NetworkExtensions.cs
Source:
NetworkExtensions.cs

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

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

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of VirtualNetworkResources and their operations over a VirtualNetworkResource.

Exceptions

resourceGroupResource is null.

Applies to

GetVirtualNetworks(SubscriptionResource, CancellationToken)

Source:
NetworkExtensions.cs
Source:
NetworkExtensions.cs

Gets all virtual networks in a subscription.

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

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

subscriptionResource is null.

Applies to