Share via


AttestationAdministrationClient.GetPolicyAsync Method

Definition

Retrieves the attesttion policy for the specified AttestationType.

public virtual System.Threading.Tasks.Task<Azure.Security.Attestation.AttestationResponse<string>> GetPolicyAsync (Azure.Security.Attestation.AttestationType attestationType, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPolicyAsync : Azure.Security.Attestation.AttestationType * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.Attestation.AttestationResponse<string>>
override this.GetPolicyAsync : Azure.Security.Attestation.AttestationType * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.Attestation.AttestationResponse<string>>
Public Overridable Function GetPolicyAsync (attestationType As AttestationType, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AttestationResponse(Of String))

Parameters

attestationType
AttestationType

Attestation Type to retrive.

cancellationToken
CancellationToken

Cancellation token used to cancel this operation.

Returns

An AttestationResponse<T> with the policy for the specified attestation type.

Remarks

This API returns the underlying attestation policy object stored in the attestation service for this attestationType.

The actual service response to the API is an RFC 7519 JSON Web Token(see https://tools.ietf.org/html/rfc7519"). This token can be retrieved from Token. For the GetPolicyAsync API, the body of the Token is a StoredAttestationPolicy object, NOT a string.

Applies to