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:
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@2023-04-15-preview' = {
scope: resourceSymbolicName or scope
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
___location: 'string'
name: 'string'
properties: {
selectors: [
{
filter: {
type: 'string'
// For remaining properties, see Filter objects
}
id: 'string'
type: 'string'
// For remaining properties, see Selector objects
}
]
startOnCreation: bool
steps: [
{
branches: [
{
actions: [
{
name: 'string'
type: 'string'
// For remaining properties, see Action objects
}
]
name: 'string'
}
]
name: 'string'
}
]
}
tags: {
{customized property}: 'string'
}
}
Selector 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'
}
Filter objects
Set the type property to specify the type of object.
For Simple, use:
{
parameters: {
zones: [
'string'
]
}
type: 'Simple'
}
Action 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'
}
Property Values
Microsoft.Chaos/experiments
| Name | Description | Value |
|---|---|---|
| identity | The identity of the experiment resource. | ResourceIdentity |
| ___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) |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
Action
| 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) |
Branch
| Name | Description | Value |
|---|---|---|
| actions | List of actions. | Action[] (required) |
| name | String of the branch name. | string Constraints: Min length = 1 (required) |
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 | Enum that discriminates between action models. | 'continuous' (required) |
DelayAction
| Name | Description | Value |
|---|---|---|
| duration | ISO8601 formatted string that represents a duration. | string (required) |
| type | Enum that discriminates between action models. | '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 | Enum that discriminates between action models. | 'discrete' (required) |
ExperimentProperties
| Name | Description | Value |
|---|---|---|
| selectors | List of selectors. | Selector[] (required) |
| startOnCreation | A boolean value that indicates if experiment should be started on creation or not. | bool |
| steps | List of steps. | Step[] (required) |
Filter
| Name | Description | Value |
|---|---|---|
| type | Set to 'Simple' for type SimpleFilter. | 'Simple' (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) |
ListSelector
| Name | Description | Value |
|---|---|---|
| targets | List of Target references. | TargetReference[] (required) |
| type | Enum of the selector type. | 'List' (required) |
QuerySelector
| 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 | Enum of the selector type. | 'Query' (required) |
ResourceIdentity
| Name | Description | Value |
|---|---|---|
| type | String of the resource identity type. | 'None' 'SystemAssigned' 'UserAssigned' (required) |
| userAssignedIdentities | The list of user identities associated with the Experiment. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. | UserAssignedIdentities |
Selector
| Name | Description | Value |
|---|---|---|
| filter | Model that represents available filter types that can be applied to a targets list. | Filter |
| id | String of the selector ID. | string Constraints: Min length = 1 (required) |
| type | Set to 'List' for type ListSelector. Set to 'Query' for type QuerySelector. | 'List' 'Query' (required) |
SimpleFilter
| Name | Description | Value |
|---|---|---|
| parameters | Model that represents the Simple filter parameters. | SimpleFilterParameters |
| type | Enum that discriminates between filter types. Currently only Simple type is supported. |
'Simple' (required) |
SimpleFilterParameters
| Name | Description | Value |
|---|---|---|
| zones | List of Azure availability zones to filter targets by. | string[] |
Step
| Name | Description | Value |
|---|---|---|
| branches | List of branches. | Branch[] (required) |
| name | String of the step name. | string Constraints: Min length = 1 (required) |
TargetReference
| Name | Description | Value |
|---|---|---|
| id | String of the resource ID of a Target resource. | string Constraints: Pattern = ^\/[Ss][Uu][Bb][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn][Ss]\/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\/[Rr][Ee][Ss][Oo][Uu][Rr][Cc][Ee][Gg][Rr][Oo][Uu][Pp][Ss]\/[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+\/[a-zA-Z0-9_\-\.]+\/[a-zA-Z0-9_\-\.]+\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[Mm][Ii][Cc][Rr][Oo][Ss][Oo][Ff][Tt]\.[Cc][Hh][Aa][Oo][Ss]\/[Tt][Aa][Rr][Gg][Ee][Tt][Ss]\/[a-zA-Z0-9_\-\.]+$ (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:
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": "2023-04-15-preview",
"name": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"___location": "string",
"properties": {
"selectors": [ {
"filter": {
"type": "string"
// For remaining properties, see Filter objects
},
"id": "string",
"type": "string"
// For remaining properties, see Selector objects
} ],
"startOnCreation": "bool",
"steps": [
{
"branches": [
{
"actions": [ {
"name": "string",
"type": "string"
// For remaining properties, see Action objects
} ],
"name": "string"
}
],
"name": "string"
}
]
},
"tags": {
"{customized property}": "string"
}
}
Selector 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"
}
Filter objects
Set the type property to specify the type of object.
For Simple, use:
{
"parameters": {
"zones": [ "string" ]
},
"type": "Simple"
}
Action 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"
}
Property Values
Microsoft.Chaos/experiments
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2023-04-15-preview' |
| identity | The identity of the experiment resource. | ResourceIdentity |
| ___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' |
Action
| 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) |
Branch
| Name | Description | Value |
|---|---|---|
| actions | List of actions. | Action[] (required) |
| name | String of the branch name. | string Constraints: Min length = 1 (required) |
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 | Enum that discriminates between action models. | 'continuous' (required) |
DelayAction
| Name | Description | Value |
|---|---|---|
| duration | ISO8601 formatted string that represents a duration. | string (required) |
| type | Enum that discriminates between action models. | '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 | Enum that discriminates between action models. | 'discrete' (required) |
ExperimentProperties
| Name | Description | Value |
|---|---|---|
| selectors | List of selectors. | Selector[] (required) |
| startOnCreation | A boolean value that indicates if experiment should be started on creation or not. | bool |
| steps | List of steps. | Step[] (required) |
Filter
| Name | Description | Value |
|---|---|---|
| type | Set to 'Simple' for type SimpleFilter. | 'Simple' (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) |
ListSelector
| Name | Description | Value |
|---|---|---|
| targets | List of Target references. | TargetReference[] (required) |
| type | Enum of the selector type. | 'List' (required) |
QuerySelector
| 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 | Enum of the selector type. | 'Query' (required) |
ResourceIdentity
| Name | Description | Value |
|---|---|---|
| type | String of the resource identity type. | 'None' 'SystemAssigned' 'UserAssigned' (required) |
| userAssignedIdentities | The list of user identities associated with the Experiment. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. | UserAssignedIdentities |
Selector
| Name | Description | Value |
|---|---|---|
| filter | Model that represents available filter types that can be applied to a targets list. | Filter |
| id | String of the selector ID. | string Constraints: Min length = 1 (required) |
| type | Set to 'List' for type ListSelector. Set to 'Query' for type QuerySelector. | 'List' 'Query' (required) |
SimpleFilter
| Name | Description | Value |
|---|---|---|
| parameters | Model that represents the Simple filter parameters. | SimpleFilterParameters |
| type | Enum that discriminates between filter types. Currently only Simple type is supported. |
'Simple' (required) |
SimpleFilterParameters
| Name | Description | Value |
|---|---|---|
| zones | List of Azure availability zones to filter targets by. | string[] |
Step
| Name | Description | Value |
|---|---|---|
| branches | List of branches. | Branch[] (required) |
| name | String of the step name. | string Constraints: Min length = 1 (required) |
TargetReference
| Name | Description | Value |
|---|---|---|
| id | String of the resource ID of a Target resource. | string Constraints: Pattern = ^\/[Ss][Uu][Bb][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn][Ss]\/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\/[Rr][Ee][Ss][Oo][Uu][Rr][Cc][Ee][Gg][Rr][Oo][Uu][Pp][Ss]\/[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+\/[a-zA-Z0-9_\-\.]+\/[a-zA-Z0-9_\-\.]+\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[Mm][Ii][Cc][Rr][Oo][Ss][Oo][Ff][Tt]\.[Cc][Hh][Aa][Oo][Ss]\/[Tt][Aa][Rr][Gg][Ee][Tt][Ss]\/[a-zA-Z0-9_\-\.]+$ (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:
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@2023-04-15-preview"
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 Filter objects
}
id = "string"
type = "string"
// For remaining properties, see Selector objects
}
]
startOnCreation = bool
steps = [
{
branches = [
{
actions = [
{
name = "string"
type = "string"
// For remaining properties, see Action objects
}
]
name = "string"
}
]
name = "string"
}
]
}
}
}
Selector 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"
}
Filter objects
Set the type property to specify the type of object.
For Simple, use:
{
parameters = {
zones = [
"string"
]
}
type = "Simple"
}
Action 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"
}
Property Values
Microsoft.Chaos/experiments
| Name | Description | Value |
|---|---|---|
| identity | The identity of the experiment resource. | ResourceIdentity |
| ___location | The geo-___location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Pattern = ^[^<>%&:?#/\\]+$ (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (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@2023-04-15-preview" |
Action
| 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) |
Branch
| Name | Description | Value |
|---|---|---|
| actions | List of actions. | Action[] (required) |
| name | String of the branch name. | string Constraints: Min length = 1 (required) |
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 | Enum that discriminates between action models. | 'continuous' (required) |
DelayAction
| Name | Description | Value |
|---|---|---|
| duration | ISO8601 formatted string that represents a duration. | string (required) |
| type | Enum that discriminates between action models. | '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 | Enum that discriminates between action models. | 'discrete' (required) |
ExperimentProperties
| Name | Description | Value |
|---|---|---|
| selectors | List of selectors. | Selector[] (required) |
| startOnCreation | A boolean value that indicates if experiment should be started on creation or not. | bool |
| steps | List of steps. | Step[] (required) |
Filter
| Name | Description | Value |
|---|---|---|
| type | Set to 'Simple' for type SimpleFilter. | 'Simple' (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) |
ListSelector
| Name | Description | Value |
|---|---|---|
| targets | List of Target references. | TargetReference[] (required) |
| type | Enum of the selector type. | 'List' (required) |
QuerySelector
| 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 | Enum of the selector type. | 'Query' (required) |
ResourceIdentity
| Name | Description | Value |
|---|---|---|
| type | String of the resource identity type. | 'None' 'SystemAssigned' 'UserAssigned' (required) |
| userAssignedIdentities | The list of user identities associated with the Experiment. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. | UserAssignedIdentities |
Selector
| Name | Description | Value |
|---|---|---|
| filter | Model that represents available filter types that can be applied to a targets list. | Filter |
| id | String of the selector ID. | string Constraints: Min length = 1 (required) |
| type | Set to 'List' for type ListSelector. Set to 'Query' for type QuerySelector. | 'List' 'Query' (required) |
SimpleFilter
| Name | Description | Value |
|---|---|---|
| parameters | Model that represents the Simple filter parameters. | SimpleFilterParameters |
| type | Enum that discriminates between filter types. Currently only Simple type is supported. |
'Simple' (required) |
SimpleFilterParameters
| Name | Description | Value |
|---|---|---|
| zones | List of Azure availability zones to filter targets by. | string[] |
Step
| Name | Description | Value |
|---|---|---|
| branches | List of branches. | Branch[] (required) |
| name | String of the step name. | string Constraints: Min length = 1 (required) |
TargetReference
| Name | Description | Value |
|---|---|---|
| id | String of the resource ID of a Target resource. | string Constraints: Pattern = ^\/[Ss][Uu][Bb][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn][Ss]\/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\/[Rr][Ee][Ss][Oo][Uu][Rr][Cc][Ee][Gg][Rr][Oo][Uu][Pp][Ss]\/[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+\/[a-zA-Z0-9_\-\.]+\/[a-zA-Z0-9_\-\.]+\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[Mm][Ii][Cc][Rr][Oo][Ss][Oo][Ff][Tt]\.[Cc][Hh][Aa][Oo][Ss]\/[Tt][Aa][Rr][Gg][Ee][Tt][Ss]\/[a-zA-Z0-9_\-\.]+$ (required) |
| type | Enum of the Target reference type. | 'ChaosTarget' (required) |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentities
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|