Skip to content
v2.278.0

CfnExperimentTemplateProps ​

Struct External

Properties for defining a CfnExperimentTemplate.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_fis as fis } from 'aws-cdk-lib';

declare const cloudWatchLogsConfiguration: any;
declare const s3Configuration: any;
const cfnExperimentTemplateProps: fis.CfnExperimentTemplateProps = {
  description: 'description',
  roleArn: 'roleArn',
  stopConditions: [{
    source: 'source',

    // the properties below are optional
    value: 'value',
  }],
  targets: {
    targetsKey: {
      resourceType: 'resourceType',
      selectionMode: 'selectionMode',

      // the properties below are optional
      filters: [{
        path: 'path',
        values: ['values'],
      }],
      parameters: {
        parametersKey: 'parameters',
      },
      resourceArns: ['resourceArns'],
      resourceTags: {
        resourceTagsKey: 'resourceTags',
      },
    },
  },

  // the properties below are optional
  actions: {
    actionsKey: {
      actionId: 'actionId',

      // the properties below are optional
      description: 'description',
      parameters: {
        parametersKey: 'parameters',
      },
      startAfter: ['startAfter'],
      targets: {
        targetsKey: 'targets',
      },
    },
  },
  experimentOptions: {
    accountTargeting: 'accountTargeting',
    emptyTargetResolutionMode: 'emptyTargetResolutionMode',
  },
  experimentReportConfiguration: {
    outputs: {
      experimentReportS3Configuration: {
        bucketName: 'bucketName',

        // the properties below are optional
        prefix: 'prefix',
      },
    },

    // the properties below are optional
    dataSources: {
      cloudWatchDashboards: [{
        dashboardIdentifier: 'dashboardIdentifier',
      }],
    },
    postExperimentDuration: 'postExperimentDuration',
    preExperimentDuration: 'preExperimentDuration',
  },
  logConfiguration: {
    logSchemaVersion: 123,

    // the properties below are optional
    cloudWatchLogsConfiguration: cloudWatchLogsConfiguration,
    s3Configuration: s3Configuration,
  },
  tags: {
    tagsKey: 'tags',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_fis as fis

# cloud_watch_logs_configuration: Any
# s3_configuration: Any

cfn_experiment_template_props = fis.CfnExperimentTemplateProps(
    description="description",
    role_arn="roleArn",
    stop_conditions=[fis.CfnExperimentTemplate.ExperimentTemplateStopConditionProperty(
        source="source",

        # the properties below are optional
        value="value"
    )],
    targets={
        "targets_key": fis.CfnExperimentTemplate.ExperimentTemplateTargetProperty(
            resource_type="resourceType",
            selection_mode="selectionMode",

            # the properties below are optional
            filters=[fis.CfnExperimentTemplate.ExperimentTemplateTargetFilterProperty(
                path="path",
                values=["values"]
            )],
            parameters={
                "parameters_key": "parameters"
            },
            resource_arns=["resourceArns"],
            resource_tags={
                "resource_tags_key": "resourceTags"
            }
        )
    },

    # the properties below are optional
    actions={
        "actions_key": fis.CfnExperimentTemplate.ExperimentTemplateActionProperty(
            action_id="actionId",

            # the properties below are optional
            description="description",
            parameters={
                "parameters_key": "parameters"
            },
            start_after=["startAfter"],
            targets={
                "targets_key": "targets"
            }
        )
    },
    experiment_options=fis.CfnExperimentTemplate.ExperimentTemplateExperimentOptionsProperty(
        account_targeting="accountTargeting",
        empty_target_resolution_mode="emptyTargetResolutionMode"
    ),
    experiment_report_configuration=fis.CfnExperimentTemplate.ExperimentTemplateExperimentReportConfigurationProperty(
        outputs=fis.CfnExperimentTemplate.OutputsProperty(
            experiment_report_s3_configuration=fis.CfnExperimentTemplate.ExperimentReportS3ConfigurationProperty(
                bucket_name="bucketName",

                # the properties below are optional
                prefix="prefix"
            )
        ),

        # the properties below are optional
        data_sources=fis.CfnExperimentTemplate.DataSourcesProperty(
            cloud_watch_dashboards=[fis.CfnExperimentTemplate.CloudWatchDashboardProperty(
                dashboard_identifier="dashboardIdentifier"
            )]
        ),
        post_experiment_duration="postExperimentDuration",
        pre_experiment_duration="preExperimentDuration"
    ),
    log_configuration=fis.CfnExperimentTemplate.ExperimentTemplateLogConfigurationProperty(
        log_schema_version=123,

        # the properties below are optional
        cloud_watch_logs_configuration=cloud_watch_logs_configuration,
        s3_configuration=s3_configuration
    ),
    tags={
        "tags_key": "tags"
    }
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.fis.*;

Object cloudWatchLogsConfiguration;
Object s3Configuration;

CfnExperimentTemplateProps cfnExperimentTemplateProps = CfnExperimentTemplateProps.builder()
        .description("description")
        .roleArn("roleArn")
        .stopConditions(List.of(ExperimentTemplateStopConditionProperty.builder()
                .source("source")

                // the properties below are optional
                .value("value")
                .build()))
        .targets(Map.of(
                "targetsKey", ExperimentTemplateTargetProperty.builder()
                        .resourceType("resourceType")
                        .selectionMode("selectionMode")

                        // the properties below are optional
                        .filters(List.of(ExperimentTemplateTargetFilterProperty.builder()
                                .path("path")
                                .values(List.of("values"))
                                .build()))
                        .parameters(Map.of(
                                "parametersKey", "parameters"))
                        .resourceArns(List.of("resourceArns"))
                        .resourceTags(Map.of(
                                "resourceTagsKey", "resourceTags"))
                        .build()))

        // the properties below are optional
        .actions(Map.of(
                "actionsKey", ExperimentTemplateActionProperty.builder()
                        .actionId("actionId")

                        // the properties below are optional
                        .description("description")
                        .parameters(Map.of(
                                "parametersKey", "parameters"))
                        .startAfter(List.of("startAfter"))
                        .targets(Map.of(
                                "targetsKey", "targets"))
                        .build()))
        .experimentOptions(ExperimentTemplateExperimentOptionsProperty.builder()
                .accountTargeting("accountTargeting")
                .emptyTargetResolutionMode("emptyTargetResolutionMode")
                .build())
        .experimentReportConfiguration(ExperimentTemplateExperimentReportConfigurationProperty.builder()
                .outputs(OutputsProperty.builder()
                        .experimentReportS3Configuration(ExperimentReportS3ConfigurationProperty.builder()
                                .bucketName("bucketName")

                                // the properties below are optional
                                .prefix("prefix")
                                .build())
                        .build())

                // the properties below are optional
                .dataSources(DataSourcesProperty.builder()
                        .cloudWatchDashboards(List.of(CloudWatchDashboardProperty.builder()
                                .dashboardIdentifier("dashboardIdentifier")
                                .build()))
                        .build())
                .postExperimentDuration("postExperimentDuration")
                .preExperimentDuration("preExperimentDuration")
                .build())
        .logConfiguration(ExperimentTemplateLogConfigurationProperty.builder()
                .logSchemaVersion(123)

                // the properties below are optional
                .cloudWatchLogsConfiguration(cloudWatchLogsConfiguration)
                .s3Configuration(s3Configuration)
                .build())
        .tags(Map.of(
                "tagsKey", "tags"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.FIS;

var cloudWatchLogsConfiguration;
var s3Configuration;

var cfnExperimentTemplateProps = new CfnExperimentTemplateProps {
    Description = "description",
    RoleArn = "roleArn",
    StopConditions = new [] { new ExperimentTemplateStopConditionProperty {
        Source = "source",

        // the properties below are optional
        Value = "value"
    } },
    Targets = new Dictionary<string, object> {
        { "targetsKey", new ExperimentTemplateTargetProperty {
            ResourceType = "resourceType",
            SelectionMode = "selectionMode",

            // the properties below are optional
            Filters = new [] { new ExperimentTemplateTargetFilterProperty {
                Path = "path",
                Values = new [] { "values" }
            } },
            Parameters = new Dictionary<string, string> {
                { "parametersKey", "parameters" }
            },
            ResourceArns = new [] { "resourceArns" },
            ResourceTags = new Dictionary<string, string> {
                { "resourceTagsKey", "resourceTags" }
            }
        } }
    },

    // the properties below are optional
    Actions = new Dictionary<string, object> {
        { "actionsKey", new ExperimentTemplateActionProperty {
            ActionId = "actionId",

            // the properties below are optional
            Description = "description",
            Parameters = new Dictionary<string, string> {
                { "parametersKey", "parameters" }
            },
            StartAfter = new [] { "startAfter" },
            Targets = new Dictionary<string, string> {
                { "targetsKey", "targets" }
            }
        } }
    },
    ExperimentOptions = new ExperimentTemplateExperimentOptionsProperty {
        AccountTargeting = "accountTargeting",
        EmptyTargetResolutionMode = "emptyTargetResolutionMode"
    },
    ExperimentReportConfiguration = new ExperimentTemplateExperimentReportConfigurationProperty {
        Outputs = new OutputsProperty {
            ExperimentReportS3Configuration = new ExperimentReportS3ConfigurationProperty {
                BucketName = "bucketName",

                // the properties below are optional
                Prefix = "prefix"
            }
        },

        // the properties below are optional
        DataSources = new DataSourcesProperty {
            CloudWatchDashboards = new [] { new CloudWatchDashboardProperty {
                DashboardIdentifier = "dashboardIdentifier"
            } }
        },
        PostExperimentDuration = "postExperimentDuration",
        PreExperimentDuration = "preExperimentDuration"
    },
    LogConfiguration = new ExperimentTemplateLogConfigurationProperty {
        LogSchemaVersion = 123,

        // the properties below are optional
        CloudWatchLogsConfiguration = cloudWatchLogsConfiguration,
        S3Configuration = s3Configuration
    },
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var cloudWatchLogsConfiguration interface{}
var s3Configuration interface{}

cfnExperimentTemplateProps := &CfnExperimentTemplateProps{
	Description: jsii.String("description"),
	RoleArn: jsii.String("roleArn"),
	StopConditions: []interface{}{
		&ExperimentTemplateStopConditionProperty{
			Source: jsii.String("source"),

			// the properties below are optional
			Value: jsii.String("value"),
		},
	},
	Targets: map[string]interface{}{
		"targetsKey": &ExperimentTemplateTargetProperty{
			"resourceType": jsii.String("resourceType"),
			"selectionMode": jsii.String("selectionMode"),

			// the properties below are optional
			"filters": []interface{}{
				&ExperimentTemplateTargetFilterProperty{
					"path": jsii.String("path"),
					"values": []*string{
						jsii.String("values"),
					},
				},
			},
			"parameters": map[string]*string{
				"parametersKey": jsii.String("parameters"),
			},
			"resourceArns": []*string{
				jsii.String("resourceArns"),
			},
			"resourceTags": map[string]*string{
				"resourceTagsKey": jsii.String("resourceTags"),
			},
		},
	},

	// the properties below are optional
	Actions: map[string]interface{}{
		"actionsKey": &ExperimentTemplateActionProperty{
			"actionId": jsii.String("actionId"),

			// the properties below are optional
			"description": jsii.String("description"),
			"parameters": map[string]*string{
				"parametersKey": jsii.String("parameters"),
			},
			"startAfter": []*string{
				jsii.String("startAfter"),
			},
			"targets": map[string]*string{
				"targetsKey": jsii.String("targets"),
			},
		},
	},
	ExperimentOptions: &ExperimentTemplateExperimentOptionsProperty{
		AccountTargeting: jsii.String("accountTargeting"),
		EmptyTargetResolutionMode: jsii.String("emptyTargetResolutionMode"),
	},
	ExperimentReportConfiguration: &ExperimentTemplateExperimentReportConfigurationProperty{
		Outputs: &OutputsProperty{
			ExperimentReportS3Configuration: &ExperimentReportS3ConfigurationProperty{
				BucketName: jsii.String("bucketName"),

				// the properties below are optional
				Prefix: jsii.String("prefix"),
			},
		},

		// the properties below are optional
		DataSources: &DataSourcesProperty{
			CloudWatchDashboards: []interface{}{
				&CloudWatchDashboardProperty{
					DashboardIdentifier: jsii.String("dashboardIdentifier"),
				},
			},
		},
		PostExperimentDuration: jsii.String("postExperimentDuration"),
		PreExperimentDuration: jsii.String("preExperimentDuration"),
	},
	LogConfiguration: &ExperimentTemplateLogConfigurationProperty{
		LogSchemaVersion: jsii.Number(123),

		// the properties below are optional
		CloudWatchLogsConfiguration: cloudWatchLogsConfiguration,
		S3Configuration: s3Configuration,
	},
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}

Properties ​

actionsoptionalIResolvable | { [key: string]: IResolvable | CfnExperimentTemplate.ExperimentTemplateActionProperty }actionsoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, ExperimentTemplateActionProperty]]]actionsoptionalIResolvableActionsoptionalIResolvableActionsoptionalinterface{} #
The actions for the experiment.
descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string required #
The description for the experiment template.
experimentOptionsoptionalIResolvable | CfnExperimentTemplate.ExperimentTemplateExperimentOptionsPropertyexperiment_optionsoptionaltyping.Union[IResolvable, ExperimentTemplateExperimentOptionsProperty]experimentOptionsoptionalIResolvableExperimentOptionsoptionalIResolvableExperimentOptionsoptionalinterface{} #
The experiment options for an experiment template.
experimentReportConfigurationoptionalIResolvable | CfnExperimentTemplate.ExperimentTemplateExperimentReportConfigurationPropertyexperiment_report_configurationoptionaltyping.Union[IResolvable, ExperimentTemplateExperimentReportConfigurationProperty]experimentReportConfigurationoptionalIResolvableExperimentReportConfigurationoptionalIResolvableExperimentReportConfigurationoptionalinterface{} #
Describes the report configuration for the experiment template.
logConfigurationoptionalIResolvable | CfnExperimentTemplate.ExperimentTemplateLogConfigurationPropertylog_configurationoptionaltyping.Union[IResolvable, ExperimentTemplateLogConfigurationProperty]logConfigurationoptionalIResolvableLogConfigurationoptionalIResolvableLogConfigurationoptionalinterface{} #
The configuration for experiment logging.
roleArnstring | IRoleRefrole_arntyping.Union[str, IRoleRef]roleArnStringRoleArnstringRoleArninterface{} required #
The Amazon Resource Name (ARN) of an IAM role.
stopConditionsIResolvable | IResolvable | CfnExperimentTemplate.ExperimentTemplateStopConditionProperty[]stop_conditionstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ExperimentTemplateStopConditionProperty]]]stopConditionsIResolvableStopConditionsIResolvableStopConditionsinterface{} required #
The stop conditions for the experiment.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #
The tags for the experiment template.
targetsIResolvable | { [key: string]: IResolvable | CfnExperimentTemplate.ExperimentTemplateTargetProperty }targetstyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, ExperimentTemplateTargetProperty]]]targetsIResolvableTargetsIResolvableTargetsinterface{} required #
The targets for the experiment.