Sha256: 4eb535fa46c5494a8618e8cdf7f27d5d50d24fc7b3f8bda674e42bb95afd4717

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

module AwsCftTools
  class Client
    ##
    # = CloudFormation Client
    #
    # All of the business logic behind direct interaction with the AWS API for CloudFormation templates
    # and stacks.
    #
    class Base
      attr_reader :options

      ##
      #
      # @param options [Hash] client configuration
      # @option options [String] :environment the operational environment in which to act
      # @option options [String] :profile the AWS credential profile to use
      # @option options [String] :region the AWS region in which to act
      #
      def initialize(options = {})
        @options = options
      end

      ##
      # The AWS SDK client object for this part of the AwsCftTools client
      def aws_client
        @aws_client ||= begin
          klass = self.class.aws_client_class
          klass && klass.new(
            region: options[:region],
            profile: options[:profile]
          )
        end
      end

      def self.aws_client_class; end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aws-cft-tools-0.1.4 lib/aws_cft_tools/client/base.rb
aws-cft-tools-0.1.3 lib/aws_cft_tools/client/base.rb
aws-cft-tools-0.1.2 lib/aws_cft_tools/client/base.rb
aws-cft-tools-0.1.1 lib/aws_cft_tools/client/base.rb
aws-cft-tools-0.1.0 lib/aws_cft_tools/client/base.rb