class AWS::AutoScaling::NotificationConfiguration
Attributes
auto_scaling_group[R]
@return [Group]
group[R]
@return [Group]
notification_types[R]
@return [Arra<String>]
topic_arn[R]
@return [String]
Public Class Methods
new(auto_scaling_group, topic_arn, notification_types = [])
click to toggle source
@api private
# 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
Public Instance Methods
delete()
click to toggle source
Deletes this Auto Scaling notification configuration. @return [nil]
# 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)
click to toggle source
@api private
# 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
Also aliased as: ==
notification_types=(*notification_types)
click to toggle source
Updates the notification configuration with a new list of types:
config = auto_scaling_group.notification_configurations.first config.notification_types = %w(autoscaling:EC2_INSTANCE_LAUNCH)
@return [nil]
# File lib/aws/auto_scaling/notification_configuration.rb, line 48 def notification_types= *notification_types client_opts = {} client_opts[:topic_arn] = topic_arn client_opts[:notification_types] = notification_types.flatten client_opts[:auto_scaling_group_name] = group.name group.client.put_notification_configuration(client_opts) @notification_types = notification_types.flatten nil end
topic()
click to toggle source
@return [SNS::Topic]
# File lib/aws/auto_scaling/notification_configuration.rb, line 37 def topic SNS::Topic.new(topic_arn, :config => group.config) end