Share via


PolicyAssignmentsOperationsExtensions.GetById Method

Definition

Retrieves the policy assignment with the given 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/{policyAssignmentName}'.

Returns

Remarks

The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.

Applies to