com.amazonaws.services.cloudformation.model.UpdateStackRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudformation Show documentation
/*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.cloudformation.model;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* The input for UpdateStack action.
*
*/
public class UpdateStackRequest extends AmazonWebServiceRequest implements
Serializable, Cloneable {
/**
*
* The name or unique stack ID of the stack to update.
*
*/
private String stackName;
/**
*
* Structure containing the template body with a minimum length of 1 byte
* and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
*
*
* Conditional: You must specify either the TemplateBody
or the
* TemplateURL
parameter, but not both.
*
*/
private String templateBody;
/**
*
* Location of file containing the template body. The URL must point to a
* template that is located in an Amazon S3 bucket. For more information, go
* to Template Anatomy in the AWS CloudFormation User Guide.
*
*
* Conditional: You must specify either the TemplateBody
or the
* TemplateURL
parameter, but not both.
*
*/
private String templateURL;
/**
*
* Reuse the existing template that is associated with the stack that you
* are updating.
*
*/
private Boolean usePreviousTemplate;
/**
*
* Structure containing the temporary overriding stack policy body. You can
* specify either the StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not both.
*
*
* If you want to update protected resources, specify a temporary overriding
* stack policy during this update. If you do not specify a stack policy,
* the current policy that is associated with the stack will be used.
*
*/
private String stackPolicyDuringUpdateBody;
/**
*
* Location of a file containing the temporary overriding stack policy. The
* URL must point to a policy (max size: 16KB) located in an S3 bucket in
* the same region as the stack. You can specify either the
* StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not both.
*
*
* If you want to update protected resources, specify a temporary overriding
* stack policy during this update. If you do not specify a stack policy,
* the current policy that is associated with the stack will be used.
*
*/
private String stackPolicyDuringUpdateURL;
/**
*
* A list of Parameter
structures that specify input parameters
* for the stack. For more information, see the Parameter data type.
*
*/
private com.amazonaws.internal.SdkInternalList parameters;
/**
*
* A list of capabilities that you must specify before AWS CloudFormation
* can create or update certain stacks. Some stack templates might include
* resources that can affect permissions in your AWS account. For those
* stacks, you must explicitly acknowledge their capabilities by specifying
* this parameter. Currently, the only valid value is
* CAPABILITY_IAM
, which is required for the following
* resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template contains
* these resources, we recommend that you review any permissions associated
* with them. If you don't specify this parameter, this action returns an
* InsufficientCapabilities error.
*
*/
private com.amazonaws.internal.SdkInternalList capabilities;
/**
*
* The template resource types that you have permissions to work with for
* this update stack action, such as AWS::EC2::Instance
,
* AWS::EC2::*
, or Custom::MyCustomInstance
.
*
*
* If the list of resource types doesn't include a resource 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 AWS CloudFormation-specific condition keys
* in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management
*
*/
private com.amazonaws.internal.SdkInternalList resourceTypes;
/**
*
* Structure containing a new stack policy body. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
*
* You might update the stack policy, for example, in order to protect a new
* resource that you created during a stack update. If you do not specify a
* stack policy, the current policy that is associated with the stack is
* unchanged.
*
*/
private String stackPolicyBody;
/**
*
* Location of a file containing the updated stack policy. The URL must
* point to a policy (max size: 16KB) located in an S3 bucket in the same
* region as the stack. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
*
* You might update the stack policy, for example, in order to protect a new
* resource that you created during a stack update. If you do not specify a
* stack policy, the current policy that is associated with the stack is
* unchanged.
*
*/
private String stackPolicyURL;
/**
*
* Update the ARNs for the Amazon SNS topics that are associated with the
* stack.
*
*/
private com.amazonaws.internal.SdkInternalList notificationARNs;
/**
*
* The name or unique stack ID of the stack to update.
*
*
* @param stackName
* The name or unique stack ID of the stack to update.
*/
public void setStackName(String stackName) {
this.stackName = stackName;
}
/**
*
* The name or unique stack ID of the stack to update.
*
*
* @return The name or unique stack ID of the stack to update.
*/
public String getStackName() {
return this.stackName;
}
/**
*
* The name or unique stack ID of the stack to update.
*
*
* @param stackName
* The name or unique stack ID of the stack to update.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withStackName(String stackName) {
setStackName(stackName);
return this;
}
/**
*
* Structure containing the template body with a minimum length of 1 byte
* and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
*
*
* Conditional: You must specify either the TemplateBody
or the
* TemplateURL
parameter, but not both.
*
*
* @param templateBody
* Structure containing the template body with a minimum length of 1
* byte and a maximum length of 51,200 bytes. (For more information,
* go to Template Anatomy in the AWS CloudFormation User Guide.)
*
* Conditional: You must specify either the TemplateBody
* or the TemplateURL
parameter, but not both.
*/
public void setTemplateBody(String templateBody) {
this.templateBody = templateBody;
}
/**
*
* Structure containing the template body with a minimum length of 1 byte
* and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
*
*
* Conditional: You must specify either the TemplateBody
or the
* TemplateURL
parameter, but not both.
*
*
* @return Structure containing the template body with a minimum length of 1
* byte and a maximum length of 51,200 bytes. (For more information,
* go to Template Anatomy in the AWS CloudFormation User Guide.)
*
* Conditional: You must specify either the
* TemplateBody
or the TemplateURL
* parameter, but not both.
*/
public String getTemplateBody() {
return this.templateBody;
}
/**
*
* Structure containing the template body with a minimum length of 1 byte
* and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
*
*
* Conditional: You must specify either the TemplateBody
or the
* TemplateURL
parameter, but not both.
*
*
* @param templateBody
* Structure containing the template body with a minimum length of 1
* byte and a maximum length of 51,200 bytes. (For more information,
* go to Template Anatomy in the AWS CloudFormation User Guide.)
*
* Conditional: You must specify either the TemplateBody
* or the TemplateURL
parameter, but not both.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withTemplateBody(String templateBody) {
setTemplateBody(templateBody);
return this;
}
/**
*
* Location of file containing the template body. The URL must point to a
* template that is located in an Amazon S3 bucket. For more information, go
* to Template Anatomy in the AWS CloudFormation User Guide.
*
*
* Conditional: You must specify either the TemplateBody
or the
* TemplateURL
parameter, but not both.
*
*
* @param templateURL
* Location of file containing the template body. The URL must point
* to a template that is located in an Amazon S3 bucket. For more
* information, go to Template Anatomy in the AWS CloudFormation User Guide.
*
* Conditional: You must specify either the TemplateBody
* or the TemplateURL
parameter, but not both.
*/
public void setTemplateURL(String templateURL) {
this.templateURL = templateURL;
}
/**
*
* Location of file containing the template body. The URL must point to a
* template that is located in an Amazon S3 bucket. For more information, go
* to Template Anatomy in the AWS CloudFormation User Guide.
*
*
* Conditional: You must specify either the TemplateBody
or the
* TemplateURL
parameter, but not both.
*
*
* @return Location of file containing the template body. The URL must point
* to a template that is located in an Amazon S3 bucket. For more
* information, go to Template Anatomy in the AWS CloudFormation User Guide.
*
* Conditional: You must specify either the
* TemplateBody
or the TemplateURL
* parameter, but not both.
*/
public String getTemplateURL() {
return this.templateURL;
}
/**
*
* Location of file containing the template body. The URL must point to a
* template that is located in an Amazon S3 bucket. For more information, go
* to Template Anatomy in the AWS CloudFormation User Guide.
*
*
* Conditional: You must specify either the TemplateBody
or the
* TemplateURL
parameter, but not both.
*
*
* @param templateURL
* Location of file containing the template body. The URL must point
* to a template that is located in an Amazon S3 bucket. For more
* information, go to Template Anatomy in the AWS CloudFormation User Guide.
*
* Conditional: You must specify either the TemplateBody
* or the TemplateURL
parameter, but not both.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withTemplateURL(String templateURL) {
setTemplateURL(templateURL);
return this;
}
/**
*
* Reuse the existing template that is associated with the stack that you
* are updating.
*
*
* @param usePreviousTemplate
* Reuse the existing template that is associated with the stack that
* you are updating.
*/
public void setUsePreviousTemplate(Boolean usePreviousTemplate) {
this.usePreviousTemplate = usePreviousTemplate;
}
/**
*
* Reuse the existing template that is associated with the stack that you
* are updating.
*
*
* @return Reuse the existing template that is associated with the stack
* that you are updating.
*/
public Boolean getUsePreviousTemplate() {
return this.usePreviousTemplate;
}
/**
*
* Reuse the existing template that is associated with the stack that you
* are updating.
*
*
* @param usePreviousTemplate
* Reuse the existing template that is associated with the stack that
* you are updating.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withUsePreviousTemplate(
Boolean usePreviousTemplate) {
setUsePreviousTemplate(usePreviousTemplate);
return this;
}
/**
*
* Reuse the existing template that is associated with the stack that you
* are updating.
*
*
* @return Reuse the existing template that is associated with the stack
* that you are updating.
*/
public Boolean isUsePreviousTemplate() {
return this.usePreviousTemplate;
}
/**
*
* Structure containing the temporary overriding stack policy body. You can
* specify either the StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not both.
*
*
* If you want to update protected resources, specify a temporary overriding
* stack policy during this update. If you do not specify a stack policy,
* the current policy that is associated with the stack will be used.
*
*
* @param stackPolicyDuringUpdateBody
* Structure containing the temporary overriding stack policy body.
* You can specify either the
* StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not
* both.
*
* If you want to update protected resources, specify a temporary
* overriding stack policy during this update. If you do not specify
* a stack policy, the current policy that is associated with the
* stack will be used.
*/
public void setStackPolicyDuringUpdateBody(
String stackPolicyDuringUpdateBody) {
this.stackPolicyDuringUpdateBody = stackPolicyDuringUpdateBody;
}
/**
*
* Structure containing the temporary overriding stack policy body. You can
* specify either the StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not both.
*
*
* If you want to update protected resources, specify a temporary overriding
* stack policy during this update. If you do not specify a stack policy,
* the current policy that is associated with the stack will be used.
*
*
* @return Structure containing the temporary overriding stack policy body.
* You can specify either the
* StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not
* both.
*
* If you want to update protected resources, specify a temporary
* overriding stack policy during this update. If you do not specify
* a stack policy, the current policy that is associated with the
* stack will be used.
*/
public String getStackPolicyDuringUpdateBody() {
return this.stackPolicyDuringUpdateBody;
}
/**
*
* Structure containing the temporary overriding stack policy body. You can
* specify either the StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not both.
*
*
* If you want to update protected resources, specify a temporary overriding
* stack policy during this update. If you do not specify a stack policy,
* the current policy that is associated with the stack will be used.
*
*
* @param stackPolicyDuringUpdateBody
* Structure containing the temporary overriding stack policy body.
* You can specify either the
* StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not
* both.
*
* If you want to update protected resources, specify a temporary
* overriding stack policy during this update. If you do not specify
* a stack policy, the current policy that is associated with the
* stack will be used.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withStackPolicyDuringUpdateBody(
String stackPolicyDuringUpdateBody) {
setStackPolicyDuringUpdateBody(stackPolicyDuringUpdateBody);
return this;
}
/**
*
* Location of a file containing the temporary overriding stack policy. The
* URL must point to a policy (max size: 16KB) located in an S3 bucket in
* the same region as the stack. You can specify either the
* StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not both.
*
*
* If you want to update protected resources, specify a temporary overriding
* stack policy during this update. If you do not specify a stack policy,
* the current policy that is associated with the stack will be used.
*
*
* @param stackPolicyDuringUpdateURL
* Location of a file containing the temporary overriding stack
* policy. The URL must point to a policy (max size: 16KB) located in
* an S3 bucket in the same region as the stack. You can specify
* either the StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not
* both.
*
* If you want to update protected resources, specify a temporary
* overriding stack policy during this update. If you do not specify
* a stack policy, the current policy that is associated with the
* stack will be used.
*/
public void setStackPolicyDuringUpdateURL(String stackPolicyDuringUpdateURL) {
this.stackPolicyDuringUpdateURL = stackPolicyDuringUpdateURL;
}
/**
*
* Location of a file containing the temporary overriding stack policy. The
* URL must point to a policy (max size: 16KB) located in an S3 bucket in
* the same region as the stack. You can specify either the
* StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not both.
*
*
* If you want to update protected resources, specify a temporary overriding
* stack policy during this update. If you do not specify a stack policy,
* the current policy that is associated with the stack will be used.
*
*
* @return Location of a file containing the temporary overriding stack
* policy. The URL must point to a policy (max size: 16KB) located
* in an S3 bucket in the same region as the stack. You can specify
* either the StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not
* both.
*
* If you want to update protected resources, specify a temporary
* overriding stack policy during this update. If you do not specify
* a stack policy, the current policy that is associated with the
* stack will be used.
*/
public String getStackPolicyDuringUpdateURL() {
return this.stackPolicyDuringUpdateURL;
}
/**
*
* Location of a file containing the temporary overriding stack policy. The
* URL must point to a policy (max size: 16KB) located in an S3 bucket in
* the same region as the stack. You can specify either the
* StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not both.
*
*
* If you want to update protected resources, specify a temporary overriding
* stack policy during this update. If you do not specify a stack policy,
* the current policy that is associated with the stack will be used.
*
*
* @param stackPolicyDuringUpdateURL
* Location of a file containing the temporary overriding stack
* policy. The URL must point to a policy (max size: 16KB) located in
* an S3 bucket in the same region as the stack. You can specify
* either the StackPolicyDuringUpdateBody
or the
* StackPolicyDuringUpdateURL
parameter, but not
* both.
*
* If you want to update protected resources, specify a temporary
* overriding stack policy during this update. If you do not specify
* a stack policy, the current policy that is associated with the
* stack will be used.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withStackPolicyDuringUpdateURL(
String stackPolicyDuringUpdateURL) {
setStackPolicyDuringUpdateURL(stackPolicyDuringUpdateURL);
return this;
}
/**
*
* A list of Parameter
structures that specify input parameters
* for the stack. For more information, see the Parameter data type.
*
*
* @return A list of Parameter
structures that specify input
* parameters for the stack. For more information, see the Parameter data type.
*/
public java.util.List getParameters() {
if (parameters == null) {
parameters = new com.amazonaws.internal.SdkInternalList();
}
return parameters;
}
/**
*
* A list of Parameter
structures that specify input parameters
* for the stack. For more information, see the Parameter data type.
*
*
* @param parameters
* A list of Parameter
structures that specify input
* parameters for the stack. For more information, see the Parameter data type.
*/
public void setParameters(java.util.Collection parameters) {
if (parameters == null) {
this.parameters = null;
return;
}
this.parameters = new com.amazonaws.internal.SdkInternalList(
parameters);
}
/**
*
* A list of Parameter
structures that specify input parameters
* for the stack. For more information, see the Parameter data type.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setParameters(java.util.Collection)} or
* {@link #withParameters(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param parameters
* A list of Parameter
structures that specify input
* parameters for the stack. For more information, see the Parameter data type.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withParameters(Parameter... parameters) {
if (this.parameters == null) {
setParameters(new com.amazonaws.internal.SdkInternalList(
parameters.length));
}
for (Parameter ele : parameters) {
this.parameters.add(ele);
}
return this;
}
/**
*
* A list of Parameter
structures that specify input parameters
* for the stack. For more information, see the Parameter data type.
*
*
* @param parameters
* A list of Parameter
structures that specify input
* parameters for the stack. For more information, see the Parameter data type.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withParameters(
java.util.Collection parameters) {
setParameters(parameters);
return this;
}
/**
*
* A list of capabilities that you must specify before AWS CloudFormation
* can create or update certain stacks. Some stack templates might include
* resources that can affect permissions in your AWS account. For those
* stacks, you must explicitly acknowledge their capabilities by specifying
* this parameter. Currently, the only valid value is
* CAPABILITY_IAM
, which is required for the following
* resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template contains
* these resources, we recommend that you review any permissions associated
* with them. If you don't specify this parameter, this action returns an
* InsufficientCapabilities error.
*
*
* @return A list of capabilities that you must specify before AWS
* CloudFormation can create or update certain stacks. Some stack
* templates might include resources that can affect permissions in
* your AWS account. For those stacks, you must explicitly
* acknowledge their capabilities by specifying this parameter.
* Currently, the only valid value is CAPABILITY_IAM
,
* which is required for the following resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template
* contains these resources, we recommend that you review any
* permissions associated with them. If you don't specify this
* parameter, this action returns an InsufficientCapabilities error.
* @see Capability
*/
public java.util.List getCapabilities() {
if (capabilities == null) {
capabilities = new com.amazonaws.internal.SdkInternalList();
}
return capabilities;
}
/**
*
* A list of capabilities that you must specify before AWS CloudFormation
* can create or update certain stacks. Some stack templates might include
* resources that can affect permissions in your AWS account. For those
* stacks, you must explicitly acknowledge their capabilities by specifying
* this parameter. Currently, the only valid value is
* CAPABILITY_IAM
, which is required for the following
* resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template contains
* these resources, we recommend that you review any permissions associated
* with them. If you don't specify this parameter, this action returns an
* InsufficientCapabilities error.
*
*
* @param capabilities
* A list of capabilities that you must specify before AWS
* CloudFormation can create or update certain stacks. Some stack
* templates might include resources that can affect permissions in
* your AWS account. For those stacks, you must explicitly
* acknowledge their capabilities by specifying this parameter.
* Currently, the only valid value is CAPABILITY_IAM
,
* which is required for the following resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template
* contains these resources, we recommend that you review any
* permissions associated with them. If you don't specify this
* parameter, this action returns an InsufficientCapabilities error.
* @see Capability
*/
public void setCapabilities(java.util.Collection capabilities) {
if (capabilities == null) {
this.capabilities = null;
return;
}
this.capabilities = new com.amazonaws.internal.SdkInternalList(
capabilities);
}
/**
*
* A list of capabilities that you must specify before AWS CloudFormation
* can create or update certain stacks. Some stack templates might include
* resources that can affect permissions in your AWS account. For those
* stacks, you must explicitly acknowledge their capabilities by specifying
* this parameter. Currently, the only valid value is
* CAPABILITY_IAM
, which is required for the following
* resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template contains
* these resources, we recommend that you review any permissions associated
* with them. If you don't specify this parameter, this action returns an
* InsufficientCapabilities error.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setCapabilities(java.util.Collection)} or
* {@link #withCapabilities(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param capabilities
* A list of capabilities that you must specify before AWS
* CloudFormation can create or update certain stacks. Some stack
* templates might include resources that can affect permissions in
* your AWS account. For those stacks, you must explicitly
* acknowledge their capabilities by specifying this parameter.
* Currently, the only valid value is CAPABILITY_IAM
,
* which is required for the following resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template
* contains these resources, we recommend that you review any
* permissions associated with them. If you don't specify this
* parameter, this action returns an InsufficientCapabilities error.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see Capability
*/
public UpdateStackRequest withCapabilities(String... capabilities) {
if (this.capabilities == null) {
setCapabilities(new com.amazonaws.internal.SdkInternalList(
capabilities.length));
}
for (String ele : capabilities) {
this.capabilities.add(ele);
}
return this;
}
/**
*
* A list of capabilities that you must specify before AWS CloudFormation
* can create or update certain stacks. Some stack templates might include
* resources that can affect permissions in your AWS account. For those
* stacks, you must explicitly acknowledge their capabilities by specifying
* this parameter. Currently, the only valid value is
* CAPABILITY_IAM
, which is required for the following
* resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template contains
* these resources, we recommend that you review any permissions associated
* with them. If you don't specify this parameter, this action returns an
* InsufficientCapabilities error.
*
*
* @param capabilities
* A list of capabilities that you must specify before AWS
* CloudFormation can create or update certain stacks. Some stack
* templates might include resources that can affect permissions in
* your AWS account. For those stacks, you must explicitly
* acknowledge their capabilities by specifying this parameter.
* Currently, the only valid value is CAPABILITY_IAM
,
* which is required for the following resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template
* contains these resources, we recommend that you review any
* permissions associated with them. If you don't specify this
* parameter, this action returns an InsufficientCapabilities error.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see Capability
*/
public UpdateStackRequest withCapabilities(
java.util.Collection capabilities) {
setCapabilities(capabilities);
return this;
}
/**
*
* A list of capabilities that you must specify before AWS CloudFormation
* can create or update certain stacks. Some stack templates might include
* resources that can affect permissions in your AWS account. For those
* stacks, you must explicitly acknowledge their capabilities by specifying
* this parameter. Currently, the only valid value is
* CAPABILITY_IAM
, which is required for the following
* resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template contains
* these resources, we recommend that you review any permissions associated
* with them. If you don't specify this parameter, this action returns an
* InsufficientCapabilities error.
*
*
* @param capabilities
* A list of capabilities that you must specify before AWS
* CloudFormation can create or update certain stacks. Some stack
* templates might include resources that can affect permissions in
* your AWS account. For those stacks, you must explicitly
* acknowledge their capabilities by specifying this parameter.
* Currently, the only valid value is CAPABILITY_IAM
,
* which is required for the following resources: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, AWS::IAM::Role, AWS::IAM::User, and AWS::IAM::UserToGroupAddition. If your stack template
* contains these resources, we recommend that you review any
* permissions associated with them. If you don't specify this
* parameter, this action returns an InsufficientCapabilities error.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see Capability
*/
public UpdateStackRequest withCapabilities(Capability... capabilities) {
com.amazonaws.internal.SdkInternalList capabilitiesCopy = new com.amazonaws.internal.SdkInternalList(
capabilities.length);
for (Capability value : capabilities) {
capabilitiesCopy.add(value.toString());
}
if (getCapabilities() == null) {
setCapabilities(capabilitiesCopy);
} else {
getCapabilities().addAll(capabilitiesCopy);
}
return this;
}
/**
*
* The template resource types that you have permissions to work with for
* this update stack action, such as AWS::EC2::Instance
,
* AWS::EC2::*
, or Custom::MyCustomInstance
.
*
*
* If the list of resource types doesn't include a resource 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 AWS CloudFormation-specific condition keys
* in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management
*
*
* @return The template resource types that you have permissions to work
* with for this update stack action, such as
* AWS::EC2::Instance
, AWS::EC2::*
, or
* Custom::MyCustomInstance
.
*
* If the list of resource types doesn't include a resource 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 AWS
* CloudFormation-specific condition keys in IAM policies. For more
* information, see Controlling Access with AWS Identity and Access Management
*/
public java.util.List getResourceTypes() {
if (resourceTypes == null) {
resourceTypes = new com.amazonaws.internal.SdkInternalList();
}
return resourceTypes;
}
/**
*
* The template resource types that you have permissions to work with for
* this update stack action, such as AWS::EC2::Instance
,
* AWS::EC2::*
, or Custom::MyCustomInstance
.
*
*
* If the list of resource types doesn't include a resource 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 AWS CloudFormation-specific condition keys
* in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management
*
*
* @param resourceTypes
* The template resource types that you have permissions to work with
* for this update stack action, such as
* AWS::EC2::Instance
, AWS::EC2::*
, or
* Custom::MyCustomInstance
.
*
* If the list of resource types doesn't include a resource 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 AWS
* CloudFormation-specific condition keys in IAM policies. For more
* information, see Controlling Access with AWS Identity and Access Management
*/
public void setResourceTypes(java.util.Collection resourceTypes) {
if (resourceTypes == null) {
this.resourceTypes = null;
return;
}
this.resourceTypes = new com.amazonaws.internal.SdkInternalList(
resourceTypes);
}
/**
*
* The template resource types that you have permissions to work with for
* this update stack action, such as AWS::EC2::Instance
,
* AWS::EC2::*
, or Custom::MyCustomInstance
.
*
*
* If the list of resource types doesn't include a resource 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 AWS CloudFormation-specific condition keys
* in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setResourceTypes(java.util.Collection)} or
* {@link #withResourceTypes(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param resourceTypes
* The template resource types that you have permissions to work with
* for this update stack action, such as
* AWS::EC2::Instance
, AWS::EC2::*
, or
* Custom::MyCustomInstance
.
*
* If the list of resource types doesn't include a resource 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 AWS
* CloudFormation-specific condition keys in IAM policies. For more
* information, see Controlling Access with AWS Identity and Access Management
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withResourceTypes(String... resourceTypes) {
if (this.resourceTypes == null) {
setResourceTypes(new com.amazonaws.internal.SdkInternalList(
resourceTypes.length));
}
for (String ele : resourceTypes) {
this.resourceTypes.add(ele);
}
return this;
}
/**
*
* The template resource types that you have permissions to work with for
* this update stack action, such as AWS::EC2::Instance
,
* AWS::EC2::*
, or Custom::MyCustomInstance
.
*
*
* If the list of resource types doesn't include a resource 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 AWS CloudFormation-specific condition keys
* in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management
*
*
* @param resourceTypes
* The template resource types that you have permissions to work with
* for this update stack action, such as
* AWS::EC2::Instance
, AWS::EC2::*
, or
* Custom::MyCustomInstance
.
*
* If the list of resource types doesn't include a resource 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 AWS
* CloudFormation-specific condition keys in IAM policies. For more
* information, see Controlling Access with AWS Identity and Access Management
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withResourceTypes(
java.util.Collection resourceTypes) {
setResourceTypes(resourceTypes);
return this;
}
/**
*
* Structure containing a new stack policy body. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
*
* You might update the stack policy, for example, in order to protect a new
* resource that you created during a stack update. If you do not specify a
* stack policy, the current policy that is associated with the stack is
* unchanged.
*
*
* @param stackPolicyBody
* Structure containing a new stack policy body. You can specify
* either the StackPolicyBody
or the
* StackPolicyURL
parameter, but not both.
*
* You might update the stack policy, for example, in order to
* protect a new resource that you created during a stack update. If
* you do not specify a stack policy, the current policy that is
* associated with the stack is unchanged.
*/
public void setStackPolicyBody(String stackPolicyBody) {
this.stackPolicyBody = stackPolicyBody;
}
/**
*
* Structure containing a new stack policy body. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
*
* You might update the stack policy, for example, in order to protect a new
* resource that you created during a stack update. If you do not specify a
* stack policy, the current policy that is associated with the stack is
* unchanged.
*
*
* @return Structure containing a new stack policy body. You can specify
* either the StackPolicyBody
or the
* StackPolicyURL
parameter, but not both.
*
* You might update the stack policy, for example, in order to
* protect a new resource that you created during a stack update. If
* you do not specify a stack policy, the current policy that is
* associated with the stack is unchanged.
*/
public String getStackPolicyBody() {
return this.stackPolicyBody;
}
/**
*
* Structure containing a new stack policy body. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
*
* You might update the stack policy, for example, in order to protect a new
* resource that you created during a stack update. If you do not specify a
* stack policy, the current policy that is associated with the stack is
* unchanged.
*
*
* @param stackPolicyBody
* Structure containing a new stack policy body. You can specify
* either the StackPolicyBody
or the
* StackPolicyURL
parameter, but not both.
*
* You might update the stack policy, for example, in order to
* protect a new resource that you created during a stack update. If
* you do not specify a stack policy, the current policy that is
* associated with the stack is unchanged.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withStackPolicyBody(String stackPolicyBody) {
setStackPolicyBody(stackPolicyBody);
return this;
}
/**
*
* Location of a file containing the updated stack policy. The URL must
* point to a policy (max size: 16KB) located in an S3 bucket in the same
* region as the stack. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
*
* You might update the stack policy, for example, in order to protect a new
* resource that you created during a stack update. If you do not specify a
* stack policy, the current policy that is associated with the stack is
* unchanged.
*
*
* @param stackPolicyURL
* Location of a file containing the updated stack policy. The URL
* must point to a policy (max size: 16KB) located in an S3 bucket in
* the same region as the stack. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
* You might update the stack policy, for example, in order to
* protect a new resource that you created during a stack update. If
* you do not specify a stack policy, the current policy that is
* associated with the stack is unchanged.
*/
public void setStackPolicyURL(String stackPolicyURL) {
this.stackPolicyURL = stackPolicyURL;
}
/**
*
* Location of a file containing the updated stack policy. The URL must
* point to a policy (max size: 16KB) located in an S3 bucket in the same
* region as the stack. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
*
* You might update the stack policy, for example, in order to protect a new
* resource that you created during a stack update. If you do not specify a
* stack policy, the current policy that is associated with the stack is
* unchanged.
*
*
* @return Location of a file containing the updated stack policy. The URL
* must point to a policy (max size: 16KB) located in an S3 bucket
* in the same region as the stack. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
* You might update the stack policy, for example, in order to
* protect a new resource that you created during a stack update. If
* you do not specify a stack policy, the current policy that is
* associated with the stack is unchanged.
*/
public String getStackPolicyURL() {
return this.stackPolicyURL;
}
/**
*
* Location of a file containing the updated stack policy. The URL must
* point to a policy (max size: 16KB) located in an S3 bucket in the same
* region as the stack. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
*
* You might update the stack policy, for example, in order to protect a new
* resource that you created during a stack update. If you do not specify a
* stack policy, the current policy that is associated with the stack is
* unchanged.
*
*
* @param stackPolicyURL
* Location of a file containing the updated stack policy. The URL
* must point to a policy (max size: 16KB) located in an S3 bucket in
* the same region as the stack. You can specify either the
* StackPolicyBody
or the StackPolicyURL
* parameter, but not both.
*
* You might update the stack policy, for example, in order to
* protect a new resource that you created during a stack update. If
* you do not specify a stack policy, the current policy that is
* associated with the stack is unchanged.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withStackPolicyURL(String stackPolicyURL) {
setStackPolicyURL(stackPolicyURL);
return this;
}
/**
*
* Update the ARNs for the Amazon SNS topics that are associated with the
* stack.
*
*
* @return Update the ARNs for the Amazon SNS topics that are associated
* with the stack.
*/
public java.util.List getNotificationARNs() {
if (notificationARNs == null) {
notificationARNs = new com.amazonaws.internal.SdkInternalList();
}
return notificationARNs;
}
/**
*
* Update the ARNs for the Amazon SNS topics that are associated with the
* stack.
*
*
* @param notificationARNs
* Update the ARNs for the Amazon SNS topics that are associated with
* the stack.
*/
public void setNotificationARNs(
java.util.Collection notificationARNs) {
if (notificationARNs == null) {
this.notificationARNs = null;
return;
}
this.notificationARNs = new com.amazonaws.internal.SdkInternalList(
notificationARNs);
}
/**
*
* Update the ARNs for the Amazon SNS topics that are associated with the
* stack.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setNotificationARNs(java.util.Collection)} or
* {@link #withNotificationARNs(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param notificationARNs
* Update the ARNs for the Amazon SNS topics that are associated with
* the stack.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withNotificationARNs(String... notificationARNs) {
if (this.notificationARNs == null) {
setNotificationARNs(new com.amazonaws.internal.SdkInternalList(
notificationARNs.length));
}
for (String ele : notificationARNs) {
this.notificationARNs.add(ele);
}
return this;
}
/**
*
* Update the ARNs for the Amazon SNS topics that are associated with the
* stack.
*
*
* @param notificationARNs
* Update the ARNs for the Amazon SNS topics that are associated with
* the stack.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateStackRequest withNotificationARNs(
java.util.Collection notificationARNs) {
setNotificationARNs(notificationARNs);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getStackName() != null)
sb.append("StackName: " + getStackName() + ",");
if (getTemplateBody() != null)
sb.append("TemplateBody: " + getTemplateBody() + ",");
if (getTemplateURL() != null)
sb.append("TemplateURL: " + getTemplateURL() + ",");
if (getUsePreviousTemplate() != null)
sb.append("UsePreviousTemplate: " + getUsePreviousTemplate() + ",");
if (getStackPolicyDuringUpdateBody() != null)
sb.append("StackPolicyDuringUpdateBody: "
+ getStackPolicyDuringUpdateBody() + ",");
if (getStackPolicyDuringUpdateURL() != null)
sb.append("StackPolicyDuringUpdateURL: "
+ getStackPolicyDuringUpdateURL() + ",");
if (getParameters() != null)
sb.append("Parameters: " + getParameters() + ",");
if (getCapabilities() != null)
sb.append("Capabilities: " + getCapabilities() + ",");
if (getResourceTypes() != null)
sb.append("ResourceTypes: " + getResourceTypes() + ",");
if (getStackPolicyBody() != null)
sb.append("StackPolicyBody: " + getStackPolicyBody() + ",");
if (getStackPolicyURL() != null)
sb.append("StackPolicyURL: " + getStackPolicyURL() + ",");
if (getNotificationARNs() != null)
sb.append("NotificationARNs: " + getNotificationARNs());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateStackRequest == false)
return false;
UpdateStackRequest other = (UpdateStackRequest) obj;
if (other.getStackName() == null ^ this.getStackName() == null)
return false;
if (other.getStackName() != null
&& other.getStackName().equals(this.getStackName()) == false)
return false;
if (other.getTemplateBody() == null ^ this.getTemplateBody() == null)
return false;
if (other.getTemplateBody() != null
&& other.getTemplateBody().equals(this.getTemplateBody()) == false)
return false;
if (other.getTemplateURL() == null ^ this.getTemplateURL() == null)
return false;
if (other.getTemplateURL() != null
&& other.getTemplateURL().equals(this.getTemplateURL()) == false)
return false;
if (other.getUsePreviousTemplate() == null
^ this.getUsePreviousTemplate() == null)
return false;
if (other.getUsePreviousTemplate() != null
&& other.getUsePreviousTemplate().equals(
this.getUsePreviousTemplate()) == false)
return false;
if (other.getStackPolicyDuringUpdateBody() == null
^ this.getStackPolicyDuringUpdateBody() == null)
return false;
if (other.getStackPolicyDuringUpdateBody() != null
&& other.getStackPolicyDuringUpdateBody().equals(
this.getStackPolicyDuringUpdateBody()) == false)
return false;
if (other.getStackPolicyDuringUpdateURL() == null
^ this.getStackPolicyDuringUpdateURL() == null)
return false;
if (other.getStackPolicyDuringUpdateURL() != null
&& other.getStackPolicyDuringUpdateURL().equals(
this.getStackPolicyDuringUpdateURL()) == false)
return false;
if (other.getParameters() == null ^ this.getParameters() == null)
return false;
if (other.getParameters() != null
&& other.getParameters().equals(this.getParameters()) == false)
return false;
if (other.getCapabilities() == null ^ this.getCapabilities() == null)
return false;
if (other.getCapabilities() != null
&& other.getCapabilities().equals(this.getCapabilities()) == false)
return false;
if (other.getResourceTypes() == null ^ this.getResourceTypes() == null)
return false;
if (other.getResourceTypes() != null
&& other.getResourceTypes().equals(this.getResourceTypes()) == false)
return false;
if (other.getStackPolicyBody() == null
^ this.getStackPolicyBody() == null)
return false;
if (other.getStackPolicyBody() != null
&& other.getStackPolicyBody().equals(this.getStackPolicyBody()) == false)
return false;
if (other.getStackPolicyURL() == null
^ this.getStackPolicyURL() == null)
return false;
if (other.getStackPolicyURL() != null
&& other.getStackPolicyURL().equals(this.getStackPolicyURL()) == false)
return false;
if (other.getNotificationARNs() == null
^ this.getNotificationARNs() == null)
return false;
if (other.getNotificationARNs() != null
&& other.getNotificationARNs().equals(
this.getNotificationARNs()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getStackName() == null) ? 0 : getStackName().hashCode());
hashCode = prime
* hashCode
+ ((getTemplateBody() == null) ? 0 : getTemplateBody()
.hashCode());
hashCode = prime
* hashCode
+ ((getTemplateURL() == null) ? 0 : getTemplateURL().hashCode());
hashCode = prime
* hashCode
+ ((getUsePreviousTemplate() == null) ? 0
: getUsePreviousTemplate().hashCode());
hashCode = prime
* hashCode
+ ((getStackPolicyDuringUpdateBody() == null) ? 0
: getStackPolicyDuringUpdateBody().hashCode());
hashCode = prime
* hashCode
+ ((getStackPolicyDuringUpdateURL() == null) ? 0
: getStackPolicyDuringUpdateURL().hashCode());
hashCode = prime * hashCode
+ ((getParameters() == null) ? 0 : getParameters().hashCode());
hashCode = prime
* hashCode
+ ((getCapabilities() == null) ? 0 : getCapabilities()
.hashCode());
hashCode = prime
* hashCode
+ ((getResourceTypes() == null) ? 0 : getResourceTypes()
.hashCode());
hashCode = prime
* hashCode
+ ((getStackPolicyBody() == null) ? 0 : getStackPolicyBody()
.hashCode());
hashCode = prime
* hashCode
+ ((getStackPolicyURL() == null) ? 0 : getStackPolicyURL()
.hashCode());
hashCode = prime
* hashCode
+ ((getNotificationARNs() == null) ? 0 : getNotificationARNs()
.hashCode());
return hashCode;
}
@Override
public UpdateStackRequest clone() {
return (UpdateStackRequest) super.clone();
}
}