NotificationConfiguration Struct
AutoScalingGroup fleet change notifications configurations.
You can configure AutoScaling to send an SNS notification whenever your Auto Scaling group scales.
| Source | aws-autoscaling/lib/auto-scaling-group.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
import { aws_sns as sns } from 'aws-cdk-lib';
declare const scalingEvents: autoscaling.ScalingEvents;
declare const topic: sns.Topic;
const notificationConfiguration: autoscaling.NotificationConfiguration = {
topic: topic,
// the properties below are optional
scalingEvents: scalingEvents,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_autoscaling as autoscaling
from aws_cdk import aws_sns as sns
# scaling_events: autoscaling.ScalingEvents
# topic: sns.Topic
notification_configuration = autoscaling.NotificationConfiguration(
topic=topic,
# the properties below are optional
scaling_events=scaling_events
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.autoscaling.*;
import software.amazon.awscdk.services.sns.*;
ScalingEvents scalingEvents;
Topic topic;
NotificationConfiguration notificationConfiguration = NotificationConfiguration.builder()
.topic(topic)
// the properties below are optional
.scalingEvents(scalingEvents)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.AWS.SNS;
ScalingEvents scalingEvents;
Topic topic;
var notificationConfiguration = new NotificationConfiguration {
Topic = topic,
// the properties below are optional
ScalingEvents = scalingEvents
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var scalingEvents ScalingEvents
var topic Topic
notificationConfiguration := &NotificationConfiguration{
Topic: topic,
// the properties below are optional
ScalingEvents: scalingEvents,
}
Properties
scalingEventsoptionalScalingEventsscaling_eventsoptionalScalingEventsscalingEventsoptionalScalingEventsScalingEventsoptionalScalingEventsScalingEventsoptionalScalingEvents = ScalingEvents.ALL #Which fleet scaling events triggers a notification.