/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.fis.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* 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 * Fault Injection Simulator User Guide. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateExperimentTemplateTargetInput implements Serializable, Cloneable, StructuredPojo { /** ** The resource type. The resource type must be supported for the specified action. *
*/ private String resourceType; /** ** The Amazon Resource Names (ARNs) of the resources. *
*/ private java.util.List* The tags for the target resources. *
*/ private java.util.Map* The filters to apply to identify target resources using specific attributes. *
*/ private java.util.List* 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. *
** The resource type parameters. *
*/ private java.util.Map* The resource type. The resource type must be supported for the specified action. *
* * @param resourceType * The resource type. The resource type must be supported for the specified action. */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** ** The resource type. The resource type must be supported for the specified action. *
* * @return The resource type. The resource type must be supported for the specified action. */ public String getResourceType() { return this.resourceType; } /** ** The resource type. The resource type must be supported for the specified action. *
* * @param resourceType * The resource type. The resource type must be supported for the specified action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateExperimentTemplateTargetInput withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** ** The Amazon Resource Names (ARNs) of the resources. *
* * @return The Amazon Resource Names (ARNs) of the resources. */ public java.util.List* The Amazon Resource Names (ARNs) of the resources. *
* * @param resourceArns * The Amazon Resource Names (ARNs) of the resources. */ public void setResourceArns(java.util.Collection* The Amazon Resource Names (ARNs) of the resources. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setResourceArns(java.util.Collection)} or {@link #withResourceArns(java.util.Collection)} if you want to * override the existing values. *
* * @param resourceArns * The Amazon Resource Names (ARNs) of the resources. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateExperimentTemplateTargetInput withResourceArns(String... resourceArns) { if (this.resourceArns == null) { setResourceArns(new java.util.ArrayList* The Amazon Resource Names (ARNs) of the resources. *
* * @param resourceArns * The Amazon Resource Names (ARNs) of the resources. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateExperimentTemplateTargetInput withResourceArns(java.util.Collection* The tags for the target resources. *
* * @return The tags for the target resources. */ public java.util.Map* The tags for the target resources. *
* * @param resourceTags * The tags for the target resources. */ public void setResourceTags(java.util.Map* The tags for the target resources. *
* * @param resourceTags * The tags for the target resources. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateExperimentTemplateTargetInput withResourceTags(java.util.Map* The filters to apply to identify target resources using specific attributes. *
* * @return The filters to apply to identify target resources using specific attributes. */ public java.util.List* The filters to apply to identify target resources using specific attributes. *
* * @param filters * The filters to apply to identify target resources using specific attributes. */ public void setFilters(java.util.Collection* The filters to apply to identify target resources using specific attributes. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setFilters(java.util.Collection)} or {@link #withFilters(java.util.Collection)} if you want to override * the existing values. *
* * @param filters * The filters to apply to identify target resources using specific attributes. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateExperimentTemplateTargetInput withFilters(ExperimentTemplateTargetInputFilter... filters) { if (this.filters == null) { setFilters(new java.util.ArrayList* The filters to apply to identify target resources using specific attributes. *
* * @param filters * The filters to apply to identify target resources using specific attributes. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateExperimentTemplateTargetInput withFilters(java.util.Collection* 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. *
** 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. *
** 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. *
** 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. *
** 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. *
** 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. *
** The resource type parameters. *
* * @return The resource type parameters. */ public java.util.Map* The resource type parameters. *
* * @param parameters * The resource type parameters. */ public void setParameters(java.util.Map* The resource type parameters. *
* * @param parameters * The resource type parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateExperimentTemplateTargetInput withParameters(java.util.Map