PolicyAssignmentsOperationsExtensions.GetByIdAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the policy assignment with the given ID.
public static System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Fluent.Models.PolicyAssignmentInner> GetByIdAsync (this Microsoft.Azure.Management.ResourceManager.Fluent.IPolicyAssignmentsOperations operations, string policyAssignmentId, System.Threading.CancellationToken cancellationToken = default);
static member GetByIdAsync : Microsoft.Azure.Management.ResourceManager.Fluent.IPolicyAssignmentsOperations * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Fluent.Models.PolicyAssignmentInner>
<Extension()>
Public Function GetByIdAsync (operations As IPolicyAssignmentsOperations, policyAssignmentId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of PolicyAssignmentInner)
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}'.
- cancellationToken
- CancellationToken
The cancellation token.
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}'.