Sha256: 0490b7fab13e12a1aa0bb98ef9618604904fa3bb91d02a0a983aba0d4c7f38b4

Contents?: true

Size: 618 Bytes

Versions: 7

Compression:

Stored size: 618 Bytes

Contents

#
# DESCRIPTION:
#   Common helper methods
#
# DEPENDENCIES:
#   gem: aws-sdk
#   gem: sensu-plugin
#
# USAGE:
#
# NOTES:
#
# LICENSE:
#   Shane Starcher <shane.starcher@gmail.com>
#   Released under the same terms as Sensu (the MIT license); see LICENSE
#   for details.
#

module Common
  def initialize
    super()
    aws_config
  end

  def aws_config
    Aws.config.update(
      credentials: Aws::Credentials.new(config[:aws_access_key], config[:aws_secret_access_key])
    ) if config[:aws_access_key] && config[:aws_secret_access_key]

    Aws.config.update(
      region: config[:aws_region]
    )
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sensu-plugins-aws-2.1.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-2.0.1 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-2.0.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-1.2.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-1.1.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-1.0.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-0.0.4 lib/sensu-plugins-aws/common.rb