az chaos scenario
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 command. Learn more about extensions.
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage Chaos Studio scenarios within a workspace.
Scenarios define the fault-injection actions available in a workspace. Catalog scenarios are populated by workspace evaluation (see 'az chaos workspace refresh-recommendation'); custom scenarios can be created directly.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az chaos scenario config |
Manage scenario configurations for a Chaos Studio scenario. |
Extension | Preview |
| az chaos scenario config create |
Create a scenario definition. |
Extension | Preview |
| az chaos scenario config delete |
Delete a scenario definition. |
Extension | Preview |
| az chaos scenario config execute |
Execute the scenario execution with the given scenario configuration. |
Extension | Preview |
| az chaos scenario config fix-permissions |
Fix RBAC permissions for a scenario configuration. |
Extension | Preview |
| az chaos scenario config list |
List a list of scenario definitions. |
Extension | Preview |
| az chaos scenario config show |
Get a scenario definition. |
Extension | Preview |
| az chaos scenario config show-permission-fix |
Get the latest permission-fix result for a scenario configuration. |
Extension | Preview |
| az chaos scenario config show-validation |
Get the latest validation result for a scenario configuration. |
Extension | Preview |
| az chaos scenario config update |
Update a scenario definition. |
Extension | Preview |
| az chaos scenario config validate |
Validate a scenario configuration. |
Extension | Preview |
| az chaos scenario config wait |
Place the CLI in a waiting state until a condition is met. |
Extension | Preview |
| az chaos scenario create |
Create a scenario. |
Extension | Preview |
| az chaos scenario delete |
Delete a scenario. |
Extension | Preview |
| az chaos scenario list |
List a list of scenarios. |
Extension | Preview |
| az chaos scenario run |
Manage scenario runs for a Chaos Studio scenario. |
Extension | Preview |
| 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 show |
Get a scenario. |
Extension | Preview |
| az chaos scenario update |
Update a scenario. |
Extension | Preview |
az chaos scenario create
Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a scenario.
az chaos scenario create --name --scenario-name
--resource-group
--workspace-name
[--acquire-policy-token]
[--actions]
[--change-reference]
[--description]
[--parameters]
Examples
Create or update a scenario.
az chaos scenario create --resource-group exampleRG --workspace-name exampleWorkspace --scenario-name zoneDownScenario --description 'Induces an outage of all discovered VM and VMSS instances in the target zone.' --parameters "[{name:duration,type:string,default:PT15M,required:False,description:'The duration of the outage scenario.'}]" --actions "[{name:vmZoneDown,action-id:'urn:csci:microsoft:compute:shutdown/1.0.0',description:'Force shutdown VM instances in target zone',duration:'%%{parameters.duration}%%',parameters:[{key:zones,value:'%%{filters.zones}%%'}]}]"
Required Parameters
Name of the scenario.
Name of resource group. You can configure the default group using az configure --defaults group=<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.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Array of actions that define the scenario's orchestration. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Description of what this scenario does (optional).
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Parameter definitions for the scenario. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az chaos scenario delete
Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a scenario.
az chaos scenario delete [--acquire-policy-token]
[--change-reference]
[--ids]
[--name --scenario-name]
[--resource-group]
[--subscription]
[--workspace-name]
[--yes]
Examples
Delete a scenario in a workspace.
az chaos scenario delete --resource-group exampleRG --workspace-name exampleWorkspace --scenario-name myScenario
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
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 of the scenario.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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 |
String that represents a Workspace resource name.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az chaos scenario list
Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List a list of scenarios.
az chaos scenario list --resource-group
--workspace-name
[--max-items]
[--next-token]
Examples
List scenarios in a workspace.
az chaos scenario list --resource-group exampleRG --workspace-name exampleWorkspace
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<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.
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 |
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
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az chaos scenario show
Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get a scenario.
az chaos scenario show [--ids]
[--name --scenario-name]
[--resource-group]
[--subscription]
[--workspace-name]
Examples
Get a scenario.
az chaos scenario show --resource-group exampleRG --workspace-name exampleWorkspace --scenario-name zoneDownScenario
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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 of the scenario.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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 |
String that represents a Workspace resource name.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az chaos scenario update
Command group 'az chaos scenario' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a scenario.
az chaos scenario update [--acquire-policy-token]
[--actions]
[--add]
[--change-reference]
[--description]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--name --scenario-name]
[--parameters]
[--remove]
[--resource-group]
[--set]
[--subscription]
[--workspace-name]
Examples
Update a scenario.
az chaos scenario update --resource-group exampleRG --workspace-name exampleWorkspace --scenario-name zoneDownScenario
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Array of actions that define the scenario's orchestration. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Description of what this scenario does (optional).
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
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 of the scenario.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Parameter definitions for the scenario. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
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 |
String that represents a Workspace resource name.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |