Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * 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;
  
  
Container for the parameters to the UpdateStack operation.

Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of the stack via the DescribeStacks action.

To get a copy of the template for an existing stack, you can use the GetTemplate action.

Tags that were associated with this stack during creation time will still be associated with the stack after an UpdateStack operation.

For more information about creating an update template, updating a stack, and monitoring the progress of the update, see Updating a Stack .

  
  public class UpdateStackRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
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.

Constraints:
Length: 1 -

  
      private String templateBody;

    
Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. 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.

Constraints:
Length: 1 - 1024

  
      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.

Constraints:
Length: 1 - 16384

  
      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.

Constraints:
Length: 1 - 1350

 
     private String stackPolicyDuringUpdateURL;

    
A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
 
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.
 
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.

Constraints:
Length: 1 - 16384

 
     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.

Constraints:
Length: 1 - 1350

 
     private String stackPolicyURL;

    
Update the ARNs for the Amazon SNS topics that are associated with the stack.

Constraints:
Length: 0 - 5

 
The name or unique stack ID of the stack to update.

Returns:
The name or unique stack ID of the stack to update.
 
     public String getStackName() {
         return ;
     }
    
    
The name or unique stack ID of the stack to update.

Parameters:
stackName The name or unique stack ID of the stack to update.
 
     public void setStackName(String stackName) {
         this. = stackName;
     }
    
    
The name or unique stack ID of the stack to update.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stackName The name or unique stack ID of the stack to update.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withStackName(String stackName) {
         this. = 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.

Constraints:
Length: 1 -

Returns:
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 ;
     }
    
    
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.

Constraints:
Length: 1 -

Parameters:
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;
     }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 -

Parameters:
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.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withTemplateBody(String templateBody) {
         this. = templateBody;
         return this;
     }

    
Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. 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.

Constraints:
Length: 1 - 1024

Returns:
Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. 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 ;
     }
    
    
Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. 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.

Constraints:
Length: 1 - 1024

Parameters:
templateURL Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. 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;
     }
    
    
Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. 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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 1024

Parameters:
templateURL Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. 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.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withTemplateURL(String templateURL) {
         this. = templateURL;
         return this;
     }

    
Reuse the existing template that is associated with the stack that you are updating.

Returns:
Reuse the existing template that is associated with the stack that you are updating.
 
     public Boolean isUsePreviousTemplate() {
         return ;
     }
    
    
Reuse the existing template that is associated with the stack that you are updating.

Parameters:
usePreviousTemplate Reuse the existing template that is associated with the stack that you are updating.
 
     public void setUsePreviousTemplate(Boolean usePreviousTemplate) {
         this. = usePreviousTemplate;
     }
    
    
Reuse the existing template that is associated with the stack that you are updating.

Returns a reference to this object so that method calls can be chained together.

Parameters:
usePreviousTemplate Reuse the existing template that is associated with the stack that you are updating.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withUsePreviousTemplate(Boolean usePreviousTemplate) {
         this. = usePreviousTemplate;
         return this;
     }

    
Reuse the existing template that is associated with the stack that you are updating.

Returns:
Reuse the existing template that is associated with the stack that you are updating.
 
     public Boolean getUsePreviousTemplate() {
         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.

Constraints:
Length: 1 - 16384

Returns:
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.

Constraints:
Length: 1 - 16384

Parameters:
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;
     }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 16384

Parameters:
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.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withStackPolicyDuringUpdateBody(String stackPolicyDuringUpdateBody) {
         this. = 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.

Constraints:
Length: 1 - 1350

Returns:
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.

Constraints:
Length: 1 - 1350

Parameters:
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;
     }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 1350

Parameters:
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.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withStackPolicyDuringUpdateURL(String stackPolicyDuringUpdateURL) {
         this. = stackPolicyDuringUpdateURL;
         return this;
     }

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

Returns:
A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
 
     public java.util.List<ParametergetParameters() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<Parameter>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.

