共用方式為


DenyAssignmentCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

  • Request Path: /{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}
  • Operation Id: DenyAssignments_Get
  • Default Api Version: 2022-04-01
  • Resource: DenyAssignmentResource
public virtual Azure.NullableResponse<Azure.ResourceManager.Authorization.DenyAssignmentResource> GetIfExists (string denyAssignmentId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Authorization.DenyAssignmentResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.Authorization.DenyAssignmentResource>
Public Overridable Function GetIfExists (denyAssignmentId As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of DenyAssignmentResource)

Parameters

denyAssignmentId
String

The ID of the deny assignment to get.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

denyAssignmentId is an empty string, and was expected to be non-empty.

denyAssignmentId is null.

Applies to