ChaosScenarioConfigurationCollection.CreateOrUpdateAsync Method

Definition

Create or update a scenario definition.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}.
  • Operation Id. : ScenarioConfigurations_CreateOrUpdate.
  • Default Api Version. : 2026-05-01-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Chaos.ChaosScenarioConfigurationResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string scenarioConfigurationName, Azure.ResourceManager.Chaos.ChaosScenarioConfigurationData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Chaos.ChaosScenarioConfigurationData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Chaos.ChaosScenarioConfigurationResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Chaos.ChaosScenarioConfigurationData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Chaos.ChaosScenarioConfigurationResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, scenarioConfigurationName As String, data As ChaosScenarioConfigurationData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ChaosScenarioConfigurationResource))

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.

scenarioConfigurationName
String

Name of the scenario definition.

data
ChaosScenarioConfigurationData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

scenarioConfigurationName or data is null.

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

Applies to