Share via


VpnGatewayNatRuleCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

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

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