PeerAsnCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

  • Request Path. : /subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}.
  • Operation Id. : PeerAsns_Get.
  • Default Api Version. : 2025-05-01.
public virtual Azure.NullableResponse<Azure.ResourceManager.Peering.PeerAsnResource> GetIfExists(string peerAsnName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Peering.PeerAsnResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Peering.PeerAsnResource>
Public Overridable Function GetIfExists (peerAsnName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of PeerAsnResource)

Parameters

peerAsnName
String

The peer ASN name.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

peerAsnName is null.

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

Applies to