Parameters:
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<Parameterparameters) {
         if (parameters == null) {
             this. = null;
             return;
         }
         parametersCopy.addAll(parameters);
         this. = parametersCopy;
     }
    
    
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 setParameters(java.util.Collection) or withParameters(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
parameters A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withParameters(Parameter... parameters) {
         if (getParameters() == nullsetParameters(new java.util.ArrayList<Parameter>(parameters.length));
         for (Parameter value : parameters) {
             getParameters().add(value);
         }
         return this;
     }
    
    
A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.

Returns a reference to this object so that method calls can be chained together.

Parameters:
parameters A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (parameters == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<ParameterparametersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Parameter>(parameters.size());
             parametersCopy.addAll(parameters);
             this. = parametersCopy;
         }
 
         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.

Returns:
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.
 
     public java.util.List<StringgetCapabilities() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         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.

Parameters:
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.
 
     public void setCapabilities(java.util.Collection<Stringcapabilities) {
         if (capabilities == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringcapabilitiesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(capabilities.size());
         capabilitiesCopy.addAll(capabilities);
         this. = capabilitiesCopy;
     }
    
    
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 setCapabilities(java.util.Collection) or withCapabilities(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withCapabilities(String... capabilities) {
         if (getCapabilities() == nullsetCapabilities(new java.util.ArrayList<String>(capabilities.length));
         for (String value : capabilities) {
             getCapabilities().add(value);
         }
         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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withCapabilities(java.util.Collection<Stringcapabilities) {
         if (capabilities == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringcapabilitiesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(capabilities.size());
             capabilitiesCopy.addAll(capabilities);
             this. = capabilitiesCopy;
         }
 
         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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UpdateStackRequest withCapabilities(Capability... capabilities) {
         java.util.ArrayList<StringcapabilitiesCopy = new java.util.ArrayList<String>(capabilities.length);
         for (Capability member : capabilities) {
             capabilitiesCopy.add(member.toString());
         }
         if (getCapabilities() == null) {
             setCapabilities(capabilitiesCopy);
         } else {
             getCapabilities().addAll(capabilitiesCopy);
         }
         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.

Constraints:
Length: 1 - 16384

Returns:
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 ;
    }
    
    
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.

Constraints:
Length: 1 - 16384

Parameters:
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;
    }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 16384

Parameters:
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.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateStackRequest withStackPolicyBody(String stackPolicyBody) {
        this. = 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.

Constraints:
Length: 1 - 1350

Returns:
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 ;
    }
    
    
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.

Constraints:
Length: 1 - 1350

Parameters:
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;
    }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 1350

Parameters:
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.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateStackRequest withStackPolicyURL(String stackPolicyURL) {
        this. = stackPolicyURL;
        return this;
    }

    
Update the ARNs for the Amazon SNS topics that are associated with the stack.

Constraints:
Length: 0 - 5

Returns:
Update the ARNs for the Amazon SNS topics that are associated with the stack.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Update the ARNs for the Amazon SNS topics that are associated with the stack.

Constraints:
Length: 0 - 5

Parameters:
notificationARNs Update the ARNs for the Amazon SNS topics that are associated with the stack.
    public void setNotificationARNs(java.util.Collection<StringnotificationARNs) {
        if (notificationARNs == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringnotificationARNsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(notificationARNs.size());
        notificationARNsCopy.addAll(notificationARNs);
        this. = notificationARNsCopy;
    }
    
    
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 setNotificationARNs(java.util.Collection) or withNotificationARNs(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 5

Parameters:
notificationARNs Update the ARNs for the Amazon SNS topics that are associated with the stack.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateStackRequest withNotificationARNs(String... notificationARNs) {
        if (getNotificationARNs() == nullsetNotificationARNs(new java.util.ArrayList<String>(notificationARNs.length));
        for (String value : notificationARNs) {
            getNotificationARNs().add(value);
        }
        return this;
    }
    
    
Update the ARNs for the Amazon SNS topics that are associated with the stack.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 5

Parameters:
notificationARNs Update the ARNs for the Amazon SNS topics that are associated with the stack.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateStackRequest withNotificationARNs(java.util.Collection<StringnotificationARNs) {
        if (notificationARNs == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringnotificationARNsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(notificationARNs.size());
            notificationARNsCopy.addAll(notificationARNs);
            this. = notificationARNsCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStackName() != nullsb.append("StackName: " + getStackName() + ",");
        if (getTemplateBody() != nullsb.append("TemplateBody: " + getTemplateBody() + ",");
        if (getTemplateURL() != nullsb.append("TemplateURL: " + getTemplateURL() + ",");
        if (isUsePreviousTemplate() != nullsb.append("UsePreviousTemplate: " + isUsePreviousTemplate() + ",");
        if (getStackPolicyDuringUpdateBody() != nullsb.append("StackPolicyDuringUpdateBody: " + getStackPolicyDuringUpdateBody() + ",");
        if (getStackPolicyDuringUpdateURL() != nullsb.append("StackPolicyDuringUpdateURL: " + getStackPolicyDuringUpdateURL() + ",");
        if (getParameters() != nullsb.append("Parameters: " + getParameters() + ",");
        if (getCapabilities() != nullsb.append("Capabilities: " + getCapabilities() + ",");
        if (getStackPolicyBody() != nullsb.append("StackPolicyBody: " + getStackPolicyBody() + ",");
        if (getStackPolicyURL() != nullsb.append("StackPolicyURL: " + getStackPolicyURL() + ",");
        if (getNotificationARNs() != nullsb.append("NotificationARNs: " + getNotificationARNs() );
        sb.append("}");
        return sb.toString();
    }
    
    @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 + ((isUsePreviousTemplate() == null) ? 0 : isUsePreviousTemplate().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 + ((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 boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UpdateStackRequest == falsereturn false;
        UpdateStackRequest other = (UpdateStackRequest)obj;
        
        if (other.getStackName() == null ^ this.getStackName() == nullreturn false;
        if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == falsereturn false
        if (other.getTemplateBody() == null ^ this.getTemplateBody() == nullreturn false;
        if (other.getTemplateBody() != null && other.getTemplateBody().equals(this.getTemplateBody()) == falsereturn false
        if (other.getTemplateURL() == null ^ this.getTemplateURL() == nullreturn false;
        if (other.getTemplateURL() != null && other.getTemplateURL().equals(this.getTemplateURL()) == falsereturn false
        if (other.isUsePreviousTemplate() == null ^ this.isUsePreviousTemplate() == nullreturn false;
        if (other.isUsePreviousTemplate() != null && other.isUsePreviousTemplate().equals(this.isUsePreviousTemplate()) == falsereturn false
        if (other.getStackPolicyDuringUpdateBody() == null ^ this.getStackPolicyDuringUpdateBody() == nullreturn false;
        if (other.getStackPolicyDuringUpdateBody() != null && other.getStackPolicyDuringUpdateBody().equals(this.getStackPolicyDuringUpdateBody()) == falsereturn false
        if (other.getStackPolicyDuringUpdateURL() == null ^ this.getStackPolicyDuringUpdateURL() == nullreturn false;
        if (other.getStackPolicyDuringUpdateURL() != null && other.getStackPolicyDuringUpdateURL().equals(this.getStackPolicyDuringUpdateURL()) == falsereturn false
        if (other.getParameters() == null ^ this.getParameters() == nullreturn false;
        if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == falsereturn false
        if (other.getCapabilities() == null ^ this.getCapabilities() == nullreturn false;
        if (other.getCapabilities() != null && other.getCapabilities().equals(this.getCapabilities()) == falsereturn false
        if (other.getStackPolicyBody() == null ^ this.getStackPolicyBody() == nullreturn false;
        if (other.getStackPolicyBody() != null && other.getStackPolicyBody().equals(this.getStackPolicyBody()) == falsereturn false
        if (other.getStackPolicyURL() == null ^ this.getStackPolicyURL() == nullreturn false;
        if (other.getStackPolicyURL() != null && other.getStackPolicyURL().equals(this.getStackPolicyURL()) == falsereturn false
        if (other.getNotificationARNs() == null ^ this.getNotificationARNs() == nullreturn false;
        if (other.getNotificationARNs() != null && other.getNotificationARNs().equals(this.getNotificationARNs()) == falsereturn false
        return true;
    }
    
    @Override
    public UpdateStackRequest clone() {
        
            return (UpdateStackRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X