Sdílet prostřednictvím


NetworkExtensions.GetNatGateways Method

Definition

Overloads

GetNatGateways(ResourceGroupResource)

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

GetNatGateways(SubscriptionResource, CancellationToken)

Gets all the Nat Gateways in a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways
  • Operation Id: NatGateways_ListAll
  • Default Api Version: 2024-03-01
  • Resource: NatGatewayResource

GetNatGateways(ResourceGroupResource)

Source:
NetworkExtensions.cs
Source:
NetworkExtensions.cs

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

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

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of NatGatewayResources and their operations over a NatGatewayResource.

Exceptions

resourceGroupResource is null.

Applies to

GetNatGateways(SubscriptionResource, CancellationToken)

Source:
NetworkExtensions.cs
Source:
NetworkExtensions.cs

Gets all the Nat Gateways in a subscription.

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

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

subscriptionResource is null.

Applies to