다음을 통해 공유


DnsExtensions.GetDnsZone Method

Definition

Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.

  • 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 static Azure.Response<Azure.ResourceManager.Dns.DnsZoneResource> GetDnsZone (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string zoneName, System.Threading.CancellationToken cancellationToken = default);
static member GetDnsZone : Azure.ResourceManager.Resources.ResourceGroupResource * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Dns.DnsZoneResource>
<Extension()>
Public Function GetDnsZone (resourceGroupResource As ResourceGroupResource, zoneName As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of DnsZoneResource)

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

zoneName
String

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

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

resourceGroupResource or zoneName is null.

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

Applies to