Condividi tramite


PolicyAssignmentCollection.Get(String, String, CancellationToken) Method

Definition

This operation retrieves a single policy assignment, given its name and the scope it was created at.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Get.
  • Default Api Version. : 2025-12-01-preview.
public virtual Azure.Response<Azure.ResourceManager.Resources.Policy.PolicyAssignmentResource> Get(string policyAssignmentName, string expand = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Get : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Policy.PolicyAssignmentResource>
override this.Get : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Policy.PolicyAssignmentResource>
Public Overridable Function Get (policyAssignmentName As String, Optional expand As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PolicyAssignmentResource)

Parameters

policyAssignmentName
String

The name of the policy assignment to get.

expand
String

Comma-separated list of additional properties to be included in the response. Supported values are 'LatestDefinitionVersion, EffectiveDefinitionVersion'.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

policyAssignmentName is null.

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

Applies to