Class: Chef::Handler::Sns
- Inherits:
-
Chef::Handler
- Object
- Chef::Handler
- Chef::Handler::Sns
- Includes:
- Config
- Defined in:
- lib/chef/handler/sns.rb,
lib/chef/handler/sns/config.rb,
lib/chef/handler/sns/version.rb,
lib/chef/handler/sns/config/ohai.rb
Overview
Chef Handler SNS main class.
A simple Chef report handler that reports status of a Chef run through [Amazon SNS](aws.amazon.com/sns/), [including IAM roles support](#usage-with-amazon-iam-roles).
Defined Under Namespace
Modules: Config
Constant Summary collapse
- VERSION =
chef-handler-sns Ruby Gem version.
'2.1.0'.freeze
Constants included from Config
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ Sns
constructor
Constructs a new ‘Sns` object.
-
#report ⇒ Object
Send a SNS report message.
Methods included from Config
#access_key, #body_template, #config_check, #config_from_ohai, #config_init, #filter_opsworks_activity, #message_structure, #region, #secret_key, #subject, #token, #topic_arn
Constructor Details
Instance Method Details
#report ⇒ Object
Send a SNS report message.
This is called by Chef internally.
133 134 135 136 137 138 139 140 141 142 |
# File 'lib/chef/handler/sns.rb', line 133 def report config_check(node) return unless allow_publish(node) sns.publish( topic_arn: topic_arn, message: sns_body, subject: sns_subject, message_structure: ) end |