com.amazonaws.services.cloudformation.model
Class CreateStackRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.cloudformation.model.CreateStackRequest

public class CreateStackRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateStack operation.

Creates a stack as specified in the template. After the call completes successfully, the stack creation starts. You can check the status of the stack via the DescribeStacks API.

NOTE: Currently, the limit for stacks is 20 stacks per account per region.

See Also:
AmazonCloudFormation.createStack(CreateStackRequest)

Constructor Summary
CreateStackRequest()
           
 
Method Summary
 boolean equals(Object obj)
           
 List<String> getCapabilities()
          The list of capabilities that you want to allow in the stack.
 Boolean getDisableRollback()
          Boolean to enable or disable rollback on stack creation failures.

Default: false
 List<String> getNotificationARNs()
          The Simple Notification Service (SNS) topic ARNs to publish stack related events.
 List<Parameter> getParameters()
          A list of Parameter structures that specify input parameters for the stack.
 String getStackName()
          The name associated with the stack.
 String getTemplateBody()
          Structure containing the template body.
 String getTemplateURL()
          Location of file containing the template body.
 Integer getTimeoutInMinutes()
          The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.
 int hashCode()
           
 Boolean isDisableRollback()
          Boolean to enable or disable rollback on stack creation failures.

Default: false
 void setCapabilities(Collection<String> capabilities)
          The list of capabilities that you want to allow in the stack.
 void setDisableRollback(Boolean disableRollback)
          Boolean to enable or disable rollback on stack creation failures.

Default: false
 void setNotificationARNs(Collection<String> notificationARNs)
          The Simple Notification Service (SNS) topic ARNs to publish stack related events.
 void setParameters(Collection<Parameter> parameters)
          A list of Parameter structures that specify input parameters for the stack.
 void setStackName(String stackName)
          The name associated with the stack.
 void setTemplateBody(String templateBody)
          Structure containing the template body.
 void setTemplateURL(String templateURL)
          Location of file containing the template body.
 void setTimeoutInMinutes(Integer timeoutInMinutes)
          The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateStackRequest withCapabilities(Collection<String> capabilities)
          The list of capabilities that you want to allow in the stack.
 CreateStackRequest withCapabilities(String... capabilities)
          The list of capabilities that you want to allow in the stack.
 CreateStackRequest withDisableRollback(Boolean disableRollback)
          Boolean to enable or disable rollback on stack creation failures.

Default: false
 CreateStackRequest withNotificationARNs(Collection<String> notificationARNs)
          The Simple Notification Service (SNS) topic ARNs to publish stack related events.
 CreateStackRequest withNotificationARNs(String... notificationARNs)
          The Simple Notification Service (SNS) topic ARNs to publish stack related events.
 CreateStackRequest withParameters(Collection<Parameter> parameters)
          A list of Parameter structures that specify input parameters for the stack.
 CreateStackRequest withParameters(Parameter... parameters)
          A list of Parameter structures that specify input parameters for the stack.
 CreateStackRequest withStackName(String stackName)
          The name associated with the stack.
 CreateStackRequest withTemplateBody(String templateBody)
          Structure containing the template body.
 CreateStackRequest withTemplateURL(String templateURL)
          Location of file containing the template body.
 CreateStackRequest withTimeoutInMinutes(Integer timeoutInMinutes)
          The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateStackRequest

public CreateStackRequest()
Method Detail

getStackName

public String getStackName()
The name associated with the stack. The name must be unique within your AWS account. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.

Returns:
The name associated with the stack. The name must be unique within your AWS account. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.

setStackName

public void setStackName(String stackName)
The name associated with the stack. The name must be unique within your AWS account. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.

Parameters:
stackName - The name associated with the stack. The name must be unique within your AWS account. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.

withStackName

public CreateStackRequest withStackName(String stackName)
The name associated with the stack. The name must be unique within your AWS account. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.

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

Parameters:
stackName - The name associated with the stack. The name must be unique within your AWS account. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.
Returns:
A reference to this updated object so that method calls can be chained together.

getTemplateBody

public String getTemplateBody()
Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.)

Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.

Constraints:
Length: 1 -

Returns:
Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.)

Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.


setTemplateBody

public void setTemplateBody(String templateBody)
Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.)

Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.

Constraints:
Length: 1 -

Parameters:
templateBody - Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.)

Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.


withTemplateBody

public CreateStackRequest withTemplateBody(String templateBody)
Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.)

Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.

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

