Class: AWSCDK::Autoscaling::NotificationConfiguration

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
autoscaling/notification_configuration.rb

Overview

AutoScalingGroup fleet change notifications configurations.

You can configure AutoScaling to send an SNS notification whenever your Auto Scaling group scales.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic:, scaling_events: nil) ⇒ NotificationConfiguration

Returns a new instance of NotificationConfiguration.

Parameters:



11
12
13
14
15
16
# File 'autoscaling/notification_configuration.rb', line 11

def initialize(topic:, scaling_events: nil)
  @topic = topic
  Jsii::Type.check_type(@topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "topic")
  @scaling_events = scaling_events
  Jsii::Type.check_type(@scaling_events, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuU2NhbGluZ0V2ZW50cyJ9")), "scalingEvents") unless @scaling_events.nil?
end

Instance Attribute Details

#scaling_eventsAWSCDK::Autoscaling::ScalingEvents? (readonly)

Note:

Default: ScalingEvents.ALL

Which fleet scaling events triggers a notification.



26
27
28
# File 'autoscaling/notification_configuration.rb', line 26

def scaling_events
  @scaling_events
end

#topicAWSCDK::SNS::ITopic (readonly)

SNS topic to send notifications about fleet scaling events.

Returns:



21
22
23
# File 'autoscaling/notification_configuration.rb', line 21

def topic
  @topic
end

Class Method Details

.jsii_propertiesObject



28
29
30
31
32
33
# File 'autoscaling/notification_configuration.rb', line 28

def self.jsii_properties
  {
    :topic => "topic",
    :scaling_events => "scalingEvents",
  }
end

Instance Method Details

#to_jsiiObject



35
36
37
38
39
40
41
42
# File 'autoscaling/notification_configuration.rb', line 35

def to_jsii
  result = {}
  result.merge!({
    "topic" => @topic,
    "scalingEvents" => @scaling_events,
  })
  result.compact
end