Microsoft.Chaos workspaces/scenarios

Bicep resource definition

The workspaces/scenarios resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Chaos/workspaces/scenarios resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Chaos/workspaces/scenarios@2026-05-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    actions: [
      {
        actionId: 'string'
        description: 'string'
        duration: 'string'
        externalResource: {
          resourceId: 'string'
        }
        name: 'string'
        parameters: [
          {
            key: 'string'
            value: 'string'
          }
        ]
        runAfter: {
          behavior: 'string'
          items: [
            {
              name: 'string'
              onActionLifecycle: 'string'
              type: 'string'
            }
          ]
        }
        timeout: 'string'
        waitBefore: 'string'
      }
    ]
    description: 'string'
    parameters: [
      {
        default: 'string'
        description: 'string'
        name: 'string'
        required: bool
        type: 'string'
      }
    ]
  }
}

Property Values

Microsoft.Chaos/workspaces/scenarios

Name Description Value
name The resource name string

Constraints:
Min length = 1
Pattern = ^[^<>%&:?#/\\]+$ (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: workspaces
properties The properties of scenario. ScenarioProperties

ActionDependency

Name Description Value
name Name of the action this depends on. string (required)
onActionLifecycle The lifecycle state of the dependency action that triggers this action to start. 'AnyTerminal'
'Failure'
'Running'
'Skipped'
'Start'
'Success'
type The type of dependency. 'Action' (required)

ExternalResource

Name Description Value
resourceId The resource ID of the external resource. string

KeyValuePair

Name Description Value
key The name of the setting for the action. string

Constraints:
Min length = 1 (required)
value The value of the setting for the action. string

Constraints:
Min length = 1 (required)

RunAfter

Name Description Value
behavior Defines how multiple dependencies are evaluated. 'All'
'Any'
'AtLeastOne'
items Array of action dependencies. ActionDependency[] (required)

ScenarioAction

Name Description Value
actionId Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). string (required)
description Human-readable description of what this action does. string
duration ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports template macro syntax (%%{parameters.&lt;name&gt;}%%). string (required)
externalResource External resource reference for the action. ExternalResource
name Unique name for the action. string

Constraints:
Pattern = ^[a-zA-Z0-9-_]+$ (required)
parameters Action-specific parameter values. KeyValuePair[]
runAfter Action dependencies that control when this action starts. RunAfter
timeout ISO 8601 duration for maximum action execution time. Supports template macro syntax. string
waitBefore ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). Supports template macro syntax. string

ScenarioParameter

Name Description Value
default Default value for the parameter. string
description Description of the parameter. string
name The name of the parameter. string

Constraints:
Min length = 1 (required)
required Whether this parameter is required. bool
type Parameter data type. 'array'
'boolean'
'number'
'object'
'string' (required)

ScenarioProperties

Name Description Value
actions Array of actions that define the scenario's orchestration. ScenarioAction[] (required)
description Description of what this scenario does (optional). string
parameters Parameter definitions for the scenario. ScenarioParameter[] (required)

ARM template resource definition

The workspaces/scenarios resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Chaos/workspaces/scenarios resource, add the following JSON to your template.

{
  "type": "Microsoft.Chaos/workspaces/scenarios",
  "apiVersion": "2026-05-01-preview",
  "name": "string",
  "properties": {
    "actions": [
      {
        "actionId": "string",
        "description": "string",
        "duration": "string",
        "externalResource": {
          "resourceId": "string"
        },
        "name": "string",
        "parameters": [
          {
            "key": "string",
            "value": "string"
          }
        ],
        "runAfter": {
          "behavior": "string",
          "items": [
            {
              "name": "string",
              "onActionLifecycle": "string",
              "type": "string"
            }
          ]
        },
        "timeout": "string",
        "waitBefore": "string"
      }
    ],
    "description": "string",
    "parameters": [
      {
        "default": "string",
        "description": "string",
        "name": "string",
        "required": "bool",
        "type": "string"
      }
    ]
  }
}

Property Values

Microsoft.Chaos/workspaces/scenarios

Name Description Value
apiVersion The api version '2026-05-01-preview'
name The resource name string

