Skip to content
v2.278.0

ExperimentTemplateTargetProperty ​

Struct External

Specifies a target for an experiment.

You must specify at least one Amazon Resource Name (ARN) or at least one resource tag. You cannot specify both ARNs and tags.

For more information, see Targets in the AWS Fault Injection Service User Guide .

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';
const experimentTemplateTargetProperty: fis.CfnExperimentTemplate.ExperimentTemplateTargetProperty = {
  resourceType: 'resourceType',
  selectionMode: 'selectionMode',

  // the properties below are optional
  filters: [{
    path: 'path',
    values: ['values'],
  }],
  parameters: {
    parametersKey: 'parameters',
  },
  resourceArns: ['resourceArns'],
  resourceTags: {
    resourceTagsKey: 'resourceTags',
  },
};
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

experiment_template_target_property = 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"
    }
)
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.*;

ExperimentTemplateTargetProperty experimentTemplateTargetProperty = 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();
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 experimentTemplateTargetProperty = 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" }
    }
};
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"

experimentTemplateTargetProperty := &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"),
	},
}

Properties ​

filtersoptionalIResolvable | IResolvable | CfnExperimentTemplate.ExperimentTemplateTargetFilterProperty[]filtersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ExperimentTemplateTargetFilterProperty]]]filtersoptionalIResolvableFiltersoptionalIResolvableFiltersoptionalinterface{} #
The filters to apply to identify target resources using specific attributes.
parametersoptionalIResolvable | { [key: string]: string }parametersoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]parametersoptionalIResolvableParametersoptionalIResolvableParametersoptionalinterface{} #
The parameters for the resource type.
resourceArnsoptionalstring[]resource_arnsoptionaltyping.List[str]resourceArnsoptionalList<String>ResourceArnsoptionalstring[]ResourceArnsoptional*[]*string #
The Amazon Resource Names (ARNs) of the targets.
resourceTagsoptionalIResolvable | { [key: string]: string }resource_tagsoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]resourceTagsoptionalIResolvableResourceTagsoptionalIResolvableResourceTagsoptionalinterface{} #
The tags for the target resources.
resourceTypestringresource_typestrresourceTypeStringResourceTypestringResourceType*string required #
The resource type.
selectionModestringselection_modestrselectionModeStringSelectionModestringSelectionMode*string required #
Scopes the identified resources to a specific count or percentage.