You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::CloudFormation::Stack
- Inherits:
-
Resources::Resource
- Object
- Resources::Resource
- Aws::CloudFormation::Stack
- Defined in:
- (unknown)
Instance Attribute Summary collapse
-
#capabilities ⇒ Array<String>
readonly
The capabilities allowed in the stack.
-
#change_set_id ⇒ String
readonly
The unique ID of the change set.
-
#creation_time ⇒ Time
readonly
The time at which the stack was created.
-
#deletion_time ⇒ Time
readonly
The time the stack was deleted.
-
#description ⇒ String
readonly
A user-defined description associated with the stack.
-
#disable_rollback ⇒ Boolean
readonly
Boolean to enable or disable rollback on stack creation failures:.
-
#drift_information ⇒ Types::StackDriftInformation
readonly
Information on whether a stack\'s actual configuration differs, or has drifted, from it\'s expected configuration, as defined in the stack template and any values specified as template parameters.
-
#enable_termination_protection ⇒ Boolean
readonly
Whether termination protection is enabled for the stack.
-
#last_updated_time ⇒ Time
readonly
The time the stack was last updated.
-
#name ⇒ String
readonly
-
#notification_arns ⇒ Array<String>
readonly
SNS topic ARNs to which stack related events are published.
-
#outputs ⇒ Array<Types::Output>
readonly
A list of output structures.
-
#parameters ⇒ Array<Types::Parameter>
readonly
A list of
Parameter
structures. -
#parent_id ⇒ String
readonly
For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this stack.
-
#role_arn ⇒ String
readonly
The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that is associated with the stack.
-
#rollback_configuration ⇒ Types::RollbackConfiguration
readonly
The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.
-
#root_id ⇒ String
readonly
For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
-
#stack_id ⇒ String
readonly
Unique identifier of the stack.
-
#stack_name ⇒ String
readonly
The name associated with the stack.
-
#stack_status ⇒ String
readonly
Current status of the stack.
-
#stack_status_reason ⇒ String
readonly
Success/failure message associated with the stack status.
-
#tags ⇒ Array<Types::Tag>
readonly
A list of
Tag
s that specify information about the stack. -
#timeout_in_minutes ⇒ Integer
readonly
The amount of time within which stack creation should complete.
Attributes inherited from Resources::Resource
Instance Method Summary collapse
-
#cancel_update(options = {}) ⇒ Struct
Cancels an update on the specified stack.
-
#create(options = {}) ⇒ Types::CreateStackOutput
Creates a stack as specified in the template.
-
#delete(options = {}) ⇒ Struct
Deletes a specified stack.
-
#events(options = {}) ⇒ Collection<Event>
Returns a Collection of Event resources.
-
#exists? ⇒ Boolean
Returns
true
if this Stack exists. -
#initialize ⇒ Object
constructor
-
#resource(logical_id) ⇒ StackResource
-
#resource_summaries(options = {}) ⇒ Collection<StackResourceSummary>
Returns a Collection of StackResourceSummary resources.
-
#update(options = {}) ⇒ Types::UpdateStackOutput
Updates a stack as specified in the template.
-
#wait_until_exists {|waiter| ... } ⇒ Stack
Waits until this Stack is exists.
Methods inherited from Resources::Resource
add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until
Methods included from Resources::OperationMethods
#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations
Constructor Details
#initialize(name, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object
Instance Attribute Details
#capabilities ⇒ Array<String> (readonly)
The capabilities allowed in the stack.
#change_set_id ⇒ String (readonly)
The unique ID of the change set.
#creation_time ⇒ Time (readonly)
The time at which the stack was created.
#deletion_time ⇒ Time (readonly)
The time the stack was deleted.
#description ⇒ String (readonly)
A user-defined description associated with the stack.
#disable_rollback ⇒ Boolean (readonly)
Boolean to enable or disable rollback on stack creation failures:
true
: disable rollbackfalse
: enable rollback
#drift_information ⇒ Types::StackDriftInformation (readonly)
Information on whether a stack\'s actual configuration differs, or has drifted, from it\'s expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see Detecting Unregulated Configuration Changes to Stacks and Resources.
#enable_termination_protection ⇒ Boolean (readonly)
Whether termination protection is enabled for the stack.
For nested stacks, termination protection is set on the root stack and cannot be changed directly on the nested stack. For more information, see Protecting a Stack From Being Deleted in the AWS CloudFormation User Guide.
#last_updated_time ⇒ Time (readonly)
The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
#name ⇒ String (readonly)
#notification_arns ⇒ Array<String> (readonly)
SNS topic ARNs to which stack related events are published.
#outputs ⇒ Array<Types::Output> (readonly)
A list of output structures.
#parameters ⇒ Array<Types::Parameter> (readonly)
A list of Parameter
structures.
#parent_id ⇒ String (readonly)
For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.
For more information, see Working with Nested Stacks in the AWS CloudFormation User Guide.
#role_arn ⇒ String (readonly)
The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that is associated with the stack. During a stack operation, AWS CloudFormation uses this role\'s credentials to make calls on your behalf.
#rollback_configuration ⇒ Types::RollbackConfiguration (readonly)
The rollback triggers for AWS CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.
#root_id ⇒ String (readonly)
For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
For more information, see Working with Nested Stacks in the AWS CloudFormation User Guide.
#stack_id ⇒ String (readonly)
Unique identifier of the stack.
#stack_name ⇒ String (readonly)
The name associated with the stack.
#stack_status ⇒ String (readonly)
Current status of the stack.
Possible values:
- CREATE_IN_PROGRESS
- CREATE_FAILED
- CREATE_COMPLETE
- ROLLBACK_IN_PROGRESS
- ROLLBACK_FAILED
- ROLLBACK_COMPLETE
- DELETE_IN_PROGRESS
- DELETE_FAILED
- DELETE_COMPLETE
- UPDATE_IN_PROGRESS
- UPDATE_COMPLETE_CLEANUP_IN_PROGRESS
- UPDATE_COMPLETE
- UPDATE_ROLLBACK_IN_PROGRESS
- UPDATE_ROLLBACK_FAILED
- UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS
- UPDATE_ROLLBACK_COMPLETE
- REVIEW_IN_PROGRESS
- IMPORT_IN_PROGRESS
- IMPORT_COMPLETE
- IMPORT_ROLLBACK_IN_PROGRESS
- IMPORT_ROLLBACK_FAILED
- IMPORT_ROLLBACK_COMPLETE
#stack_status_reason ⇒ String (readonly)
Success/failure message associated with the stack status.
#tags ⇒ Array<Types::Tag> (readonly)
A list of Tag
s that specify information about the stack.
#timeout_in_minutes ⇒ Integer (readonly)
The amount of time within which stack creation should complete.
Instance Method Details
#cancel_update(options = {}) ⇒ Struct
Cancels an update on the specified stack. If the call completes successfully, the stack rolls back the update and reverts to the previous stack configuration.
You can cancel only stacks that are in the UPDATE_IN_PROGRESS state.
#create(options = {}) ⇒ Types::CreateStackOutput
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.
#delete(options = {}) ⇒ Struct
Deletes a specified stack. Once the call completes successfully, stack deletion starts. Deleted stacks do not show up in the DescribeStacks API if the deletion has been completed successfully.
#events(options = {}) ⇒ Collection<Event>
Returns a Collection of Event resources. No API requests are made until you call an enumerable method on the collection. Client#describe_stack_events will be called multiple times until every Event has been yielded.
#exists? ⇒ Boolean
Returns true
if this Stack exists. Returns false
otherwise.
#resource(logical_id) ⇒ StackResource
#resource_summaries(options = {}) ⇒ Collection<StackResourceSummary>
Returns a Collection of Aws::CloudFormation::StackResourceSummary resources. No API requests are made until you call an enumerable method on the collection. Client#list_stack_resources will be called multiple times until every Aws::CloudFormation::StackResourceSummary has been yielded.
#update(options = {}) ⇒ Types::UpdateStackOutput
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.
For more information about creating an update template, updating a stack, and monitoring the progress of the update, see Updating a Stack.
#wait_until_exists {|waiter| ... } ⇒ Stack
Waits until this Stack is exists. This method waits by polling Client#describe_stacks until successful. An error is raised after a configurable number of failed checks.
This waiter uses the following defaults:
Configuration | Default |
---|---|
#delay |
5 |
#max_attempts |
20 |
You can modify defaults and register callbacks by passing a block argument.