Constraints:
Min length = 1
Pattern = ^[^<>%&:?#/\\]+$ (required)
properties The properties of scenario. ScenarioProperties
type The resource type 'Microsoft.Chaos/workspaces/scenarios'

ActionDependency

Name Description Value
name Name of the action this depends on. string (required)
onActionLifecycle The lifecycle state of the dependency action that triggers this action to start. 'AnyTerminal'
'Failure'
'Running'
'Skipped'
'Start'
'Success'
type The type of dependency. 'Action' (required)

ExternalResource

Name Description Value
resourceId The resource ID of the external resource. string

KeyValuePair

Name Description Value
key The name of the setting for the action. string

Constraints:
Min length = 1 (required)
value The value of the setting for the action. string

Constraints:
Min length = 1 (required)

RunAfter

Name Description Value
behavior Defines how multiple dependencies are evaluated. 'All'
'Any'
'AtLeastOne'
items Array of action dependencies. ActionDependency[] (required)

ScenarioAction

Name Description Value
actionId Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). string (required)
description Human-readable description of what this action does. string
duration ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports template macro syntax (%%{parameters.&lt;name&gt;}%%). string (required)
externalResource External resource reference for the action. ExternalResource
name Unique name for the action. string

Constraints:
Pattern = ^[a-zA-Z0-9-_]+$ (required)
parameters Action-specific parameter values. KeyValuePair[]
runAfter Action dependencies that control when this action starts. RunAfter
timeout ISO 8601 duration for maximum action execution time. Supports template macro syntax. string
waitBefore ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). Supports template macro syntax. string

ScenarioParameter

Name Description Value
default Default value for the parameter. string
description Description of the parameter. string
name The name of the parameter. string

Constraints:
Min length = 1 (required)
required Whether this parameter is required. bool
type Parameter data type. 'array'
'boolean'
'number'
'object'
'string' (required)

ScenarioProperties

Name Description Value
actions Array of actions that define the scenario's orchestration. ScenarioAction[] (required)
description Description of what this scenario does (optional). string
parameters Parameter definitions for the scenario. ScenarioParameter[] (required)

Usage Examples

Terraform (AzAPI provider) resource definition

The workspaces/scenarios resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Chaos/workspaces/scenarios resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Chaos/workspaces/scenarios@2026-05-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      actions = [
        {
          actionId = "string"
          description = "string"
          duration = "string"
          externalResource = {
            resourceId = "string"
          }
          name = "string"
          parameters = [
            {
              key = "string"
              value = "string"
            }
          ]
          runAfter = {
            behavior = "string"
            items = [
              {
                name = "string"
                onActionLifecycle = "string"
                type = "string"
              }
            ]
          }
          timeout = "string"
          waitBefore = "string"
        }
      ]
      description = "string"
      parameters = [
        {
          default = "string"
          description = "string"
          name = "string"
          required = bool
          type = "string"
        }
      ]
    }
  }
}

Property Values

Microsoft.Chaos/workspaces/scenarios

Name Description Value
name The resource name string

Constraints:
Min length = 1
Pattern = ^[^<>%&:?#/\\]+$ (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: workspaces
properties The properties of scenario. ScenarioProperties
type The resource type "Microsoft.Chaos/workspaces/scenarios@2026-05-01-preview"

ActionDependency

Name Description Value
name Name of the action this depends on. string (required)
onActionLifecycle The lifecycle state of the dependency action that triggers this action to start. 'AnyTerminal'
'Failure'
'Running'
'Skipped'
'Start'
'Success'
type The type of dependency. 'Action' (required)

ExternalResource

Name Description Value
resourceId The resource ID of the external resource. string

KeyValuePair

Name Description Value
key The name of the setting for the action. string

Constraints:
Min length = 1 (required)
value The value of the setting for the action. string

Constraints:
Min length = 1 (required)

RunAfter

Name Description Value
behavior Defines how multiple dependencies are evaluated. 'All'
'Any'
'AtLeastOne'
items Array of action dependencies. ActionDependency[] (required)

ScenarioAction

Name Description Value
actionId Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). string (required)
description Human-readable description of what this action does. string
duration ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports template macro syntax (%%{parameters.&lt;name&gt;}%%). string (required)
externalResource External resource reference for the action. ExternalResource
name Unique name for the action. string

Constraints:
Pattern = ^[a-zA-Z0-9-_]+$ (required)
parameters Action-specific parameter values. KeyValuePair[]
runAfter Action dependencies that control when this action starts. RunAfter
timeout ISO 8601 duration for maximum action execution time. Supports template macro syntax. string
waitBefore ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). Supports template macro syntax. string

ScenarioParameter

Name Description Value
default Default value for the parameter. string
description Description of the parameter. string
name The name of the parameter. string

Constraints:
Min length = 1 (required)
required Whether this parameter is required. bool
type Parameter data type. 'array'
'boolean'
'number'
'object'
'string' (required)

ScenarioProperties

Name Description Value
actions Array of actions that define the scenario's orchestration. ScenarioAction[] (required)
description Description of what this scenario does (optional). string
parameters Parameter definitions for the scenario. ScenarioParameter[] (required)