All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.cloudformation.model.CreateChangeSetRequest Maven / Gradle / Ivy

/*
 * Copyright 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 software.amazon.awssdk.services.cloudformation.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The input for the CreateChangeSet action. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CreateChangeSetRequest extends CloudFormationRequest implements ToCopyableBuilder { private static final SdkField STACK_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StackName").getter(getter(CreateChangeSetRequest::stackName)).setter(setter(Builder::stackName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackName").build()).build(); private static final SdkField TEMPLATE_BODY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("TemplateBody").getter(getter(CreateChangeSetRequest::templateBody)) .setter(setter(Builder::templateBody)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TemplateBody").build()).build(); private static final SdkField TEMPLATE_URL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("TemplateURL").getter(getter(CreateChangeSetRequest::templateURL)).setter(setter(Builder::templateURL)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TemplateURL").build()).build(); private static final SdkField USE_PREVIOUS_TEMPLATE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("UsePreviousTemplate").getter(getter(CreateChangeSetRequest::usePreviousTemplate)) .setter(setter(Builder::usePreviousTemplate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UsePreviousTemplate").build()) .build(); private static final SdkField> PARAMETERS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Parameters") .getter(getter(CreateChangeSetRequest::parameters)) .setter(setter(Builder::parameters)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Parameters").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Parameter::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> CAPABILITIES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Capabilities") .getter(getter(CreateChangeSetRequest::capabilitiesAsStrings)) .setter(setter(Builder::capabilitiesWithStrings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Capabilities").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> RESOURCE_TYPES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ResourceTypes") .getter(getter(CreateChangeSetRequest::resourceTypes)) .setter(setter(Builder::resourceTypes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceTypes").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RoleARN").getter(getter(CreateChangeSetRequest::roleARN)).setter(setter(Builder::roleARN)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleARN").build()).build(); private static final SdkField ROLLBACK_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("RollbackConfiguration") .getter(getter(CreateChangeSetRequest::rollbackConfiguration)).setter(setter(Builder::rollbackConfiguration)) .constructor(RollbackConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RollbackConfiguration").build()) .build(); private static final SdkField> NOTIFICATION_AR_NS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("NotificationARNs") .getter(getter(CreateChangeSetRequest::notificationARNs)) .setter(setter(Builder::notificationARNs)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NotificationARNs").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(CreateChangeSetRequest::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Tag::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CHANGE_SET_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ChangeSetName").getter(getter(CreateChangeSetRequest::changeSetName)) .setter(setter(Builder::changeSetName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChangeSetName").build()).build(); private static final SdkField CLIENT_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ClientToken").getter(getter(CreateChangeSetRequest::clientToken)).setter(setter(Builder::clientToken)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClientToken").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Description").getter(getter(CreateChangeSetRequest::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField CHANGE_SET_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ChangeSetType").getter(getter(CreateChangeSetRequest::changeSetTypeAsString)) .setter(setter(Builder::changeSetType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChangeSetType").build()).build(); private static final SdkField> RESOURCES_TO_IMPORT_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ResourcesToImport") .getter(getter(CreateChangeSetRequest::resourcesToImport)) .setter(setter(Builder::resourcesToImport)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourcesToImport").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ResourceToImport::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STACK_NAME_FIELD, TEMPLATE_BODY_FIELD, TEMPLATE_URL_FIELD, USE_PREVIOUS_TEMPLATE_FIELD, PARAMETERS_FIELD, CAPABILITIES_FIELD, RESOURCE_TYPES_FIELD, ROLE_ARN_FIELD, ROLLBACK_CONFIGURATION_FIELD, NOTIFICATION_AR_NS_FIELD, TAGS_FIELD, CHANGE_SET_NAME_FIELD, CLIENT_TOKEN_FIELD, DESCRIPTION_FIELD, CHANGE_SET_TYPE_FIELD, RESOURCES_TO_IMPORT_FIELD)); private final String stackName; private final String templateBody; private final String templateURL; private final Boolean usePreviousTemplate; private final List parameters; private final List capabilities; private final List resourceTypes; private final String roleARN; private final RollbackConfiguration rollbackConfiguration; private final List notificationARNs; private final List tags; private final String changeSetName; private final String clientToken; private final String description; private final String changeSetType; private final List resourcesToImport; private CreateChangeSetRequest(BuilderImpl builder) { super(builder); this.stackName = builder.stackName; this.templateBody = builder.templateBody; this.templateURL = builder.templateURL; this.usePreviousTemplate = builder.usePreviousTemplate; this.parameters = builder.parameters; this.capabilities = builder.capabilities; this.resourceTypes = builder.resourceTypes; this.roleARN = builder.roleARN; this.rollbackConfiguration = builder.rollbackConfiguration; this.notificationARNs = builder.notificationARNs; this.tags = builder.tags; this.changeSetName = builder.changeSetName; this.clientToken = builder.clientToken; this.description = builder.description; this.changeSetType = builder.changeSetType; this.resourcesToImport = builder.resourcesToImport; } /** *

* The name or the unique ID of the stack for which you are creating a change set. AWS CloudFormation generates the * change set by comparing this stack's information with the information that you submit, such as a modified * template or different parameter input values. *

* * @return The name or the unique ID of the stack for which you are creating a change set. AWS CloudFormation * generates the change set by comparing this stack's information with the information that you submit, such * as a modified template or different parameter input values. */ public String stackName() { return stackName; } /** *

* A structure that contains the body of the revised template, with a minimum length of 1 byte and a maximum length * of 51,200 bytes. AWS CloudFormation generates the change set by comparing this template with the template of the * stack that you specified. *

*

* Conditional: You must specify only TemplateBody or TemplateURL. *

* * @return A structure that contains the body of the revised template, with a minimum length of 1 byte and a maximum * length of 51,200 bytes. AWS CloudFormation generates the change set by comparing this template with the * template of the stack that you specified.

*

* Conditional: You must specify only TemplateBody or TemplateURL. */ public String templateBody() { return templateBody; } /** *

* The location of the file that contains the revised template. The URL must point to a template (max size: 460,800 * bytes) that is located in an S3 bucket. AWS CloudFormation generates the change set by comparing this template * with the stack that you specified. *

*

* Conditional: You must specify only TemplateBody or TemplateURL. *

* * @return The location of the file that contains the revised template. The URL must point to a template (max size: * 460,800 bytes) that is located in an S3 bucket. AWS CloudFormation generates the change set by comparing * this template with the stack that you specified.

*

* Conditional: You must specify only TemplateBody or TemplateURL. */ public String templateURL() { return templateURL; } /** *

* Whether to reuse the template that is associated with the stack to create the change set. *

* * @return Whether to reuse the template that is associated with the stack to create the change set. */ public Boolean usePreviousTemplate() { return usePreviousTemplate; } /** * Returns true if the Parameters property was specified by the sender (it may be empty), or false if the sender did * not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasParameters() { return parameters != null && !(parameters instanceof SdkAutoConstructList); } /** *

* A list of Parameter structures that specify input parameters for the change set. For more * information, see the Parameter data type. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasParameters()} to see if a value was sent in this field. *

* * @return A list of Parameter structures that specify input parameters for the change set. For more * information, see the Parameter data type. */ public List parameters() { return parameters; } /** *

* In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order * for AWS CloudFormation to create the stack. *

*
    *
  • *

    * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

    *

    * Some stack templates might include resources that can affect permissions in your AWS account; for example, by * creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge * this by specifying one of these capabilities. *

    *

    * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

    *
      *
    • *

      * If you have IAM resources, you can specify either capability. *

      *
    • *
    • *

      * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. *

      *
    • *
    • *

      * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

      *
    • *
    *

    * If your stack template contains these resources, we recommend that you review all permissions associated with * them and edit their permissions if necessary. *

    * *

    * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

    *
  • *
  • *

    * CAPABILITY_AUTO_EXPAND *

    *

    * Some template contain macros. Macros perform custom processing on templates; this can include simple actions like * find-and-replace operations, all the way to extensive transformations of entire templates. Because of this, users * typically create a change set from the processed template, so that they can review the changes resulting from the * macros before actually creating the stack. If your stack template contains one or more macros, and you choose to * create a stack directly from the processed template, without first reviewing the resulting changes in a change * set, you must acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

    * *

    * This capacity does not apply to creating change sets, and specifying it when creating change sets has no effect. *

    *

    * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack template * that contains macros and nested stacks, you must create or update the stack directly from the template * using the CreateStack or UpdateStack action, and specifying this capability. *

    *
    *

    * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

    *
  • *
*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasCapabilities()} to see if a value was sent in this field. *

* * @return In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in * order for AWS CloudFormation to create the stack.

*
    *
  • *

    * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

    *

    * Some stack templates might include resources that can affect permissions in your AWS account; for * example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must * explicitly acknowledge this by specifying one of these capabilities. *

    *

    * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

    *
      *
    • *

      * If you have IAM resources, you can specify either capability. *

      *
    • *
    • *

      * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. *

      *
    • *
    • *

      * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

      *
    • *
    *

    * If your stack template contains these resources, we recommend that you review all permissions associated * with them and edit their permissions if necessary. *

    * *

    * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

    *
  • *
  • *

    * CAPABILITY_AUTO_EXPAND *

    *

    * Some template contain macros. Macros perform custom processing on templates; this can include simple * actions like find-and-replace operations, all the way to extensive transformations of entire templates. * Because of this, users typically create a change set from the processed template, so that they can review * the changes resulting from the macros before actually creating the stack. If your stack template contains * one or more macros, and you choose to create a stack directly from the processed template, without first * reviewing the resulting changes in a change set, you must acknowledge this capability. This includes the * AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

    * *

    * This capacity does not apply to creating change sets, and specifying it when creating change sets has no * effect. *

    *

    * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack * template that contains macros and nested stacks, you must create or update the stack directly from * the template using the CreateStack or UpdateStack action, and specifying this capability. *

    *
    *

    * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

    *
  • */ public List capabilities() { return CapabilitiesCopier.copyStringToEnum(capabilities); } /** * Returns true if the Capabilities property was specified by the sender (it may be empty), or false if the sender * did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasCapabilities() { return capabilities != null && !(capabilities instanceof SdkAutoConstructList); } /** *

    * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order * for AWS CloudFormation to create the stack. *

    *
      *
    • *

      * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

      *

      * Some stack templates might include resources that can affect permissions in your AWS account; for example, by * creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge * this by specifying one of these capabilities. *

      *

      * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

      *
        *
      • *

        * If you have IAM resources, you can specify either capability. *

        *
      • *
      • *

        * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. *

        *
      • *
      • *

        * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

        *
      • *
      *

      * If your stack template contains these resources, we recommend that you review all permissions associated with * them and edit their permissions if necessary. *

      * *

      * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

      *
    • *
    • *

      * CAPABILITY_AUTO_EXPAND *

      *

      * Some template contain macros. Macros perform custom processing on templates; this can include simple actions like * find-and-replace operations, all the way to extensive transformations of entire templates. Because of this, users * typically create a change set from the processed template, so that they can review the changes resulting from the * macros before actually creating the stack. If your stack template contains one or more macros, and you choose to * create a stack directly from the processed template, without first reviewing the resulting changes in a change * set, you must acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

      * *

      * This capacity does not apply to creating change sets, and specifying it when creating change sets has no effect. *

      *

      * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack template * that contains macros and nested stacks, you must create or update the stack directly from the template * using the CreateStack or UpdateStack action, and specifying this capability. *

      *
      *

      * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

      *
    • *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    *

    * You can use {@link #hasCapabilities()} to see if a value was sent in this field. *

    * * @return In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in * order for AWS CloudFormation to create the stack.

    *
      *
    • *

      * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

      *

      * Some stack templates might include resources that can affect permissions in your AWS account; for * example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must * explicitly acknowledge this by specifying one of these capabilities. *

      *

      * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

      *
        *
      • *

        * If you have IAM resources, you can specify either capability. *

        *
      • *
      • *

        * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. *

        *
      • *
      • *

        * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

        *
      • *
      *

      * If your stack template contains these resources, we recommend that you review all permissions associated * with them and edit their permissions if necessary. *

      * *

      * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

      *
    • *
    • *

      * CAPABILITY_AUTO_EXPAND *

      *

      * Some template contain macros. Macros perform custom processing on templates; this can include simple * actions like find-and-replace operations, all the way to extensive transformations of entire templates. * Because of this, users typically create a change set from the processed template, so that they can review * the changes resulting from the macros before actually creating the stack. If your stack template contains * one or more macros, and you choose to create a stack directly from the processed template, without first * reviewing the resulting changes in a change set, you must acknowledge this capability. This includes the * AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

      * *

      * This capacity does not apply to creating change sets, and specifying it when creating change sets has no * effect. *

      *

      * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack * template that contains macros and nested stacks, you must create or update the stack directly from * the template using the CreateStack or UpdateStack action, and specifying this capability. *

      *
      *

      * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

      *
    • */ public List capabilitiesAsStrings() { return capabilities; } /** * Returns true if the ResourceTypes property was specified by the sender (it may be empty), or false if the sender * did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasResourceTypes() { return resourceTypes != null && !(resourceTypes instanceof SdkAutoConstructList); } /** *

      * The template resource types that you have permissions to work with if you execute this change set, such as * AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance. *

      *

      * If the list of resource types doesn't include a resource type that you're updating, the stack update fails. By * default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management (IAM) * uses this parameter for condition keys in IAM policies for AWS CloudFormation. For more information, see Controlling Access * with AWS Identity and Access Management in the AWS CloudFormation User Guide. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * You can use {@link #hasResourceTypes()} to see if a value was sent in this field. *

      * * @return The template resource types that you have permissions to work with if you execute this change set, such * as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance * .

      *

      * If the list of resource types doesn't include a resource type that you're updating, the stack update * fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access * Management (IAM) uses this parameter for condition keys in IAM policies for AWS CloudFormation. For more * information, see Controlling * Access with AWS Identity and Access Management in the AWS CloudFormation User Guide. */ public List resourceTypes() { return resourceTypes; } /** *

      * The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation * assumes when executing the change set. AWS CloudFormation uses the role's credentials to make calls on your * behalf. AWS CloudFormation uses this role for all future operations on the stack. As long as users have * permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to * pass it. Ensure that the role grants least privilege. *

      *

      * If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If * no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials. *

      * * @return The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS * CloudFormation assumes when executing the change set. AWS CloudFormation uses the role's credentials to * make calls on your behalf. AWS CloudFormation uses this role for all future operations on the stack. As * long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the * users don't have permission to pass it. Ensure that the role grants least privilege.

      *

      * If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the * stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your * user credentials. */ public String roleARN() { return roleARN; } /** *

      * The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, and for * the specified monitoring period afterwards. *

      * * @return The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, * and for the specified monitoring period afterwards. */ public RollbackConfiguration rollbackConfiguration() { return rollbackConfiguration; } /** * Returns true if the NotificationARNs property was specified by the sender (it may be empty), or false if the * sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS * service. */ public boolean hasNotificationARNs() { return notificationARNs != null && !(notificationARNs instanceof SdkAutoConstructList); } /** *

      * The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon SNS) topics that AWS * CloudFormation associates with the stack. To remove all associated notification topics, specify an empty list. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * You can use {@link #hasNotificationARNs()} to see if a value was sent in this field. *

      * * @return The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon SNS) topics that AWS * CloudFormation associates with the stack. To remove all associated notification topics, specify an empty * list. */ public List notificationARNs() { return notificationARNs; } /** * Returns true if the Tags property was specified by the sender (it may be empty), or false if the sender did not * specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

      * Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to resources in the * stack. You can specify a maximum of 50 tags. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * You can use {@link #hasTags()} to see if a value was sent in this field. *

      * * @return Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to resources * in the stack. You can specify a maximum of 50 tags. */ public List tags() { return tags; } /** *

      * The name of the change set. The name must be unique among all change sets that are associated with the specified * stack. *

      *

      * A change set name can contain only alphanumeric, case sensitive characters and hyphens. It must start with an * alphabetic character and cannot exceed 128 characters. *

      * * @return The name of the change set. The name must be unique among all change sets that are associated with the * specified stack.

      *

      * A change set name can contain only alphanumeric, case sensitive characters and hyphens. It must start * with an alphabetic character and cannot exceed 128 characters. */ public String changeSetName() { return changeSetName; } /** *

      * A unique identifier for this CreateChangeSet request. Specify this token if you plan to retry * requests so that AWS CloudFormation knows that you're not attempting to create another change set with the same * name. You might retry CreateChangeSet requests to ensure that AWS CloudFormation successfully * received them. *

      * * @return A unique identifier for this CreateChangeSet request. Specify this token if you plan to * retry requests so that AWS CloudFormation knows that you're not attempting to create another change set * with the same name. You might retry CreateChangeSet requests to ensure that AWS * CloudFormation successfully received them. */ public String clientToken() { return clientToken; } /** *

      * A description to help you identify this change set. *

      * * @return A description to help you identify this change set. */ public String description() { return description; } /** *

      * The type of change set operation. To create a change set for a new stack, specify CREATE. To create * a change set for an existing stack, specify UPDATE. To create a change set for an import operation, * specify IMPORT. *

      *

      * If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, but no * template or resources. The stack will be in the * REVIEW_IN_PROGRESS state until you execute the change set. *

      *

      * By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE type to * create a change set for a new stack or the CREATE type to create a change set for an existing stack. *

      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #changeSetType} * will return {@link ChangeSetType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #changeSetTypeAsString}. *

      * * @return The type of change set operation. To create a change set for a new stack, specify CREATE. To * create a change set for an existing stack, specify UPDATE. To create a change set for an * import operation, specify IMPORT.

      *

      * If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, * but no template or resources. The stack will be in the REVIEW_IN_PROGRESS state until you execute the change set. *

      *

      * By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE type * to create a change set for a new stack or the CREATE type to create a change set for an * existing stack. * @see ChangeSetType */ public ChangeSetType changeSetType() { return ChangeSetType.fromValue(changeSetType); } /** *

      * The type of change set operation. To create a change set for a new stack, specify CREATE. To create * a change set for an existing stack, specify UPDATE. To create a change set for an import operation, * specify IMPORT. *

      *

      * If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, but no * template or resources. The stack will be in the * REVIEW_IN_PROGRESS state until you execute the change set. *

      *

      * By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE type to * create a change set for a new stack or the CREATE type to create a change set for an existing stack. *

      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #changeSetType} * will return {@link ChangeSetType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #changeSetTypeAsString}. *

      * * @return The type of change set operation. To create a change set for a new stack, specify CREATE. To * create a change set for an existing stack, specify UPDATE. To create a change set for an * import operation, specify IMPORT.

      *

      * If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, * but no template or resources. The stack will be in the REVIEW_IN_PROGRESS state until you execute the change set. *

      *

      * By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE type * to create a change set for a new stack or the CREATE type to create a change set for an * existing stack. * @see ChangeSetType */ public String changeSetTypeAsString() { return changeSetType; } /** * Returns true if the ResourcesToImport property was specified by the sender (it may be empty), or false if the * sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS * service. */ public boolean hasResourcesToImport() { return resourcesToImport != null && !(resourcesToImport instanceof SdkAutoConstructList); } /** *

      * The resources to import into your stack. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * You can use {@link #hasResourcesToImport()} to see if a value was sent in this field. *

      * * @return The resources to import into your stack. */ public List resourcesToImport() { return resourcesToImport; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(stackName()); hashCode = 31 * hashCode + Objects.hashCode(templateBody()); hashCode = 31 * hashCode + Objects.hashCode(templateURL()); hashCode = 31 * hashCode + Objects.hashCode(usePreviousTemplate()); hashCode = 31 * hashCode + Objects.hashCode(parameters()); hashCode = 31 * hashCode + Objects.hashCode(capabilitiesAsStrings()); hashCode = 31 * hashCode + Objects.hashCode(resourceTypes()); hashCode = 31 * hashCode + Objects.hashCode(roleARN()); hashCode = 31 * hashCode + Objects.hashCode(rollbackConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(notificationARNs()); hashCode = 31 * hashCode + Objects.hashCode(tags()); hashCode = 31 * hashCode + Objects.hashCode(changeSetName()); hashCode = 31 * hashCode + Objects.hashCode(clientToken()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(changeSetTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(resourcesToImport()); return hashCode; } @Override public boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateChangeSetRequest)) { return false; } CreateChangeSetRequest other = (CreateChangeSetRequest) obj; return Objects.equals(stackName(), other.stackName()) && Objects.equals(templateBody(), other.templateBody()) && Objects.equals(templateURL(), other.templateURL()) && Objects.equals(usePreviousTemplate(), other.usePreviousTemplate()) && Objects.equals(parameters(), other.parameters()) && Objects.equals(capabilitiesAsStrings(), other.capabilitiesAsStrings()) && Objects.equals(resourceTypes(), other.resourceTypes()) && Objects.equals(roleARN(), other.roleARN()) && Objects.equals(rollbackConfiguration(), other.rollbackConfiguration()) && Objects.equals(notificationARNs(), other.notificationARNs()) && Objects.equals(tags(), other.tags()) && Objects.equals(changeSetName(), other.changeSetName()) && Objects.equals(clientToken(), other.clientToken()) && Objects.equals(description(), other.description()) && Objects.equals(changeSetTypeAsString(), other.changeSetTypeAsString()) && Objects.equals(resourcesToImport(), other.resourcesToImport()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("CreateChangeSetRequest").add("StackName", stackName()).add("TemplateBody", templateBody()) .add("TemplateURL", templateURL()).add("UsePreviousTemplate", usePreviousTemplate()) .add("Parameters", parameters()).add("Capabilities", capabilitiesAsStrings()) .add("ResourceTypes", resourceTypes()).add("RoleARN", roleARN()) .add("RollbackConfiguration", rollbackConfiguration()).add("NotificationARNs", notificationARNs()) .add("Tags", tags()).add("ChangeSetName", changeSetName()).add("ClientToken", clientToken()) .add("Description", description()).add("ChangeSetType", changeSetTypeAsString()) .add("ResourcesToImport", resourcesToImport()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "StackName": return Optional.ofNullable(clazz.cast(stackName())); case "TemplateBody": return Optional.ofNullable(clazz.cast(templateBody())); case "TemplateURL": return Optional.ofNullable(clazz.cast(templateURL())); case "UsePreviousTemplate": return Optional.ofNullable(clazz.cast(usePreviousTemplate())); case "Parameters": return Optional.ofNullable(clazz.cast(parameters())); case "Capabilities": return Optional.ofNullable(clazz.cast(capabilitiesAsStrings())); case "ResourceTypes": return Optional.ofNullable(clazz.cast(resourceTypes())); case "RoleARN": return Optional.ofNullable(clazz.cast(roleARN())); case "RollbackConfiguration": return Optional.ofNullable(clazz.cast(rollbackConfiguration())); case "NotificationARNs": return Optional.ofNullable(clazz.cast(notificationARNs())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "ChangeSetName": return Optional.ofNullable(clazz.cast(changeSetName())); case "ClientToken": return Optional.ofNullable(clazz.cast(clientToken())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "ChangeSetType": return Optional.ofNullable(clazz.cast(changeSetTypeAsString())); case "ResourcesToImport": return Optional.ofNullable(clazz.cast(resourcesToImport())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateChangeSetRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends CloudFormationRequest.Builder, SdkPojo, CopyableBuilder { /** *

      * The name or the unique ID of the stack for which you are creating a change set. AWS CloudFormation generates * the change set by comparing this stack's information with the information that you submit, such as a modified * template or different parameter input values. *

      * * @param stackName * The name or the unique ID of the stack for which you are creating a change set. AWS CloudFormation * generates the change set by comparing this stack's information with the information that you submit, * such as a modified template or different parameter input values. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stackName(String stackName); /** *

      * A structure that contains the body of the revised template, with a minimum length of 1 byte and a maximum * length of 51,200 bytes. AWS CloudFormation generates the change set by comparing this template with the * template of the stack that you specified. *

      *

      * Conditional: You must specify only TemplateBody or TemplateURL. *

      * * @param templateBody * A structure that contains the body of the revised template, with a minimum length of 1 byte and a * maximum length of 51,200 bytes. AWS CloudFormation generates the change set by comparing this template * with the template of the stack that you specified.

      *

      * Conditional: You must specify only TemplateBody or TemplateURL. * @return Returns a reference to this object so that method calls can be chained together. */ Builder templateBody(String templateBody); /** *

      * The location of the file that contains the revised template. The URL must point to a template (max size: * 460,800 bytes) that is located in an S3 bucket. AWS CloudFormation generates the change set by comparing this * template with the stack that you specified. *

      *

      * Conditional: You must specify only TemplateBody or TemplateURL. *

      * * @param templateURL * The location of the file that contains the revised template. The URL must point to a template (max * size: 460,800 bytes) that is located in an S3 bucket. AWS CloudFormation generates the change set by * comparing this template with the stack that you specified.

      *

      * Conditional: You must specify only TemplateBody or TemplateURL. * @return Returns a reference to this object so that method calls can be chained together. */ Builder templateURL(String templateURL); /** *

      * Whether to reuse the template that is associated with the stack to create the change set. *

      * * @param usePreviousTemplate * Whether to reuse the template that is associated with the stack to create the change set. * @return Returns a reference to this object so that method calls can be chained together. */ Builder usePreviousTemplate(Boolean usePreviousTemplate); /** *

      * A list of Parameter structures that specify input parameters for the change set. For more * information, see the Parameter data type. *

      * * @param parameters * A list of Parameter structures that specify input parameters for the change set. For more * information, see the Parameter data type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parameters(Collection parameters); /** *

      * A list of Parameter structures that specify input parameters for the change set. For more * information, see the Parameter data type. *

      * * @param parameters * A list of Parameter structures that specify input parameters for the change set. For more * information, see the Parameter data type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parameters(Parameter... parameters); /** *

      * A list of Parameter structures that specify input parameters for the change set. For more * information, see the Parameter data type. *

      * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to * create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #parameters(List)}. * * @param parameters * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #parameters(List) */ Builder parameters(Consumer... parameters); /** *

      * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in * order for AWS CloudFormation to create the stack. *

      *
        *
      • *

        * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

        *

        * Some stack templates might include resources that can affect permissions in your AWS account; for example, by * creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly * acknowledge this by specifying one of these capabilities. *

        *

        * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

        *
          *
        • *

          * If you have IAM resources, you can specify either capability. *

          *
        • *
        • *

          * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. *

          *
        • *
        • *

          * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

          *
        • *
        *

        * If your stack template contains these resources, we recommend that you review all permissions associated with * them and edit their permissions if necessary. *

        * *

        * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

        *
      • *
      • *

        * CAPABILITY_AUTO_EXPAND *

        *

        * Some template contain macros. Macros perform custom processing on templates; this can include simple actions * like find-and-replace operations, all the way to extensive transformations of entire templates. Because of * this, users typically create a change set from the processed template, so that they can review the changes * resulting from the macros before actually creating the stack. If your stack template contains one or more * macros, and you choose to create a stack directly from the processed template, without first reviewing the * resulting changes in a change set, you must acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

        * *

        * This capacity does not apply to creating change sets, and specifying it when creating change sets has no * effect. *

        *

        * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack template * that contains macros and nested stacks, you must create or update the stack directly from the template * using the CreateStack or UpdateStack action, and specifying this capability. *

        *
        *

        * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

        *
      • *
      * * @param capabilities * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities * in order for AWS CloudFormation to create the stack.

      *
        *
      • *

        * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

        *

        * Some stack templates might include resources that can affect permissions in your AWS account; for * example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must * explicitly acknowledge this by specifying one of these capabilities. *

        *

        * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

        *
          *
        • *

          * If you have IAM resources, you can specify either capability. *

          *
        • *
        • *

          * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM * . *

          *
        • *
        • *

          * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

          *
        • *
        *

        * If your stack template contains these resources, we recommend that you review all permissions * associated with them and edit their permissions if necessary. *

        * *

        * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

        *
      • *
      • *

        * CAPABILITY_AUTO_EXPAND *

        *

        * Some template contain macros. Macros perform custom processing on templates; this can include simple * actions like find-and-replace operations, all the way to extensive transformations of entire * templates. Because of this, users typically create a change set from the processed template, so that * they can review the changes resulting from the macros before actually creating the stack. If your * stack template contains one or more macros, and you choose to create a stack directly from the * processed template, without first reviewing the resulting changes in a change set, you must * acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

        * *

        * This capacity does not apply to creating change sets, and specifying it when creating change sets has * no effect. *

        *

        * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack * template that contains macros and nested stacks, you must create or update the stack directly * from the template using the CreateStack or UpdateStack action, and specifying this * capability. *

        *
        *

        * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilitiesWithStrings(Collection capabilities); /** *

        * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in * order for AWS CloudFormation to create the stack. *

        *
          *
        • *

          * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

          *

          * Some stack templates might include resources that can affect permissions in your AWS account; for example, by * creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly * acknowledge this by specifying one of these capabilities. *

          *

          * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

          *
            *
          • *

            * If you have IAM resources, you can specify either capability. *

            *
          • *
          • *

            * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. *

            *
          • *
          • *

            * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

            *
          • *
          *

          * If your stack template contains these resources, we recommend that you review all permissions associated with * them and edit their permissions if necessary. *

          * *

          * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

          *
        • *
        • *

          * CAPABILITY_AUTO_EXPAND *

          *

          * Some template contain macros. Macros perform custom processing on templates; this can include simple actions * like find-and-replace operations, all the way to extensive transformations of entire templates. Because of * this, users typically create a change set from the processed template, so that they can review the changes * resulting from the macros before actually creating the stack. If your stack template contains one or more * macros, and you choose to create a stack directly from the processed template, without first reviewing the * resulting changes in a change set, you must acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

          * *

          * This capacity does not apply to creating change sets, and specifying it when creating change sets has no * effect. *

          *

          * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack template * that contains macros and nested stacks, you must create or update the stack directly from the template * using the CreateStack or UpdateStack action, and specifying this capability. *

          *
          *

          * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

          *
        • *
        * * @param capabilities * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities * in order for AWS CloudFormation to create the stack.

        *
          *
        • *

          * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

          *

          * Some stack templates might include resources that can affect permissions in your AWS account; for * example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must * explicitly acknowledge this by specifying one of these capabilities. *

          *

          * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

          *
            *
          • *

            * If you have IAM resources, you can specify either capability. *

            *
          • *
          • *

            * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM * . *

            *
          • *
          • *

            * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

            *
          • *
          *

          * If your stack template contains these resources, we recommend that you review all permissions * associated with them and edit their permissions if necessary. *

          * *

          * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

          *
        • *
        • *

          * CAPABILITY_AUTO_EXPAND *

          *

          * Some template contain macros. Macros perform custom processing on templates; this can include simple * actions like find-and-replace operations, all the way to extensive transformations of entire * templates. Because of this, users typically create a change set from the processed template, so that * they can review the changes resulting from the macros before actually creating the stack. If your * stack template contains one or more macros, and you choose to create a stack directly from the * processed template, without first reviewing the resulting changes in a change set, you must * acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

          * *

          * This capacity does not apply to creating change sets, and specifying it when creating change sets has * no effect. *

          *

          * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack * template that contains macros and nested stacks, you must create or update the stack directly * from the template using the CreateStack or UpdateStack action, and specifying this * capability. *

          *
          *

          * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilitiesWithStrings(String... capabilities); /** *

          * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in * order for AWS CloudFormation to create the stack. *

          *
            *
          • *

            * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

            *

            * Some stack templates might include resources that can affect permissions in your AWS account; for example, by * creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly * acknowledge this by specifying one of these capabilities. *

            *

            * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

            *
              *
            • *

              * If you have IAM resources, you can specify either capability. *

              *
            • *
            • *

              * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. *

              *
            • *
            • *

              * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

              *
            • *
            *

            * If your stack template contains these resources, we recommend that you review all permissions associated with * them and edit their permissions if necessary. *

            * *

            * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

            *
          • *
          • *

            * CAPABILITY_AUTO_EXPAND *

            *

            * Some template contain macros. Macros perform custom processing on templates; this can include simple actions * like find-and-replace operations, all the way to extensive transformations of entire templates. Because of * this, users typically create a change set from the processed template, so that they can review the changes * resulting from the macros before actually creating the stack. If your stack template contains one or more * macros, and you choose to create a stack directly from the processed template, without first reviewing the * resulting changes in a change set, you must acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

            * *

            * This capacity does not apply to creating change sets, and specifying it when creating change sets has no * effect. *

            *

            * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack template * that contains macros and nested stacks, you must create or update the stack directly from the template * using the CreateStack or UpdateStack action, and specifying this capability. *

            *
            *

            * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

            *
          • *
          * * @param capabilities * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities * in order for AWS CloudFormation to create the stack.

          *
            *
          • *

            * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

            *

            * Some stack templates might include resources that can affect permissions in your AWS account; for * example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must * explicitly acknowledge this by specifying one of these capabilities. *

            *

            * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

            *
              *
            • *

              * If you have IAM resources, you can specify either capability. *

              *
            • *
            • *

              * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM * . *

              *
            • *
            • *

              * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

              *
            • *
            *

            * If your stack template contains these resources, we recommend that you review all permissions * associated with them and edit their permissions if necessary. *

            * *

            * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

            *
          • *
          • *

            * CAPABILITY_AUTO_EXPAND *

            *

            * Some template contain macros. Macros perform custom processing on templates; this can include simple * actions like find-and-replace operations, all the way to extensive transformations of entire * templates. Because of this, users typically create a change set from the processed template, so that * they can review the changes resulting from the macros before actually creating the stack. If your * stack template contains one or more macros, and you choose to create a stack directly from the * processed template, without first reviewing the resulting changes in a change set, you must * acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

            * *

            * This capacity does not apply to creating change sets, and specifying it when creating change sets has * no effect. *

            *

            * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack * template that contains macros and nested stacks, you must create or update the stack directly * from the template using the CreateStack or UpdateStack action, and specifying this * capability. *

            *
            *

            * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilities(Collection capabilities); /** *

            * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in * order for AWS CloudFormation to create the stack. *

            *
              *
            • *

              * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

              *

              * Some stack templates might include resources that can affect permissions in your AWS account; for example, by * creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly * acknowledge this by specifying one of these capabilities. *

              *

              * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

              *
                *
              • *

                * If you have IAM resources, you can specify either capability. *

                *
              • *
              • *

                * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. *

                *
              • *
              • *

                * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

                *
              • *
              *

              * If your stack template contains these resources, we recommend that you review all permissions associated with * them and edit their permissions if necessary. *

              * *

              * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

              *
            • *
            • *

              * CAPABILITY_AUTO_EXPAND *

              *

              * Some template contain macros. Macros perform custom processing on templates; this can include simple actions * like find-and-replace operations, all the way to extensive transformations of entire templates. Because of * this, users typically create a change set from the processed template, so that they can review the changes * resulting from the macros before actually creating the stack. If your stack template contains one or more * macros, and you choose to create a stack directly from the processed template, without first reviewing the * resulting changes in a change set, you must acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

              * *

              * This capacity does not apply to creating change sets, and specifying it when creating change sets has no * effect. *

              *

              * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack template * that contains macros and nested stacks, you must create or update the stack directly from the template * using the CreateStack or UpdateStack action, and specifying this capability. *

              *
              *

              * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

              *
            • *
            * * @param capabilities * In some cases, you must explicitly acknowledge that your stack template contains certain capabilities * in order for AWS CloudFormation to create the stack.

            *
              *
            • *

              * CAPABILITY_IAM and CAPABILITY_NAMED_IAM *

              *

              * Some stack templates might include resources that can affect permissions in your AWS account; for * example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must * explicitly acknowledge this by specifying one of these capabilities. *

              *

              * The following IAM resources require you to specify either the CAPABILITY_IAM or * CAPABILITY_NAMED_IAM capability. *

              *
                *
              • *

                * If you have IAM resources, you can specify either capability. *

                *
              • *
              • *

                * If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM * . *

                *
              • *
              • *

                * If you don't specify either of these capabilities, AWS CloudFormation returns an * InsufficientCapabilities error. *

                *
              • *
              *

              * If your stack template contains these resources, we recommend that you review all permissions * associated with them and edit their permissions if necessary. *

              * *

              * For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. *

              *
            • *
            • *

              * CAPABILITY_AUTO_EXPAND *

              *

              * Some template contain macros. Macros perform custom processing on templates; this can include simple * actions like find-and-replace operations, all the way to extensive transformations of entire * templates. Because of this, users typically create a change set from the processed template, so that * they can review the changes resulting from the macros before actually creating the stack. If your * stack template contains one or more macros, and you choose to create a stack directly from the * processed template, without first reviewing the resulting changes in a change set, you must * acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by AWS CloudFormation. *

              * *

              * This capacity does not apply to creating change sets, and specifying it when creating change sets has * no effect. *

              *

              * Also, change sets do not currently support nested stacks. If you want to create a stack from a stack * template that contains macros and nested stacks, you must create or update the stack directly * from the template using the CreateStack or UpdateStack action, and specifying this * capability. *

              *
              *

              * For more information on macros, see Using AWS * CloudFormation Macros to Perform Custom Processing on Templates. *

              *
            • * @return Returns a reference to this object so that method calls can be chained together. */ Builder capabilities(Capability... capabilities); /** *

              * The template resource types that you have permissions to work with if you execute this change set, such as * AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance. *

              *

              * If the list of resource types doesn't include a resource type that you're updating, the stack update fails. * By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management * (IAM) uses this parameter for condition keys in IAM policies for AWS CloudFormation. For more information, * see Controlling * Access with AWS Identity and Access Management in the AWS CloudFormation User Guide. *

              * * @param resourceTypes * The template resource types that you have permissions to work with if you execute this change set, * such as AWS::EC2::Instance, AWS::EC2::*, or * Custom::MyCustomInstance.

              *

              * If the list of resource types doesn't include a resource type that you're updating, the stack update * fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and * Access Management (IAM) uses this parameter for condition keys in IAM policies for AWS CloudFormation. * For more information, see Controlling Access with AWS Identity and Access Management in the AWS CloudFormation User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceTypes(Collection resourceTypes); /** *

              * The template resource types that you have permissions to work with if you execute this change set, such as * AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance. *

              *

              * If the list of resource types doesn't include a resource type that you're updating, the stack update fails. * By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management * (IAM) uses this parameter for condition keys in IAM policies for AWS CloudFormation. For more information, * see Controlling * Access with AWS Identity and Access Management in the AWS CloudFormation User Guide. *

              * * @param resourceTypes * The template resource types that you have permissions to work with if you execute this change set, * such as AWS::EC2::Instance, AWS::EC2::*, or * Custom::MyCustomInstance.

              *

              * If the list of resource types doesn't include a resource type that you're updating, the stack update * fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and * Access Management (IAM) uses this parameter for condition keys in IAM policies for AWS CloudFormation. * For more information, see Controlling Access with AWS Identity and Access Management in the AWS CloudFormation User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceTypes(String... resourceTypes); /** *

              * The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation * assumes when executing the change set. AWS CloudFormation uses the role's credentials to make calls on your * behalf. AWS CloudFormation uses this role for all future operations on the stack. As long as users have * permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission * to pass it. Ensure that the role grants least privilege. *

              *

              * If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. * If no role is available, AWS CloudFormation uses a temporary session that is generated from your user * credentials. *

              * * @param roleARN * The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS * CloudFormation assumes when executing the change set. AWS CloudFormation uses the role's credentials * to make calls on your behalf. AWS CloudFormation uses this role for all future operations on the * stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role * even if the users don't have permission to pass it. Ensure that the role grants least privilege.

              *

              * If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the * stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from * your user credentials. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleARN(String roleARN); /** *

              * The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, and * for the specified monitoring period afterwards. *

              * * @param rollbackConfiguration * The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, * and for the specified monitoring period afterwards. * @return Returns a reference to this object so that method calls can be chained together. */ Builder rollbackConfiguration(RollbackConfiguration rollbackConfiguration); /** *

              * The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, and * for the specified monitoring period afterwards. *

              * This is a convenience that creates an instance of the {@link RollbackConfiguration.Builder} avoiding the need * to create one manually via {@link RollbackConfiguration#builder()}. * * When the {@link Consumer} completes, {@link RollbackConfiguration.Builder#build()} is called immediately and * its result is passed to {@link #rollbackConfiguration(RollbackConfiguration)}. * * @param rollbackConfiguration * a consumer that will call methods on {@link RollbackConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #rollbackConfiguration(RollbackConfiguration) */ default Builder rollbackConfiguration(Consumer rollbackConfiguration) { return rollbackConfiguration(RollbackConfiguration.builder().applyMutation(rollbackConfiguration).build()); } /** *

              * The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon SNS) topics that AWS * CloudFormation associates with the stack. To remove all associated notification topics, specify an empty * list. *

              * * @param notificationARNs * The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon SNS) topics that AWS * CloudFormation associates with the stack. To remove all associated notification topics, specify an * empty list. * @return Returns a reference to this object so that method calls can be chained together. */ Builder notificationARNs(Collection notificationARNs); /** *

              * The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon SNS) topics that AWS * CloudFormation associates with the stack. To remove all associated notification topics, specify an empty * list. *

              * * @param notificationARNs * The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon SNS) topics that AWS * CloudFormation associates with the stack. To remove all associated notification topics, specify an * empty list. * @return Returns a reference to this object so that method calls can be chained together. */ Builder notificationARNs(String... notificationARNs); /** *

              * Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to resources in * the stack. You can specify a maximum of 50 tags. *

              * * @param tags * Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to * resources in the stack. You can specify a maximum of 50 tags. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

              * Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to resources in * the stack. You can specify a maximum of 50 tags. *

              * * @param tags * Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to * resources in the stack. You can specify a maximum of 50 tags. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

              * Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to resources in * the stack. You can specify a maximum of 50 tags. *

              * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to create * one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its result * is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(List) */ Builder tags(Consumer... tags); /** *

              * The name of the change set. The name must be unique among all change sets that are associated with the * specified stack. *

              *

              * A change set name can contain only alphanumeric, case sensitive characters and hyphens. It must start with an * alphabetic character and cannot exceed 128 characters. *

              * * @param changeSetName * The name of the change set. The name must be unique among all change sets that are associated with the * specified stack.

              *

              * A change set name can contain only alphanumeric, case sensitive characters and hyphens. It must start * with an alphabetic character and cannot exceed 128 characters. * @return Returns a reference to this object so that method calls can be chained together. */ Builder changeSetName(String changeSetName); /** *

              * A unique identifier for this CreateChangeSet request. Specify this token if you plan to retry * requests so that AWS CloudFormation knows that you're not attempting to create another change set with the * same name. You might retry CreateChangeSet requests to ensure that AWS CloudFormation * successfully received them. *

              * * @param clientToken * A unique identifier for this CreateChangeSet request. Specify this token if you plan to * retry requests so that AWS CloudFormation knows that you're not attempting to create another change * set with the same name. You might retry CreateChangeSet requests to ensure that AWS * CloudFormation successfully received them. * @return Returns a reference to this object so that method calls can be chained together. */ Builder clientToken(String clientToken); /** *

              * A description to help you identify this change set. *

              * * @param description * A description to help you identify this change set. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

              * The type of change set operation. To create a change set for a new stack, specify CREATE. To * create a change set for an existing stack, specify UPDATE. To create a change set for an import * operation, specify IMPORT. *

              *

              * If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, but no * template or resources. The stack will be in the * REVIEW_IN_PROGRESS state until you execute the change set. *

              *

              * By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE type to * create a change set for a new stack or the CREATE type to create a change set for an existing * stack. *

              * * @param changeSetType * The type of change set operation. To create a change set for a new stack, specify CREATE. * To create a change set for an existing stack, specify UPDATE. To create a change set for * an import operation, specify IMPORT.

              *

              * If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, * but no template or resources. The stack will be in the REVIEW_IN_PROGRESS state until you execute the change set. *

              *

              * By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE * type to create a change set for a new stack or the CREATE type to create a change set for * an existing stack. * @see ChangeSetType * @return Returns a reference to this object so that method calls can be chained together. * @see ChangeSetType */ Builder changeSetType(String changeSetType); /** *

              * The type of change set operation. To create a change set for a new stack, specify CREATE. To * create a change set for an existing stack, specify UPDATE. To create a change set for an import * operation, specify IMPORT. *

              *

              * If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, but no * template or resources. The stack will be in the * REVIEW_IN_PROGRESS state until you execute the change set. *

              *

              * By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE type to * create a change set for a new stack or the CREATE type to create a change set for an existing * stack. *

              * * @param changeSetType * The type of change set operation. To create a change set for a new stack, specify CREATE. * To create a change set for an existing stack, specify UPDATE. To create a change set for * an import operation, specify IMPORT.

              *

              * If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, * but no template or resources. The stack will be in the REVIEW_IN_PROGRESS state until you execute the change set. *

              *

              * By default, AWS CloudFormation specifies UPDATE. You can't use the UPDATE * type to create a change set for a new stack or the CREATE type to create a change set for * an existing stack. * @see ChangeSetType * @return Returns a reference to this object so that method calls can be chained together. * @see ChangeSetType */ Builder changeSetType(ChangeSetType changeSetType); /** *

              * The resources to import into your stack. *

              * * @param resourcesToImport * The resources to import into your stack. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourcesToImport(Collection resourcesToImport); /** *

              * The resources to import into your stack. *

              * * @param resourcesToImport * The resources to import into your stack. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourcesToImport(ResourceToImport... resourcesToImport); /** *

              * The resources to import into your stack. *

              * This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and * its result is passed to {@link #resourcesToImport(List)}. * * @param resourcesToImport * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #resourcesToImport(List) */ Builder resourcesToImport(Consumer... resourcesToImport); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends CloudFormationRequest.BuilderImpl implements Builder { private String stackName; private String templateBody; private String templateURL; private Boolean usePreviousTemplate; private List parameters = DefaultSdkAutoConstructList.getInstance(); private List capabilities = DefaultSdkAutoConstructList.getInstance(); private List resourceTypes = DefaultSdkAutoConstructList.getInstance(); private String roleARN; private RollbackConfiguration rollbackConfiguration; private List notificationARNs = DefaultSdkAutoConstructList.getInstance(); private List tags = DefaultSdkAutoConstructList.getInstance(); private String changeSetName; private String clientToken; private String description; private String changeSetType; private List resourcesToImport = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(CreateChangeSetRequest model) { super(model); stackName(model.stackName); templateBody(model.templateBody); templateURL(model.templateURL); usePreviousTemplate(model.usePreviousTemplate); parameters(model.parameters); capabilitiesWithStrings(model.capabilities); resourceTypes(model.resourceTypes); roleARN(model.roleARN); rollbackConfiguration(model.rollbackConfiguration); notificationARNs(model.notificationARNs); tags(model.tags); changeSetName(model.changeSetName); clientToken(model.clientToken); description(model.description); changeSetType(model.changeSetType); resourcesToImport(model.resourcesToImport); } public final String getStackName() { return stackName; } @Override public final Builder stackName(String stackName) { this.stackName = stackName; return this; } public final void setStackName(String stackName) { this.stackName = stackName; } public final String getTemplateBody() { return templateBody; } @Override public final Builder templateBody(String templateBody) { this.templateBody = templateBody; return this; } public final void setTemplateBody(String templateBody) { this.templateBody = templateBody; } public final String getTemplateURL() { return templateURL; } @Override public final Builder templateURL(String templateURL) { this.templateURL = templateURL; return this; } public final void setTemplateURL(String templateURL) { this.templateURL = templateURL; } public final Boolean getUsePreviousTemplate() { return usePreviousTemplate; } @Override public final Builder usePreviousTemplate(Boolean usePreviousTemplate) { this.usePreviousTemplate = usePreviousTemplate; return this; } public final void setUsePreviousTemplate(Boolean usePreviousTemplate) { this.usePreviousTemplate = usePreviousTemplate; } public final Collection getParameters() { return parameters != null ? parameters.stream().map(Parameter::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder parameters(Collection parameters) { this.parameters = ParametersCopier.copy(parameters); return this; } @Override @SafeVarargs public final Builder parameters(Parameter... parameters) { parameters(Arrays.asList(parameters)); return this; } @Override @SafeVarargs public final Builder parameters(Consumer... parameters) { parameters(Stream.of(parameters).map(c -> Parameter.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setParameters(Collection parameters) { this.parameters = ParametersCopier.copyFromBuilder(parameters); } public final Collection getCapabilities() { return capabilities; } @Override public final Builder capabilitiesWithStrings(Collection capabilities) { this.capabilities = CapabilitiesCopier.copy(capabilities); return this; } @Override @SafeVarargs public final Builder capabilitiesWithStrings(String... capabilities) { capabilitiesWithStrings(Arrays.asList(capabilities)); return this; } @Override public final Builder capabilities(Collection capabilities) { this.capabilities = CapabilitiesCopier.copyEnumToString(capabilities); return this; } @Override @SafeVarargs public final Builder capabilities(Capability... capabilities) { capabilities(Arrays.asList(capabilities)); return this; } public final void setCapabilities(Collection capabilities) { this.capabilities = CapabilitiesCopier.copy(capabilities); } public final Collection getResourceTypes() { return resourceTypes; } @Override public final Builder resourceTypes(Collection resourceTypes) { this.resourceTypes = ResourceTypesCopier.copy(resourceTypes); return this; } @Override @SafeVarargs public final Builder resourceTypes(String... resourceTypes) { resourceTypes(Arrays.asList(resourceTypes)); return this; } public final void setResourceTypes(Collection resourceTypes) { this.resourceTypes = ResourceTypesCopier.copy(resourceTypes); } public final String getRoleARN() { return roleARN; } @Override public final Builder roleARN(String roleARN) { this.roleARN = roleARN; return this; } public final void setRoleARN(String roleARN) { this.roleARN = roleARN; } public final RollbackConfiguration.Builder getRollbackConfiguration() { return rollbackConfiguration != null ? rollbackConfiguration.toBuilder() : null; } @Override public final Builder rollbackConfiguration(RollbackConfiguration rollbackConfiguration) { this.rollbackConfiguration = rollbackConfiguration; return this; } public final void setRollbackConfiguration(RollbackConfiguration.BuilderImpl rollbackConfiguration) { this.rollbackConfiguration = rollbackConfiguration != null ? rollbackConfiguration.build() : null; } public final Collection getNotificationARNs() { return notificationARNs; } @Override public final Builder notificationARNs(Collection notificationARNs) { this.notificationARNs = NotificationARNsCopier.copy(notificationARNs); return this; } @Override @SafeVarargs public final Builder notificationARNs(String... notificationARNs) { notificationARNs(Arrays.asList(notificationARNs)); return this; } public final void setNotificationARNs(Collection notificationARNs) { this.notificationARNs = NotificationARNsCopier.copy(notificationARNs); } public final Collection getTags() { return tags != null ? tags.stream().map(Tag::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder tags(Collection tags) { this.tags = TagsCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setTags(Collection tags) { this.tags = TagsCopier.copyFromBuilder(tags); } public final String getChangeSetName() { return changeSetName; } @Override public final Builder changeSetName(String changeSetName) { this.changeSetName = changeSetName; return this; } public final void setChangeSetName(String changeSetName) { this.changeSetName = changeSetName; } public final String getClientToken() { return clientToken; } @Override public final Builder clientToken(String clientToken) { this.clientToken = clientToken; return this; } public final void setClientToken(String clientToken) { this.clientToken = clientToken; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final String getChangeSetType() { return changeSetType; } @Override public final Builder changeSetType(String changeSetType) { this.changeSetType = changeSetType; return this; } @Override public final Builder changeSetType(ChangeSetType changeSetType) { this.changeSetType(changeSetType == null ? null : changeSetType.toString()); return this; } public final void setChangeSetType(String changeSetType) { this.changeSetType = changeSetType; } public final Collection getResourcesToImport() { return resourcesToImport != null ? resourcesToImport.stream().map(ResourceToImport::toBuilder) .collect(Collectors.toList()) : null; } @Override public final Builder resourcesToImport(Collection resourcesToImport) { this.resourcesToImport = ResourcesToImportCopier.copy(resourcesToImport); return this; } @Override @SafeVarargs public final Builder resourcesToImport(ResourceToImport... resourcesToImport) { resourcesToImport(Arrays.asList(resourcesToImport)); return this; } @Override @SafeVarargs public final Builder resourcesToImport(Consumer... resourcesToImport) { resourcesToImport(Stream.of(resourcesToImport).map(c -> ResourceToImport.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setResourcesToImport(Collection resourcesToImport) { this.resourcesToImport = ResourcesToImportCopier.copyFromBuilder(resourcesToImport); } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateChangeSetRequest build() { return new CreateChangeSetRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy