Class: AWSCDK::Autoscaling::CfnAutoScalingGroup::NotificationConfigurationProperty

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

Overview

A structure that specifies an Amazon SNS notification configuration for the NotificationConfigurations property of the AWS::AutoScaling::AutoScalingGroup resource.

For an example template snippet, see Configure Amazon EC2 Auto Scaling resources .

For more information, see Get Amazon SNS notifications when your Auto Scaling group scales in the Amazon EC2 Auto Scaling User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic_arn:, notification_types: nil) ⇒ NotificationConfigurationProperty

Returns a new instance of NotificationConfigurationProperty.

Parameters:

  • topic_arn (String)

    The Amazon Resource Name (ARN) of the Amazon SNS topic.

  • notification_types (Array<String>, nil) (defaults to: nil)

    A list of event types that send a notification. Event types can include any of the following types.



2658
2659
2660
2661
2662
2663
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2658

def initialize(topic_arn:, notification_types: nil)
  @topic_arn = topic_arn
  Jsii::Type.check_type(@topic_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicArn")
  @notification_types = notification_types
  Jsii::Type.check_type(@notification_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notificationTypes") unless @notification_types.nil?
end

Instance Attribute Details

#notification_typesArray<String>? (readonly)

A list of event types that send a notification. Event types can include any of the following types.

Allowed values :

  • autoscaling:EC2_INSTANCE_LAUNCH
  • autoscaling:EC2_INSTANCE_LAUNCH_ERROR
  • autoscaling:EC2_INSTANCE_TERMINATE
  • autoscaling:EC2_INSTANCE_TERMINATE_ERROR
  • autoscaling:TEST_NOTIFICATION


2682
2683
2684
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2682

def notification_types
  @notification_types
end

#topic_arnString (readonly)

The Amazon Resource Name (ARN) of the Amazon SNS topic.



2669
2670
2671
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2669

def topic_arn
  @topic_arn
end

Class Method Details

.jsii_propertiesObject



2684
2685
2686
2687
2688
2689
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2684

def self.jsii_properties
  {
    :topic_arn => "topicArn",
    :notification_types => "notificationTypes",
  }
end

Instance Method Details

#to_jsiiObject



2691
2692
2693
2694
2695
2696
2697
2698
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2691

def to_jsii
  result = {}
  result.merge!({
    "topicArn" => @topic_arn,
    "notificationTypes" => @notification_types,
  })
  result.compact
end