putNotificationConfiguration

Configures an Auto Scaling group to send notifications when specified events take place. Subscribers to the specified topic can have messages delivered to an endpoint such as a web server or an email address.

This configuration overwrites any existing configuration.

For more information, see Amazon SNS notification options for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

If you exceed your maximum limit of SNS topics, which is 10 per Auto Scaling group, the call fails.

Samples


fun main() { 
   //sampleStart 
   // This example adds the specified notification to the specified Auto Scaling group.
autoScalingClient.putNotificationConfiguration {
    autoScalingGroupName = "my-auto-scaling-group"
    topicArn = "arn:aws:sns:us-west-2:123456789012:my-sns-topic"
    notificationTypes = listOf<String>(
        "autoscaling:TEST_NOTIFICATION"
    )
} 
   //sampleEnd
}