Class: AWSCDK::Autoscaling::NotificationConfiguration
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::NotificationConfiguration
- 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
-
#scaling_events ⇒ AWSCDK::Autoscaling::ScalingEvents?
readonly
Which fleet scaling events triggers a notification.
-
#topic ⇒ AWSCDK::SNS::ITopic
readonly
SNS topic to send notifications about fleet scaling events.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(topic:, scaling_events: nil) ⇒ NotificationConfiguration
constructor
A new instance of NotificationConfiguration.
- #to_jsii ⇒ Object
Constructor Details
#initialize(topic:, scaling_events: nil) ⇒ NotificationConfiguration
Returns a new instance of NotificationConfiguration.
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_events ⇒ AWSCDK::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 |
#topic ⇒ AWSCDK::SNS::ITopic (readonly)
SNS topic to send notifications about fleet scaling events.
21 22 23 |
# File 'autoscaling/notification_configuration.rb', line 21 def topic @topic end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |