experiment_templates
Creates, updates, deletes or gets an experiment_template resource or lists experiment_templates in a region
Overview
| Name | experiment_templates |
| Type | Resource |
| Description | Resource schema for AWS::FIS::ExperimentTemplate |
| Id | awscc.fis.experiment_templates |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | |
description | string | A description for the experiment template. |
targets | object | The targets for the experiment. |
actions | object | The actions for the experiment. |
stop_conditions | array | One or more stop conditions. |
log_configuration | object | |
role_arn | string | The Amazon Resource Name (ARN) of an IAM role that grants the AWS FIS service permission to perform service actions on your behalf. |
tags | object | |
experiment_options | object | |
experiment_report_configuration | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
region | string | AWS region. |
For more information, see AWS::FIS::ExperimentTemplate.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | experiment_templates | INSERT | Description, StopConditions, Targets, RoleArn, region |
delete_resource | experiment_templates | DELETE | Identifier, region |
update_resource | experiment_templates | UPDATE | Identifier, PatchDocument, region |
list_resources | experiment_templates_list_only | SELECT | region |
get_resource | experiment_templates | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual experiment_template.
SELECT
region,
id,
description,
targets,
actions,
stop_conditions,
log_configuration,
role_arn,
tags,
experiment_options,
experiment_report_configuration
FROM awscc.fis.experiment_templates
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all experiment_templates in a region.
SELECT
region,
id
FROM awscc.fis.experiment_templates_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new experiment_template resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.fis.experiment_templates (
Description,
Targets,
StopConditions,
RoleArn,
region
)
SELECT
'{{ description }}',
'{{ targets }}',
'{{ stop_conditions }}',
'{{ role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.fis.experiment_templates (
Description,
Targets,
Actions,
StopConditions,
LogConfiguration,
RoleArn,
Tags,
ExperimentOptions,
ExperimentReportConfiguration,
region
)
SELECT
'{{ description }}',
'{{ targets }}',
'{{ actions }}',
'{{ stop_conditions }}',
'{{ log_configuration }}',
'{{ role_arn }}',
'{{ tags }}',
'{{ experiment_options }}',
'{{ experiment_report_configuration }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: experiment_template
props:
- name: description
value: '{{ description }}'
- name: targets
value: {}
- name: actions
value: {}
- name: stop_conditions
value:
- source: '{{ source }}'
value: '{{ value }}'
- name: log_configuration
value:
cloud_watch_logs_configuration:
log_group_arn: '{{ log_group_arn }}'
s3_configuration:
bucket_name: '{{ bucket_name }}'
prefix: '{{ prefix }}'
log_schema_version: '{{ log_schema_version }}'
- name: role_arn
value: '{{ role_arn }}'
- name: tags
value: {}
- name: experiment_options
value:
account_targeting: '{{ account_targeting }}'
empty_target_resolution_mode: '{{ empty_target_resolution_mode }}'
- name: experiment_report_configuration
value:
outputs:
experiment_report_s3_configuration:
bucket_name: '{{ bucket_name }}'
prefix: '{{ prefix }}'
data_sources:
cloud_watch_dashboards:
- dashboard_identifier: '{{ dashboard_identifier }}'
pre_experiment_duration: '{{ pre_experiment_duration }}'
post_experiment_duration: '{{ post_experiment_duration }}'
UPDATE example
Use the following StackQL query and manifest file to update a experiment_template resource, using stack-deploy.
/*+ update */
UPDATE awscc.fis.experiment_templates
SET PatchDocument = string('{{ {
"Description": description,
"Targets": targets,
"Actions": actions,
"StopConditions": stop_conditions,
"LogConfiguration": log_configuration,
"RoleArn": role_arn,
"Tags": tags,
"ExperimentReportConfiguration": experiment_report_configuration
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.fis.experiment_templates
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the experiment_templates resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
fis:CreateExperimentTemplate,
fis:TagResource,
iam:PassRole
fis:GetExperimentTemplate,
fis:ListTagsForResource
fis:UpdateExperimentTemplate,
fis:TagResource,
fis:UntagResource,
iam:PassRole
fis:DeleteExperimentTemplate
fis:ListExperimentTemplates,
fis:ListTagsForResource