PolicyCollection.GetAsync(String, CancellationToken) Method

Definition

Get a Policy

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/credentials/default/policies/{policyName}.
  • Operation Id. : Policies_Get.
  • Default Api Version. : 2026-03-01-preview.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DeviceRegistry.PolicyResource>> GetAsync(string policyName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DeviceRegistry.PolicyResource>>
override this.GetAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DeviceRegistry.PolicyResource>>
Public Overridable Function GetAsync (policyName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PolicyResource))

Parameters

policyName
String

The name of the Policy proxy resource.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

policyName is null.

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

Applies to