SubscriptionAssessmentMetadataCollection.CreateOrUpdateAsync Method

Definition

Create metadata information on an assessment type in a specific subscription

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}
  • Operation Id: AssessmentsMetadata_CreateInSubscription
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionAssessmentMetadataResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.SubscriptionAssessmentMetadataResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string assessmentMetadataName, Azure.ResourceManager.SecurityCenter.SecurityAssessmentMetadataData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.SecurityAssessmentMetadataData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.SubscriptionAssessmentMetadataResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.SecurityAssessmentMetadataData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.SubscriptionAssessmentMetadataResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, assessmentMetadataName As String, data As SecurityAssessmentMetadataData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of SubscriptionAssessmentMetadataResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

assessmentMetadataName
String

The Assessment Key - Unique key for the assessment type.

data
SecurityAssessmentMetadataData

AssessmentMetadata object.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

assessmentMetadataName or data is null.

Applies to