NotificationArgs

data class NotificationArgs(val groupNames: Output<List<String>>? = null, val notifications: Output<List<String>>? = null, val topicArn: Output<String>? = null) : ConvertibleToJava<NotificationArgs>

Provides an AutoScaling Group with Notification support, via SNS Topics. Each of the notifications map to a Notification Configuration inside Amazon Web Services, and are applied to each AutoScaling Group you supply.

Example Usage

Basic usage:

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.Notification;
import com.pulumi.aws.autoscaling.NotificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Topic("example");
var bar = new Group("bar");
var foo = new Group("foo");
var exampleNotifications = new Notification("exampleNotifications", NotificationArgs.builder()
.groupNames(
bar.name(),
foo.name())
.notifications(
"autoscaling:EC2_INSTANCE_LAUNCH",
"autoscaling:EC2_INSTANCE_TERMINATE",
"autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
"autoscaling:EC2_INSTANCE_TERMINATE_ERROR")
.topicArn(example.arn())
.build());
}
}

Constructors

Link copied to clipboard
constructor(groupNames: Output<List<String>>? = null, notifications: Output<List<String>>? = null, topicArn: Output<String>? = null)

Properties

Link copied to clipboard
val groupNames: Output<List<String>>? = null

List of AutoScaling Group Names

Link copied to clipboard
val notifications: Output<List<String>>? = null

List of Notification Types that trigger notifications. Acceptable values are documented in the AWS documentation here

Link copied to clipboard
val topicArn: Output<String>? = null

Topic ARN for notifications to be sent through

Functions

Link copied to clipboard
open override fun toJava(): NotificationArgs