Class: AwsCftTools::Client::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_cft_tools/client/base.rb

Overview

CloudFormation Client

All of the business logic behind direct interaction with the AWS API for CloudFormation templates and stacks.

Direct Known Subclasses

CFT, EC2, Templates

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.

Parameters:

  • options (Hash) (defaults to: {})

    client configuration

Options Hash (options):

  • :environment (String)

    the operational environment in which to act

  • :profile (String)

    the AWS credential profile to use

  • :region (String)

    the AWS region in which to act



21
22
23
# File 'lib/aws_cft_tools/client/base.rb', line 21

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



12
13
14
# File 'lib/aws_cft_tools/client/base.rb', line 12

def options
  @options
end

Class Method Details

.aws_client_classObject



37
# File 'lib/aws_cft_tools/client/base.rb', line 37

def self.aws_client_class; end

Instance Method Details

#aws_clientObject

The AWS SDK client object for this part of the AwsCftTools client



27
28
29
30
31
32
33
34
35
# File 'lib/aws_cft_tools/client/base.rb', line 27

def aws_client
  @aws_client ||= begin
    klass = self.class.aws_client_class
    klass && klass.new(
      region: options[:region],
      profile: options[:profile]
    )
  end
end