experiment_templates
Creates, updates, deletes, gets or lists an experiment_templates resource.
Overview
| Name | experiment_templates |
| Type | Resource |
| Id | aws.fis.experiment_templates |
Fields
The following fields are returned by SELECT queries:
- get_experiment_template
- list_experiment_templates
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the experiment template. (pattern: <code>[\S]+</code>) |
actions | object | The actions for the experiment. |
arn | string | The Amazon Resource Name (ARN) of the experiment template. (pattern: <code>[\S]+</code>) |
creation_time | string (date-time) | The time the experiment template was created. |
description | string | The description for the experiment template. (pattern: <code>[\s\S]+</code>) |
experiment_options | object | The experiment options for an experiment template. |
experiment_report_configuration | object | Describes the report configuration for the experiment template. |
last_update_time | string (date-time) | The time the experiment template was last updated. |
log_configuration | object | The configuration for experiment logging. |
role_arn | string | The Amazon Resource Name (ARN) of an IAM role. (pattern: <code>[\S]+</code>) |
stop_conditions | array | The stop conditions for the experiment. |
tags | object | The tags for the experiment template. |
target_account_configurations_count | integer (int64) | The count of target account configurations for the experiment template. |
targets | object | The targets for the experiment. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the experiment template. (pattern: <code>[\S]+</code>) |
arn | string | The Amazon Resource Name (ARN) of the experiment template. (pattern: <code>[\S]+</code>) |
creation_time | string (date-time) | The time that the experiment template was created. |
description | string | The description of the experiment template. (pattern: <code>[\s\S]+</code>) |
last_update_time | string (date-time) | The time that the experiment template was last updated. |
tags | object | The tags for the experiment template. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_experiment_template | select | id, region | Gets information about the specified experiment template. | |
list_experiment_templates | select | region | maxResults, nextToken | Lists your experiment templates. |
create_experiment_template | insert | region, clientToken, description, stopConditions, actions, roleArn | Creates an experiment template. An experiment template includes the following components: Targets: A target can be a specific resource in your Amazon Web Services environment, or one or more resources that match criteria that you specify, for example, resources that have specific tags. Actions: The actions to carry out on the target. You can specify multiple actions, the duration of each action, and when to start each action during an experiment. Stop conditions: If a stop condition is triggered while an experiment is running, the experiment is automatically stopped. You can define a stop condition as a CloudWatch alarm. For more information, see experiment templates in the Fault Injection Service User Guide. | |
update_experiment_template | update | id, region | Updates the specified experiment template. | |
delete_experiment_template | delete | id, region | Deletes the specified experiment template. |
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 |
|---|---|---|
id | string | The ID of the experiment template. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. |
nextToken | string | The token for the next page of results. |
SELECT examples
- get_experiment_template
- list_experiment_templates
Gets information about the specified experiment template.
SELECT
id,
actions,
arn,
creation_time,
description,
experiment_options,
experiment_report_configuration,
last_update_time,
log_configuration,
role_arn,
stop_conditions,
tags,
target_account_configurations_count,
targets
FROM aws.fis.experiment_templates
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Lists your experiment templates.
SELECT
id,
arn,
creation_time,
description,
last_update_time,
tags
FROM aws.fis.experiment_templates
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_experiment_template
- Manifest
Creates an experiment template. An experiment template includes the following components: Targets: A target can be a specific resource in your Amazon Web Services environment, or one or more resources that match criteria that you specify, for example, resources that have specific tags. Actions: The actions to carry out on the target. You can specify multiple actions, the duration of each action, and when to start each action during an experiment. Stop conditions: If a stop condition is triggered while an experiment is running, the experiment is automatically stopped. You can define a stop condition as a CloudWatch alarm. For more information, see experiment templates in the Fault Injection Service User Guide.
INSERT INTO aws.fis.experiment_templates (
clientToken,
description,
stopConditions,
targets,
actions,
roleArn,
tags,
logConfiguration,
experimentOptions,
experimentReportConfiguration,
region
)
SELECT
'{{ clientToken }}' /* required */,
'{{ description }}' /* required */,
'{{ stopConditions }}' /* required */,
'{{ targets }}',
'{{ actions }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ tags }}',
'{{ logConfiguration }}',
'{{ experimentOptions }}',
'{{ experimentReportConfiguration }}',
'{{ region }}'
RETURNING
experiment_template
;
# Description fields are for documentation purposes
- name: experiment_templates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the experiment_templates resource.
- name: clientToken
value: "{{ clientToken }}"
- name: description
value: "{{ description }}"
- name: stopConditions
value:
- source: "{{ source }}"
value: "{{ value }}"
- name: targets
value: "{{ targets }}"
- name: actions
value: "{{ actions }}"
- name: roleArn
value: "{{ roleArn }}"
- name: tags
value: "{{ tags }}"
- name: logConfiguration
description: |
Specifies the configuration for experiment logging.
value:
cloudWatchLogsConfiguration:
logGroupArn: "{{ logGroupArn }}"
s3Configuration:
bucketName: "{{ bucketName }}"
prefix: "{{ prefix }}"
logSchemaVersion: {{ logSchemaVersion }}
- name: experimentOptions
description: |
Specifies experiment options for an experiment template.
value:
accountTargeting: "{{ accountTargeting }}"
emptyTargetResolutionMode: "{{ emptyTargetResolutionMode }}"
- name: experimentReportConfiguration
description: |
Specifies the configuration for experiment reports.
value:
outputs:
s3Configuration:
bucketName: "{{ bucketName }}"
prefix: "{{ prefix }}"
dataSources:
cloudWatchDashboards:
- dashboardIdentifier: "{{ dashboardIdentifier }}"
preExperimentDuration: "{{ preExperimentDuration }}"
postExperimentDuration: "{{ postExperimentDuration }}"
UPDATE examples
- update_experiment_template
Updates the specified experiment template.
UPDATE aws.fis.experiment_templates
SET
description = '{{ description }}',
stopConditions = '{{ stopConditions }}',
targets = '{{ targets }}',
actions = '{{ actions }}',
roleArn = '{{ roleArn }}',
logConfiguration = '{{ logConfiguration }}',
experimentOptions = '{{ experimentOptions }}',
experimentReportConfiguration = '{{ experimentReportConfiguration }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
RETURNING
experiment_template;
DELETE examples
- delete_experiment_template
Deletes the specified experiment template.
DELETE FROM aws.fis.experiment_templates
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;