Module: Common
- Included in:
- CloudwatchCommon
- Defined in:
- lib/sensu-plugins-aws/common.rb
Overview
DESCRIPTION:
Common helper methods
DEPENDENCIES:
gem: aws-sdk
gem: sensu-plugin
USAGE:
NOTES:
LICENSE:
Shane Starcher <[email protected]>
Released under the same terms as Sensu (the MIT license); see LICENSE
for details.
Instance Method Summary collapse
Instance Method Details
#aws_config ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/sensu-plugins-aws/common.rb', line 25 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 |
#initialize ⇒ Object
20 21 22 23 |
# File 'lib/sensu-plugins-aws/common.rb', line 20 def initialize super() aws_config end |