Compartilhar via


PolicyAssignmentCollection.GetIfExists(String, CancellationToken) Método

Definição

Tenta obter detalhes desse recurso do serviço.

  • Caminho da Solicitação/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}
  • IdPolicyAssignments_Get de operação
public virtual Azure.NullableResponse<Azure.ResourceManager.Resources.PolicyAssignmentResource> GetIfExists (string policyAssignmentName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Resources.PolicyAssignmentResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Resources.PolicyAssignmentResource>
Public Overridable Function GetIfExists (policyAssignmentName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of PolicyAssignmentResource)

Parâmetros

policyAssignmentName
String

O nome da atribuição de política a ser obtido.

cancellationToken
CancellationToken

O token de cancelamento a ser usado.

Retornos

Exceções

policyAssignmentName é uma cadeia de caracteres vazia e era esperado que não estivesse vazio.

policyAssignmentName é nulo.

Aplica-se a