Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The experiments resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Chaos/experiments resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Chaos/experiments@2025-01-01' = {
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
location: 'string'
name: 'string'
properties: {
selectors: [
{
filter: {
type: 'string'
// For remaining properties, see ChaosTargetFilter objects
}
id: 'string'
type: 'string'
// For remaining properties, see ChaosTargetSelector objects
}
]
steps: [
{
branches: [
{
actions: [
{
name: 'string'
type: 'string'
// For remaining properties, see ChaosExperimentAction objects
}
]
name: 'string'
}
]
name: 'string'
}
]
}
tags: {
{customized property}: 'string'
}
}
ChaosTargetFilter objects
Set the type property to specify the type of object.
For Simple, use:
{
parameters: {
zones: [
'string'
]
}
type: 'Simple'
}
ChaosExperimentAction objects
Set the type property to specify the type of object.
For continuous, use:
{
duration: 'string'
parameters: [
{
key: 'string'
value: 'string'
}
]
selectorId: 'string'
type: 'continuous'
}
For delay, use:
{
duration: 'string'
type: 'delay'
}
For discrete, use:
{
parameters: [
{
key: 'string'
value: 'string'
}
]
selectorId: 'string'
type: 'discrete'
}
ChaosTargetSelector objects
Set the type property to specify the type of object.
For List, use:
{
targets: [
{
id: 'string'
type: 'string'
}
]
type: 'List'
}
For Query, use:
{
queryString: 'string'
subscriptionIds: [
'string'
]
type: 'Query'
}
Property Values
Microsoft.Chaos/experiments
Name | Description | Value |
---|---|---|
identity | The managed service identities assigned to this resource. | ManagedServiceIdentity |
location | The geo-location where the resource lives | string (required) |
name | The resource name | string Constraints: Min length = 1 Pattern = ^[^<>%&:?#/\\]+$ (required) |
properties | The properties of the experiment resource. | ExperimentProperties (required) |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ChaosExperimentAction
Name | Description | Value |
---|---|---|
name | String that represents a Capability URN. | string Constraints: Max length = 2048 (required) |
type | Set to 'continuous' for type ContinuousAction. Set to 'delay' for type DelayAction. Set to 'discrete' for type DiscreteAction. | 'continuous' 'delay' 'discrete' (required) |
ChaosExperimentBranch
Name | Description | Value |
---|---|---|
actions | List of actions. | ChaosExperimentAction[] (required) |
name | String of the branch name. | string Constraints: Min length = 1 (required) |
ChaosExperimentStep
Name | Description | Value |
---|---|---|
branches | List of branches. | ChaosExperimentBranch[] (required) |
name | String of the step name. | string Constraints: Min length = 1 (required) |
ChaosTargetFilter
Name | Description | Value |
---|---|---|
type | Set to 'Simple' for type ChaosTargetSimpleFilter. | 'Simple' (required) |
ChaosTargetListSelector
Name | Description | Value |
---|---|---|
targets | List of Target references. | TargetReference[] (required) |
type | Chaos target selector discriminator type | 'List' (required) |
ChaosTargetQuerySelector
Name | Description | Value |
---|---|---|
queryString | Azure Resource Graph (ARG) Query Language query for target resources. | string (required) |
subscriptionIds | Subscription id list to scope resource query. | string[] (required) |
type | Chaos target selector discriminator type | 'Query' (required) |
ChaosTargetSelector
Name | Description | Value |
---|---|---|
filter | Model that represents available filter types that can be applied to a targets list. | ChaosTargetFilter |
id | String of the selector ID. | string Constraints: Min length = 1 (required) |
type | Set to 'List' for type ChaosTargetListSelector. Set to 'Query' for type ChaosTargetQuerySelector. | 'List' 'Query' (required) |
ChaosTargetSimpleFilter
Name | Description | Value |
---|---|---|
parameters | Model that represents the Simple filter parameters. | ChaosTargetSimpleFilterParameters |
type | Chaos target filter discriminator type | 'Simple' (required) |
ChaosTargetSimpleFilterParameters
Name | Description | Value |
---|---|---|
zones | List of Azure availability zones to filter targets by. | string[] |
ContinuousAction
Name | Description | Value |
---|---|---|
duration | ISO8601 formatted string that represents a duration. | string (required) |
parameters | List of key value pairs. | KeyValuePair[] (required) |
selectorId | String that represents a selector. | string Constraints: Min length = 1 (required) |
type | Chaos experiment action discriminator type | 'continuous' (required) |
DelayAction
Name | Description | Value |
---|---|---|
duration | ISO8601 formatted string that represents a duration. | string (required) |
type | Chaos experiment action discriminator type | 'delay' (required) |
DiscreteAction
Name | Description | Value |
---|---|---|
parameters | List of key value pairs. | KeyValuePair[] (required) |
selectorId | String that represents a selector. | string Constraints: Min length = 1 (required) |
type | Chaos experiment action discriminator type | 'discrete' (required) |
ExperimentProperties
Name | Description | Value |
---|---|---|
selectors | List of selectors. | ChaosTargetSelector[] (required) |
steps | List of steps. | ChaosExperimentStep[] (required) |
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) |
ManagedServiceIdentity
Name | Description | Value |
---|---|---|
type | Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
userAssignedIdentities | The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. | UserAssignedIdentities |
TargetReference
Name | Description | Value |
---|---|---|
id | String of the resource ID of a Target resource. | string (required) |
type | Enum of the Target reference type. | 'ChaosTarget' (required) |
TrackedResourceTags
Name | Description | Value |
---|
UserAssignedIdentities
Name | Description | Value |
---|
UserAssignedIdentity
Name | Description | Value |
---|
ARM template resource definition
The experiments resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Chaos/experiments resource, add the following JSON to your template.
{
"type": "Microsoft.Chaos/experiments",
"apiVersion": "2025-01-01",
"name": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"location": "string",
"properties": {
"selectors": [ {
"filter": {
"type": "string"
// For remaining properties, see ChaosTargetFilter objects
},
"id": "string",
"type": "string"
// For remaining properties, see ChaosTargetSelector objects
} ],
"steps": [
{
"branches": [
{
"actions": [ {
"name": "string",
"type": "string"
// For remaining properties, see ChaosExperimentAction objects
} ],
"name": "string"
}
],
"name": "string"
}
]
},
"tags": {
"{customized property}": "string"
}
}
ChaosTargetFilter objects
Set the type property to specify the type of object.
For Simple, use:
{
"parameters": {
"zones": [ "string" ]
},
"type": "Simple"
}
ChaosExperimentAction objects
Set the type property to specify the type of object.
For continuous, use:
{
"duration": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"selectorId": "string",
"type": "continuous"
}
For delay, use:
{
"duration": "string",
"type": "delay"
}
For discrete, use:
{
"parameters": [
{
"key": "string",
"value": "string"
}
],
"selectorId": "string",
"type": "discrete"
}
ChaosTargetSelector objects
Set the type property to specify the type of object.
For List, use:
{
"targets": [
{
"id": "string",
"type": "string"
}
],
"type": "List"
}
For Query, use:
{
"queryString": "string",
"subscriptionIds": [ "string" ],
"type": "Query"
}
Property Values
Microsoft.Chaos/experiments
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2025-01-01' |
identity | The managed service identities assigned to this resource. | ManagedServiceIdentity |
location | The geo-location where the resource lives | string (required) |
name | The resource name | string Constraints: Min length = 1 Pattern = ^[^<>%&:?#/\\]+$ (required) |
properties | The properties of the experiment resource. | ExperimentProperties (required) |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.Chaos/experiments' |
ChaosExperimentAction
Name | Description | Value |
---|---|---|
name | String that represents a Capability URN. | string Constraints: Max length = 2048 (required) |
type | Set to 'continuous' for type ContinuousAction. Set to 'delay' for type DelayAction. Set to 'discrete' for type DiscreteAction. | 'continuous' 'delay' 'discrete' (required) |
ChaosExperimentBranch
Name | Description | Value |
---|---|---|
actions | List of actions. | ChaosExperimentAction[] (required) |
name | String of the branch name. | string Constraints: Min length = 1 (required) |
ChaosExperimentStep
Name | Description | Value |
---|---|---|
branches | List of branches. | ChaosExperimentBranch[] (required) |
name | String of the step name. | string Constraints: Min length = 1 (required) |
ChaosTargetFilter
Name | Description | Value |
---|---|---|
type | Set to 'Simple' for type ChaosTargetSimpleFilter. | 'Simple' (required) |
ChaosTargetListSelector
Name | Description | Value |
---|---|---|
targets | List of Target references. | TargetReference[] (required) |
type | Chaos target selector discriminator type | 'List' (required) |
ChaosTargetQuerySelector
Name | Description | Value |
---|---|---|
queryString | Azure Resource Graph (ARG) Query Language query for target resources. | string (required) |
subscriptionIds | Subscription id list to scope resource query. | string[] (required) |
type | Chaos target selector discriminator type | 'Query' (required) |
ChaosTargetSelector
Name | Description | Value |
---|---|---|
filter | Model that represents available filter types that can be applied to a targets list. | ChaosTargetFilter |
id | String of the selector ID. | string Constraints: Min length = 1 (required) |
type | Set to 'List' for type ChaosTargetListSelector. Set to 'Query' for type ChaosTargetQuerySelector. | 'List' 'Query' (required) |
ChaosTargetSimpleFilter
Name | Description | Value |
---|---|---|
parameters | Model that represents the Simple filter parameters. | ChaosTargetSimpleFilterParameters |
type | Chaos target filter discriminator type | 'Simple' (required) |
ChaosTargetSimpleFilterParameters
Name | Description | Value |
---|---|---|
zones | List of Azure availability zones to filter targets by. | string[] |
ContinuousAction
Name | Description | Value |
---|---|---|
duration | ISO8601 formatted string that represents a duration. | string (required) |
parameters | List of key value pairs. | KeyValuePair[] (required) |
selectorId | String that represents a selector. | string Constraints: Min length = 1 (required) |
type | Chaos experiment action discriminator type | 'continuous' (required) |
DelayAction
Name | Description | Value |
---|---|---|
duration | ISO8601 formatted string that represents a duration. | string (required) |
type | Chaos experiment action discriminator type | 'delay' (required) |
DiscreteAction
Name | Description | Value |
---|---|---|
parameters | List of key value pairs. | KeyValuePair[] (required) |
selectorId | String that represents a selector. | string Constraints: Min length = 1 (required) |
type | Chaos experiment action discriminator type | 'discrete' (required) |
ExperimentProperties
Name | Description | Value |
---|---|---|
selectors | List of selectors. | ChaosTargetSelector[] (required) |
steps | List of steps. | ChaosExperimentStep[] (required) |
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) |
ManagedServiceIdentity
Name | Description | Value |
---|---|---|
type | Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
userAssignedIdentities | The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. | UserAssignedIdentities |
TargetReference
Name | Description | Value |
---|---|---|
id | String of the resource ID of a Target resource. | string (required) |
type | Enum of the Target reference type. | 'ChaosTarget' (required) |
TrackedResourceTags
Name | Description | Value |
---|
UserAssignedIdentities
Name | Description | Value |
---|
UserAssignedIdentity
Name | Description | Value |
---|
Usage Examples
Terraform (AzAPI provider) resource definition
The experiments 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/experiments resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Chaos/experiments@2025-01-01"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
selectors = [
{
filter = {
type = "string"
// For remaining properties, see ChaosTargetFilter objects
}
id = "string"
type = "string"
// For remaining properties, see ChaosTargetSelector objects
}
]
steps = [
{
branches = [
{
actions = [
{
name = "string"
type = "string"
// For remaining properties, see ChaosExperimentAction objects
}
]
name = "string"
}
]
name = "string"
}
]
}
}
}
ChaosTargetFilter objects
Set the type property to specify the type of object.
For Simple, use:
{
parameters = {
zones = [
"string"
]
}
type = "Simple"
}
ChaosExperimentAction objects
Set the type property to specify the type of object.
For continuous, use:
{
duration = "string"
parameters = [
{
key = "string"
value = "string"
}
]
selectorId = "string"
type = "continuous"
}
For delay, use:
{
duration = "string"
type = "delay"
}
For discrete, use:
{
parameters = [
{
key = "string"
value = "string"
}
]
selectorId = "string"
type = "discrete"
}
ChaosTargetSelector objects
Set the type property to specify the type of object.
For List, use:
{
targets = [
{
id = "string"
type = "string"
}
]
type = "List"
}
For Query, use:
{
queryString = "string"
subscriptionIds = [
"string"
]
type = "Query"
}
Property Values
Microsoft.Chaos/experiments
Name | Description | Value |
---|---|---|
identity | The managed service identities assigned to this resource. | ManagedServiceIdentity |
location | The geo-location where the resource lives | string (required) |
name | The resource name | string Constraints: Min length = 1 Pattern = ^[^<>%&:?#/\\]+$ (required) |
properties | The properties of the experiment resource. | ExperimentProperties (required) |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.Chaos/experiments@2025-01-01" |
ChaosExperimentAction
Name | Description | Value |
---|---|---|
name | String that represents a Capability URN. | string Constraints: Max length = 2048 (required) |
type | Set to 'continuous' for type ContinuousAction. Set to 'delay' for type DelayAction. Set to 'discrete' for type DiscreteAction. | 'continuous' 'delay' 'discrete' (required) |
ChaosExperimentBranch
Name | Description | Value |
---|---|---|
actions | List of actions. | ChaosExperimentAction[] (required) |
name | String of the branch name. | string Constraints: Min length = 1 (required) |
ChaosExperimentStep
Name | Description | Value |
---|---|---|
branches | List of branches. | ChaosExperimentBranch[] (required) |
name | String of the step name. | string Constraints: Min length = 1 (required) |
ChaosTargetFilter
Name | Description | Value |
---|---|---|
type | Set to 'Simple' for type ChaosTargetSimpleFilter. | 'Simple' (required) |
ChaosTargetListSelector
Name | Description | Value |
---|---|---|
targets | List of Target references. | TargetReference[] (required) |
type | Chaos target selector discriminator type | 'List' (required) |
ChaosTargetQuerySelector
Name | Description | Value |
---|---|---|
queryString | Azure Resource Graph (ARG) Query Language query for target resources. | string (required) |
subscriptionIds | Subscription id list to scope resource query. | string[] (required) |
type | Chaos target selector discriminator type | 'Query' (required) |
ChaosTargetSelector
Name | Description | Value |
---|---|---|
filter | Model that represents available filter types that can be applied to a targets list. | ChaosTargetFilter |
id | String of the selector ID. | string Constraints: Min length = 1 (required) |
type | Set to 'List' for type ChaosTargetListSelector. Set to 'Query' for type ChaosTargetQuerySelector. | 'List' 'Query' (required) |
ChaosTargetSimpleFilter
Name | Description | Value |
---|---|---|
parameters | Model that represents the Simple filter parameters. | ChaosTargetSimpleFilterParameters |
type | Chaos target filter discriminator type | 'Simple' (required) |
ChaosTargetSimpleFilterParameters
Name | Description | Value |
---|---|---|
zones | List of Azure availability zones to filter targets by. | string[] |
ContinuousAction
Name | Description | Value |
---|---|---|
duration | ISO8601 formatted string that represents a duration. | string (required) |
parameters | List of key value pairs. | KeyValuePair[] (required) |
selectorId | String that represents a selector. | string Constraints: Min length = 1 (required) |
type | Chaos experiment action discriminator type | 'continuous' (required) |
DelayAction
Name | Description | Value |
---|---|---|
duration | ISO8601 formatted string that represents a duration. | string (required) |
type | Chaos experiment action discriminator type | 'delay' (required) |
DiscreteAction
Name | Description | Value |
---|---|---|
parameters | List of key value pairs. | KeyValuePair[] (required) |
selectorId | String that represents a selector. | string Constraints: Min length = 1 (required) |
type | Chaos experiment action discriminator type | 'discrete' (required) |
ExperimentProperties
Name | Description | Value |
---|---|---|
selectors | List of selectors. | ChaosTargetSelector[] (required) |
steps | List of steps. | ChaosExperimentStep[] (required) |
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) |
ManagedServiceIdentity
Name | Description | Value |
---|---|---|
type | Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
userAssignedIdentities | The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. | UserAssignedIdentities |
TargetReference
Name | Description | Value |
---|---|---|
id | String of the resource ID of a Target resource. | string (required) |
type | Enum of the Target reference type. | 'ChaosTarget' (required) |
TrackedResourceTags
Name | Description | Value |
---|
UserAssignedIdentities
Name | Description | Value |
---|
UserAssignedIdentity
Name | Description | Value |
---|