Class: AWS::AutoScaling::NotificationConfiguration
- Inherits:
-
Object
- Object
- AWS::AutoScaling::NotificationConfiguration
- Defined in:
- lib/aws/auto_scaling/notification_configuration.rb
Instance Attribute Summary collapse
- #group ⇒ Group (also: #auto_scaling_group) readonly
- #notification_types ⇒ Arra<String>
- #topic_arn ⇒ String readonly
Instance Method Summary collapse
-
#delete ⇒ nil
Deletes this Auto Scaling notification configuration.
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(auto_scaling_group, topic_arn, notification_types = []) ⇒ NotificationConfiguration
constructor
A new instance of NotificationConfiguration.
- #topic ⇒ SNS::Topic
Constructor Details
#initialize(auto_scaling_group, topic_arn, notification_types = []) ⇒ NotificationConfiguration
Returns a new instance of NotificationConfiguration.
19 20 21 22 23 |
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 19 def initialize auto_scaling_group, topic_arn, notification_types = [] @group = auto_scaling_group @topic_arn = topic_arn @notification_types = notification_types end |
Instance Attribute Details
#group ⇒ Group (readonly) Also known as: auto_scaling_group
26 27 28 |
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 26 def group @group end |
#notification_types ⇒ Arra<String>
34 35 36 |
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 34 def notification_types @notification_types end |
#topic_arn ⇒ String (readonly)
31 32 33 |
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 31 def topic_arn @topic_arn end |
Instance Method Details
#delete ⇒ nil
Deletes this Auto Scaling notification configuration.
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 65 def delete client_opts = {} client_opts[:auto_scaling_group_name] = group.name client_opts[:topic_arn] = topic_arn group.client.delete_notification_configuration(client_opts) nil end |
#eql?(other) ⇒ Boolean Also known as: ==
78 79 80 81 82 83 |
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 78 def eql? other other.is_a?(NotificationConfiguration) and other.group == group and other.topic_arn == topic_arn and other.notification_types == notification_types end |
#topic ⇒ SNS::Topic
37 38 39 |
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 37 def topic SNS::Topic.new(topic_arn, :config => group.config) end |