Share via


VirtualNetworkGatewayNatRuleCollection.GetIfExists Method

Definition

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}
  • Operation Id: VirtualNetworkGatewayNatRules_Get
  • Default Api Version: 2024-03-01
  • Resource: VirtualNetworkGatewayNatRuleResource
public virtual Azure.NullableResponse<Azure.ResourceManager.Network.VirtualNetworkGatewayNatRuleResource> GetIfExists (string natRuleName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Network.VirtualNetworkGatewayNatRuleResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Network.VirtualNetworkGatewayNatRuleResource>
Public Overridable Function GetIfExists (natRuleName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of VirtualNetworkGatewayNatRuleResource)

Parameters

natRuleName
String

The name of the nat rule.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

natRuleName is an empty string, and was expected to be non-empty.

natRuleName is null.

Applies to