experiments
Creates, updates, deletes, gets or lists an experiments resource.
Overview
| Name | experiments |
| Type | Resource |
| Id | azure.chaos.experiments |
Fields
The following fields are returned by SELECT queries:
- get_execution
- get
- list
- list_all
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
provisioningState | string | Resource provisioning state. Not currently in use for executions. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting", and "Running". (Succeeded, Failed, Canceled, Creating, Updating, Deleting, Running) |
startedAt | string (date-time) | String that represents the start date time. |
status | string | The status of the execution. |
stoppedAt | string (date-time) | String that represents the stop date time. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
customerDataStorage | object | Optional customer-managed Storage account where Experiment schema will be stored. |
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Most recent provisioning state for the given experiment resource. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting", and "Running". (Succeeded, Failed, Canceled, Creating, Updating, Deleting, Running) |
selectors | array | List of selectors. Required. |
steps | array | List of steps. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
customerDataStorage | object | Optional customer-managed Storage account where Experiment schema will be stored. |
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Most recent provisioning state for the given experiment resource. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting", and "Running". (Succeeded, Failed, Canceled, Creating, Updating, Deleting, Running) |
selectors | array | List of selectors. Required. |
steps | array | List of steps. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
customerDataStorage | object | Optional customer-managed Storage account where Experiment schema will be stored. |
identity | object | The managed service identities assigned to this resource. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Most recent provisioning state for the given experiment resource. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting", and "Running". (Succeeded, Failed, Canceled, Creating, Updating, Deleting, Running) |
selectors | array | List of selectors. Required. |
steps | array | List of steps. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
execution_id | string | GUID that represents a Experiment execution detail. Required. |
experiment_name | string | String that represents a Experiment resource name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
continuationToken | string | String that sets the continuation token. Default value is None. |
running | boolean | Optional value that indicates whether to filter results based on if the Experiment is currently running. If null, then the results will not be filtered. Default value is None. |
SELECT examples
- get_execution
- get
- list
- list_all
Get an execution of an Experiment resource.
SELECT
id,
name,
provisioningState,
startedAt,
status,
stoppedAt,
systemData,
type
FROM azure.chaos.experiments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND experiment_name = '{{ experiment_name }}' -- required
AND execution_id = '{{ execution_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get a Experiment resource.
SELECT
id,
name,
customerDataStorage,
identity,
location,
provisioningState,
selectors,
steps,
systemData,
tags,
type
FROM azure.chaos.experiments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND experiment_name = '{{ experiment_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get a list of Experiment resources in a resource group.
SELECT
id,
name,
customerDataStorage,
identity,
location,
provisioningState,
selectors,
steps,
systemData,
tags,
type
FROM azure.chaos.experiments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND running = '{{ running }}'
AND continuationToken = '{{ continuationToken }}'
;
Get a list of Experiment resources in a subscription.
SELECT
id,
name,
customerDataStorage,
identity,
location,
provisioningState,
selectors,
steps,
systemData,
tags,
type
FROM azure.chaos.experiments
WHERE subscription_id = '{{ subscription_id }}' -- required
AND running = '{{ running }}'
AND continuationToken = '{{ continuationToken }}'
;
INSERT examples
- create_or_update
- Manifest
Create or update a Experiment resource.
INSERT INTO azure.chaos.experiments (
tags,
location,
identity,
properties,
resource_group_name,
experiment_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ identity }}',
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ experiment_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: experiments
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the experiments resource.
- name: experiment_name
value: "{{ experiment_name }}"
description: Required parameter for the experiments resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the experiments resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: identity
description: |
The managed service identities assigned to this resource.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: properties
description: |
The properties of the experiment resource. Required.
value:
provisioningState: "{{ provisioningState }}"
steps:
- name: "{{ name }}"
branches: "{{ branches }}"
selectors:
- id: "{{ id }}"
type: "{{ type }}"
filter:
type: "{{ type }}"
customerDataStorage:
storageAccountResourceId: "{{ storageAccountResourceId }}"
blobContainerName: "{{ blobContainerName }}"
UPDATE examples
- update
The operation to update an experiment.
UPDATE azure.chaos.experiments
SET
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND experiment_name = '{{ experiment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Create or update a Experiment resource.
REPLACE azure.chaos.experiments
SET
tags = '{{ tags }}',
location = '{{ location }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND experiment_name = '{{ experiment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete a Experiment resource.
DELETE FROM azure.chaos.experiments
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND experiment_name = '{{ experiment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_all_executions
- cancel
- start
- execution_details
Get a list of executions of an Experiment resource.
EXEC azure.chaos.experiments.list_all_executions
@resource_group_name='{{ resource_group_name }}' --required,
@experiment_name='{{ experiment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Cancel a running Experiment resource.
EXEC azure.chaos.experiments.cancel
@resource_group_name='{{ resource_group_name }}' --required,
@experiment_name='{{ experiment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Start a Experiment resource.
EXEC azure.chaos.experiments.start
@resource_group_name='{{ resource_group_name }}' --required,
@experiment_name='{{ experiment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Execution details of an experiment resource.
EXEC azure.chaos.experiments.execution_details
@resource_group_name='{{ resource_group_name }}' --required,
@experiment_name='{{ experiment_name }}' --required,
@execution_id='{{ execution_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;