DnsZoneCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

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

Parameters

zoneName
String

The name of the DNS zone (without a terminating dot).

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

zoneName is null.

Applies to