az chaos scenario run

Note

This reference is part of the chaos extension for the Azure CLI (version 2.75.0 or higher). The extension will automatically install the first time you run an az chaos scenario run command. Learn more about extensions.

Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage scenario runs for a Chaos Studio scenario.

Scenario runs represent individual executions of a scenario configuration. Use 'start' to begin a new run, 'show' to inspect its status, and 'cancel' to stop a running execution.

Commands

Name Description Type Status
az chaos scenario run cancel

Cancel a running scenario run.

Extension Preview
az chaos scenario run list

List a list of scenario runs.

Extension Preview
az chaos scenario run show

Get a scenario run.

Extension Preview
az chaos scenario run start

Start a scenario run from a scenario configuration.

Extension Preview
az chaos scenario run wait

Place the CLI in a waiting state until a condition is met.

Extension Preview

az chaos scenario run cancel

Preview

Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Cancel a running scenario run.

Sends a cancellation request for a running scenario run. The cancellation is an LRO that is polled to completion by default.

az chaos scenario run cancel --name --run-id
                             --resource-group
                             --scenario-name
                             --workspace-name
                             [--acquire-policy-token]
                             [--change-reference]
                             [--no-wait]

Examples

Cancel a scenario run

az chaos scenario run cancel --workspace-name MyWorkspace --resource-group MyRG --scenario-name ZoneDown-1.0 --run-id 12345678-1234-1234-1234-123456789012

Cancel without waiting for confirmation

az chaos scenario run cancel --workspace-name MyWorkspace --resource-group MyRG --scenario-name ZoneDown-1.0 --run-id 12345678-1234-1234-1234-123456789012 --no-wait

Required Parameters

--name --run-id -n

GUID of the scenario run to cancel.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--scenario-name

Name of the parent scenario.

--workspace-name

Name of the parent Chaos Studio workspace.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az chaos scenario run list

Preview

Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List a list of scenario runs.

az chaos scenario run list --resource-group
                           --scenario-name
                           --workspace-name
                           [--max-items]
                           [--next-token]

Examples

List scenario runs under a scenario.

az chaos scenario run list --resource-group exampleRG --workspace-name exampleWorkspace --scenario-name ZoneDown-1.0

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--scenario-name

Name of the scenario.

--workspace-name

String that represents a Workspace resource name.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az chaos scenario run show

Preview

Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get a scenario run.

This endpoint is also the polling target for ScenarioConfigurations.execute and ScenarioRuns.cancel (final-state-via: location). While the run is in progress the service returns 202 with a Location header pointing back to this URL; clients must keep polling until they receive 200, which carries the final ScenarioRun body.

az chaos scenario run show [--ids]
                           [--name --run-id]
                           [--resource-group]
                           [--scenario-name]
                           [--subscription]
                           [--workspace-name]

Examples

Get a scenario run.

az chaos scenario run show --resource-group exampleRG --workspace-name exampleWorkspace --scenario-name ZoneDown-1.0 --run-id abcd1234-5678-9012-3456-789012345678

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --run-id -n

The name of the ScenarioRun.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--scenario-name

Name of the scenario.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--workspace-name

String that represents a Workspace resource name.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az chaos scenario run start

Preview

Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Start a scenario run from a scenario configuration.

By default, runs a pre-flight validation before executing the scenario configuration. If validation fails, the run is not started and the command exits non-zero with the validation errors.

--skip-validation bypasses pre-flight validation and proceeds directly to execute. Use for CI re-runs of an already-validated configuration or when driving the validate→execute sequence manually.

--no-wait applies only to the execute phase. Pre-flight validation (if not skipped) is always awaited to completion. With --no-wait, the command returns immediately after kicking off execute, with the run ID parsed from the Location header.

The fastest fire-and-forget invocation is --skip-validation --no-wait.

az chaos scenario run start --config-name
                            --resource-group
                            --scenario-name
                            --workspace-name
                            [--acquire-policy-token]
                            [--change-reference]
                            [--no-wait]
                            [--skip-validation]

Examples

Start a scenario run (default — validates first, then executes)

az chaos scenario run start --workspace-name MyWorkspace --resource-group MyRG --scenario-name ZoneDown-1.0 --config-name zone1

Start a run skipping pre-flight validation

az chaos scenario run start --workspace-name MyWorkspace --resource-group MyRG --scenario-name ZoneDown-1.0 --config-name zone1 --skip-validation

Start a run without waiting for execute to complete

az chaos scenario run start --workspace-name MyWorkspace --resource-group MyRG --scenario-name ZoneDown-1.0 --config-name zone1 --no-wait

Fire-and-forget (skip validation and don't wait for execute)

az chaos scenario run start --workspace-name MyWorkspace --resource-group MyRG --scenario-name ZoneDown-1.0 --config-name zone1 --skip-validation --no-wait

Required Parameters

--config-name

Name of the scenario configuration to execute.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--scenario-name

Name of the parent scenario.

--workspace-name

Name of the parent Chaos Studio workspace.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--skip-validation

Skip pre-flight validation and proceed directly to execute. Use for CI re-runs of an already-validated configuration.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az chaos scenario run wait

Preview

Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Place the CLI in a waiting state until a condition is met.

az chaos scenario run wait [--acquire-policy-token]
                           [--change-reference]
                           [--created]
                           [--custom]
                           [--deleted]
                           [--exists]
                           [--ids]
                           [--interval]
                           [--name --run-id]
                           [--resource-group]
                           [--scenario-name]
                           [--subscription]
                           [--timeout]
                           [--updated]
                           [--workspace-name]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--name --run-id -n

The name of the ScenarioRun.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--scenario-name

Name of the scenario.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--workspace-name

String that represents a Workspace resource name.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False