Class: AWS::AutoScaling::NotificationConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/auto_scaling/notification_configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#groupGroup (readonly) Also known as: auto_scaling_group

Returns:



26
27
28
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 26

def group
  @group
end

#notification_typesArra<String>

Returns:

  • (Arra<String>)


34
35
36
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 34

def notification_types
  @notification_types
end

#topic_arnString (readonly)

Returns:

  • (String)


31
32
33
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 31

def topic_arn
  @topic_arn
end

Instance Method Details

#deletenil

Deletes this Auto Scaling notification configuration.

Returns:

  • (nil)


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: ==

Returns:

  • (Boolean)


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

#topicSNS::Topic

Returns:



37
38
39
# File 'lib/aws/auto_scaling/notification_configuration.rb', line 37

def topic
  SNS::Topic.new(topic_arn, :config => group.config)
end