Skip to main content

experiment_templates

Creates, updates, deletes, gets or lists an experiment_templates resource.

Overview​

Nameexperiment_templates
TypeResource
Idaws.fis.experiment_templates

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the experiment template. (pattern: <code>[\S]+</code>)
actionsobjectThe actions for the experiment.
arnstringThe Amazon Resource Name (ARN) of the experiment template. (pattern: <code>[\S]+</code>)
creation_timestring (date-time)The time the experiment template was created.
descriptionstringThe description for the experiment template. (pattern: <code>[\s\S]+</code>)
experiment_optionsobjectThe experiment options for an experiment template.
experiment_report_configurationobjectDescribes the report configuration for the experiment template.
last_update_timestring (date-time)The time the experiment template was last updated.
log_configurationobjectThe configuration for experiment logging.
role_arnstringThe Amazon Resource Name (ARN) of an IAM role. (pattern: <code>[\S]+</code>)
stop_conditionsarrayThe stop conditions for the experiment.
tagsobjectThe tags for the experiment template.
target_account_configurations_countinteger (int64)The count of target account configurations for the experiment template.
targetsobjectThe targets for the experiment.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_experiment_templateselectid, regionGets information about the specified experiment template.
list_experiment_templatesselectregionmaxResults, nextTokenLists your experiment templates.
create_experiment_templateinsertregion, clientToken, description, stopConditions, actions, roleArnCreates 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_templateupdateid, regionUpdates the specified experiment template.
delete_experiment_templatedeleteid, regionDeletes 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.

NameDatatypeDescription
idstringThe ID of the experiment template.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
nextTokenstringThe token for the next page of results.

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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​

Deletes the specified experiment template.

DELETE FROM aws.fis.experiment_templates
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;