VirtualNetworkGatewayCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

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

Parameters

virtualNetworkGatewayName
String

The name of the virtual network gateway.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

virtualNetworkGatewayName is null.

Applies to