Class: AwsCftTools::Client::CFT
- Includes:
- ChangesetManagement, StackManagement
- Defined in:
- lib/aws_cft_tools/client/cft.rb,
lib/aws_cft_tools/client/cft/stack_management.rb,
lib/aws_cft_tools/client/cft/changeset_management.rb
Overview
CloudFormation Client
All of the business logic behind direct interaction with the AWS API for CloudFormation templates and stacks.
Defined Under Namespace
Modules: ChangesetManagement, StackManagement
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#all_stacks ⇒ Array<OpenStruct>
List all of the stacks in CloudFormation.
-
#exports ⇒ Array<Aws::CloudFormation::Types::Export>
Lists all exports from stacks in CloudFormation.
-
#initialize(options) ⇒ CFT
constructor
A new instance of CFT.
-
#stacks ⇒ Array<OpenStruct>
Lists all of the stacks in CloudFormation that are specific to the selected environment.
Methods included from StackManagement
#create_stack, #delete_stack, #update_stack
Methods included from ChangesetManagement
#changes_on_stack_create, #changes_on_stack_delete, #changes_on_stack_update
Methods inherited from Base
Constructor Details
#initialize(options) ⇒ CFT
Returns a new instance of CFT.
25 26 27 |
# File 'lib/aws_cft_tools/client/cft.rb', line 25 def initialize() super() end |
Class Method Details
.aws_client_class ⇒ Object
29 30 31 |
# File 'lib/aws_cft_tools/client/cft.rb', line 29 def self.aws_client_class Aws::CloudFormation::Client end |
Instance Method Details
#all_stacks ⇒ Array<OpenStruct>
List all of the stacks in CloudFormation.
61 62 63 |
# File 'lib/aws_cft_tools/client/cft.rb', line 61 def all_stacks @all_stacks ||= AWSEnumerator.new(aws_client, :describe_stacks, &method(:map_stacks)).to_a end |
#exports ⇒ Array<Aws::CloudFormation::Types::Export>
Lists all exports from stacks in CloudFormation.
38 39 40 |
# File 'lib/aws_cft_tools/client/cft.rb', line 38 def exports @exports ||= AWSEnumerator.new(aws_client, :list_exports, {}, &:exports).to_a end |
#stacks ⇒ Array<OpenStruct>
Lists all of the stacks in CloudFormation that are specific to the selected environment.
47 48 49 50 51 52 53 54 |
# File 'lib/aws_cft_tools/client/cft.rb', line 47 def stacks @stacks ||= all_stacks.select do |stack| = stack. satisfies_environment() && satisfies_role() && () end end |