Interface CfnExperimentTemplate.ExperimentTemplateTargetProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnExperimentTemplate.ExperimentTemplateTargetProperty.Jsii$Proxy
Enclosing class:
CfnExperimentTemplate

@Stability(Stable) public static interface CfnExperimentTemplate.ExperimentTemplateTargetProperty extends software.amazon.jsii.JsiiSerializable
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 Simulator User Guide .

Example:

 // 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();
 
  • Method Details

    • getResourceType

      @Stability(Stable) @NotNull String getResourceType()
      The resource type.

      The resource type must be supported for the specified action.

    • getSelectionMode

      @Stability(Stable) @NotNull String getSelectionMode()
      Scopes the identified resources to a specific count of the resources at random, or a percentage of the resources.

      All identified resources are included in the target.

      • ALL - Run the action on all identified targets. This is the default.
      • COUNT(n) - Run the action on the specified number of targets, chosen from the identified targets at random. For example, COUNT(1) selects one of the targets.
      • PERCENT(n) - Run the action on the specified percentage of targets, chosen from the identified targets at random. For example, PERCENT(25) selects 25% of the targets.
    • getFilters

      @Stability(Stable) @Nullable default Object getFilters()
      The filters to apply to identify target resources using specific attributes.
    • getParameters

      @Stability(Stable) @Nullable default Object getParameters()
      The parameters for the resource type.
    • getResourceArns

      @Stability(Stable) @Nullable default List<String> getResourceArns()
      The Amazon Resource Names (ARNs) of the resources.
    • getResourceTags

      @Stability(Stable) @Nullable default Object getResourceTags()
      The tags for the target resources.
    • builder

      Returns:
      a CfnExperimentTemplate.ExperimentTemplateTargetProperty.Builder of CfnExperimentTemplate.ExperimentTemplateTargetProperty