PolicyAssignmentsOperationsExtensions.GetById(IPolicyAssignmentsOperations, String) Method

Definition

Gets a policy assignment by ID.

public static Microsoft.Azure.Management.ResourceManager.Models.PolicyAssignment GetById (this Microsoft.Azure.Management.ResourceManager.IPolicyAssignmentsOperations operations, string policyAssignmentId);
static member GetById : Microsoft.Azure.Management.ResourceManager.IPolicyAssignmentsOperations * string -> Microsoft.Azure.Management.ResourceManager.Models.PolicyAssignment
<Extension()>
Public Function GetById (operations As IPolicyAssignmentsOperations, policyAssignmentId As String) As PolicyAssignment

Parameters

operations
IPolicyAssignmentsOperations

The operations group for this extension method.

policyAssignmentId
String

The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

Returns

PolicyAssignment

Remarks

When providing a scope for the assigment, use

'/subscriptions/{subscription-id}/' for subscriptions,

'/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for

resource groups, and

'/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'

for resources.

Applies to