Constraints:
Length: 1 -

Parameters:
templateBody - Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.)

Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.

Returns:
A reference to this updated object so that method calls can be chained together.

getTemplateURL

public String getTemplateURL()
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 the AWS CloudFormation User Guide.

Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.

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 the AWS CloudFormation User Guide.

Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.


setTemplateURL

public void setTemplateURL(String 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 the AWS CloudFormation User Guide.

Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.

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 the AWS CloudFormation User Guide.

Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.


withTemplateURL

public CreateStackRequest withTemplateURL(String 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 the AWS CloudFormation User Guide.

Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.

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 the AWS CloudFormation User Guide.

Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.

Returns:
A reference to this updated object so that method calls can be chained together.

getParameters

public List<Parameter> getParameters()
A list of Parameter structures that specify input parameters for the stack.

Returns:
A list of Parameter structures that specify input parameters for the stack.

setParameters

public void setParameters(Collection<Parameter> parameters)
A list of Parameter structures that specify input parameters for the stack.

Parameters:
parameters - A list of Parameter structures that specify input parameters for the stack.

withParameters

public CreateStackRequest withParameters(Parameter... parameters)
A list of Parameter structures that specify input parameters for the stack.

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.
Returns:
A reference to this updated object so that method calls can be chained together.

withParameters

public CreateStackRequest withParameters(Collection<Parameter> parameters)
A list of Parameter structures that specify input parameters for the stack.

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.
Returns:
A reference to this updated object so that method calls can be chained together.

isDisableRollback

public Boolean isDisableRollback()
Boolean to enable or disable rollback on stack creation failures.

Default: false

Returns:
Boolean to enable or disable rollback on stack creation failures.

Default: false

setDisableRollback

public void setDisableRollback(Boolean disableRollback)
Boolean to enable or disable rollback on stack creation failures.

Default: false

Parameters:
disableRollback - Boolean to enable or disable rollback on stack creation failures.

Default: false

withDisableRollback

public CreateStackRequest withDisableRollback(Boolean disableRollback)
Boolean to enable or disable rollback on stack creation failures.

Default: false

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

Parameters:
disableRollback - Boolean to enable or disable rollback on stack creation failures.

Default: false
Returns:
A reference to this updated object so that method calls can be chained together.

getDisableRollback

public Boolean getDisableRollback()
Boolean to enable or disable rollback on stack creation failures.

Default: false

Returns:
Boolean to enable or disable rollback on stack creation failures.

Default: false

getTimeoutInMinutes

public Integer getTimeoutInMinutes()
The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.

Constraints:
Range: 1 -

Returns:
The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.

setTimeoutInMinutes

public void setTimeoutInMinutes(Integer timeoutInMinutes)
The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.

Constraints:
Range: 1 -

Parameters:
timeoutInMinutes - The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.

withTimeoutInMinutes

public CreateStackRequest withTimeoutInMinutes(Integer timeoutInMinutes)
The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.

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

Constraints:
Range: 1 -

Parameters:
timeoutInMinutes - The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.
Returns:
A reference to this updated object so that method calls can be chained together.

getNotificationARNs

public List<String> getNotificationARNs()
The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).

Constraints:
Length: 0 - 5

Returns:
The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).

setNotificationARNs

public void setNotificationARNs(Collection<String> notificationARNs)
The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).

Constraints:
Length: 0 - 5

Parameters:
notificationARNs - The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).

withNotificationARNs

public CreateStackRequest withNotificationARNs(String... notificationARNs)
The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).

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

Constraints:
Length: 0 - 5

Parameters:
notificationARNs - The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).
Returns:
A reference to this updated object so that method calls can be chained together.

withNotificationARNs

public CreateStackRequest withNotificationARNs(Collection<String> notificationARNs)
The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).

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

Constraints:
Length: 0 - 5

Parameters:
notificationARNs - The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).
Returns:
A reference to this updated object so that method calls can be chained together.

getCapabilities

public List<String> getCapabilities()
The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.

Returns:
The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.

setCapabilities

public void setCapabilities(Collection<String> capabilities)
The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.

Parameters:
capabilities - The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.

withCapabilities

public CreateStackRequest withCapabilities(String... capabilities)
The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.

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

Parameters:
capabilities - The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.
Returns:
A reference to this updated object so that method calls can be chained together.

withCapabilities

public CreateStackRequest withCapabilities(Collection<String> capabilities)
The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.

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

Parameters:
capabilities - The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.