Sha256: 6ffa9fea4f8a30528d839b6124e2f334374f7f27682272ed6a1b27ec32f3b23a

Contents?: true

Size: 629 Bytes

Versions: 26

Compression:

Stored size: 629 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[: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]
    ) if config.key?(:aws_region)
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
sensu-plugins-aws-10.0.3 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-10.0.2 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-10.0.1 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-10.0.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-9.0.1 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-9.0.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-8.3.1 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-8.3.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-8.2.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-8.1.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-8.0.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-7.1.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-7.0.1 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-7.0.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-6.3.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-6.2.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-6.1.1 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-6.1.0 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-6.0.1 lib/sensu-plugins-aws/common.rb
sensu-plugins-aws-6.0.0 lib/sensu-plugins-aws/common.rb