共用方式為


DnsResolverPolicyCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

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

Parameters

dnsResolverPolicyName
String

The name of the DNS resolver policy.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

dnsResolverPolicyName is null.

Applies to