Share via


CustomAssessmentAutomationCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}
  • Operation Id: CustomAssessmentAutomations_Create
  • Default Api Version: 2021-07-01-preview
  • Resource: CustomAssessmentAutomationResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string customAssessmentAutomationName, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, customAssessmentAutomationName As String, content As CustomAssessmentAutomationCreateOrUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of CustomAssessmentAutomationResource))

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.

customAssessmentAutomationName
String

Name of the Custom Assessment Automation.

content
CustomAssessmentAutomationCreateOrUpdateContent

Custom Assessment Automation body.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

customAssessmentAutomationName or content is null.

Applies to