Compartilhar via


PolicyAssignmentsOperationsExtensions.GetByIdAsync Método

Definição

Recupera a atribuição de política com a ID fornecida.

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)

Parâmetros

operations
IPolicyAssignmentsOperations

O grupo de operações para esse método de extensão.

policyAssignmentId
String

A ID da atribuição de política a ser obtido. Use o formato '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.

cancellationToken
CancellationToken

O token de cancelamento.

Retornos

Comentários

A operação recupera a atribuição de política com a ID fornecida. As IDs de atribuição de política têm esse formato: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Os escopos válidos são: grupo de gerenciamento (formato: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), assinatura (formato: '/subscriptions/{subscriptionId}'), grupo de recursos (formato: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', ou recurso (formato: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.

Aplica-se a