Condividi tramite


ResourcesPolicyExtensions.GetPolicyAssignment Method

Definition

This operation retrieves a single policy assignment, given its name and the scope it was created at. <item> Mocking. To mock this method, please mock GetPolicyAssignment(ResourceIdentifier, String, String, CancellationToken) instead. </item>

public static Azure.Response<Azure.ResourceManager.Resources.Policy.PolicyAssignmentResource> GetPolicyAssignment(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string policyAssignmentName, string expand = default, System.Threading.CancellationToken cancellationToken = default);
static member GetPolicyAssignment : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Policy.PolicyAssignmentResource>
<Extension()>
Public Function GetPolicyAssignment (client As ArmClient, scope As ResourceIdentifier, policyAssignmentName As String, Optional expand As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PolicyAssignmentResource)

Parameters

client
ArmClient

The ArmClient the method will execute against.

scope
ResourceIdentifier

The scope of the resource collection to get.

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

client is null.

Applies to