Aracılığıyla paylaş


SecurityComplianceCollection.GetIfExistsAsync Method

Definition

Tries to get details for this resource from the service.

  • Request Path: /{scope}/providers/Microsoft.Security/compliances/{complianceName}
  • Operation Id: Compliances_Get
  • Default Api Version: 2017-08-01-preview
  • Resource: SecurityComplianceResource
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.SecurityCenter.SecurityComplianceResource>> GetIfExistsAsync (string complianceName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.SecurityCenter.SecurityComplianceResource>>
override this.GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.SecurityCenter.SecurityComplianceResource>>
Public Overridable Function GetIfExistsAsync (complianceName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of NullableResponse(Of SecurityComplianceResource))

Parameters

complianceName
String

name of the Compliance.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

complianceName is null.

Applies to