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@2021-09-15-preview' = {
identity: {
type: 'string'
}
location: 'string'
name: 'string'
properties: {
selectors: [
{
id: 'string'
targets: [
{
id: 'string'
type: 'ChaosTarget'
}
]
type: 'string'
}
]
startOnCreation: bool
steps: [
{
branches: [
{
actions: [
{
name: 'string'
type: 'string'
// For remaining properties, see Action objects
}
]
name: 'string'
}
]
name: 'string'
}
]
}
tags: {
{customized property}: 'string'
}
}
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) |
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 Constraints: Pattern = ^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$ (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 Constraints: Pattern = ^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$ (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) |
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) |
ResourceIdentity
Name | Description | Value |
---|---|---|
type | String of the resource identity type. | 'None' 'SystemAssigned' (required) |
Selector
Name | Description | Value |
---|---|---|
id | String of the selector ID. | string Constraints: Min length = 1 (required) |
targets | List of Target references. | TargetReference[] (required) |
type | Enum of the selector type. | 'List' 'Percent' 'Random' 'Tag' (required) |
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 |
---|
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": "2021-09-15-preview",
"name": "string",
"identity": {
"type": "string"
},
"location": "string",
"properties": {
"selectors": [
{
"id": "string",
"targets": [
{
"id": "string",
"type": "ChaosTarget"
}
],
"type": "string"
}
],
"startOnCreation": "bool",
"steps": [
{
"branches": [
{
"actions": [ {
"name": "string",
"type": "string"
// For remaining properties, see Action objects
} ],
"name": "string"
}
],
"name": "string"
}
]
},
"tags": {
"{customized property}": "string"
}
}
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 | '2021-09-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 Constraints: Pattern = ^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$ (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 Constraints: Pattern = ^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$ (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) |
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) |
ResourceIdentity
Name | Description | Value |
---|---|---|
type | String of the resource identity type. | 'None' 'SystemAssigned' (required) |
Selector
Name | Description | Value |
---|---|---|
id | String of the selector ID. | string Constraints: Min length = 1 (required) |
targets | List of Target references. | TargetReference[] (required) |
type | Enum of the selector type. | 'List' 'Percent' 'Random' 'Tag' (required) |
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 |
---|
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@2021-09-15-preview"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
selectors = [
{
id = "string"
targets = [
{
id = "string"
type = "ChaosTarget"
}
]
type = "string"
}
]
startOnCreation = bool
steps = [
{
branches = [
{
actions = [
{
name = "string"
type = "string"
// For remaining properties, see Action objects
}
]
name = "string"
}
]
name = "string"
}
]
}
}
}
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) |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.Chaos/experiments@2021-09-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 Constraints: Pattern = ^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$ (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 Constraints: Pattern = ^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$ (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) |
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) |
ResourceIdentity
Name | Description | Value |
---|---|---|
type | String of the resource identity type. | 'None' 'SystemAssigned' (required) |
Selector
Name | Description | Value |
---|---|---|
id | String of the selector ID. | string Constraints: Min length = 1 (required) |
targets | List of Target references. | TargetReference[] (required) |
type | Enum of the selector type. | 'List' 'Percent' 'Random' 'Tag' (required) |
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 |
---|