Class Notification
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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Sns.Topic("example", new Aws.Sns.TopicArgs
{
});
var bar = new Aws.AutoScaling.Group("bar", new Aws.AutoScaling.GroupArgs
{
});
var foo = new Aws.AutoScaling.Group("foo", new Aws.AutoScaling.GroupArgs
{
});
var exampleNotifications = new Aws.AutoScaling.Notification("exampleNotifications", new Aws.AutoScaling.NotificationArgs
{
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,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.AutoScaling
Assembly: Pulumi.Aws.dll
Syntax
public class Notification : CustomResource
Constructors
View SourceNotification(String, NotificationArgs, CustomResourceOptions)
Create a Notification resource with the given unique name, arguments, and options.
Declaration
public Notification(string name, NotificationArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NotificationArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceGroupNames
A list of AutoScaling Group Names
Declaration
public Output<ImmutableArray<string>> GroupNames { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Notifications
A list of Notification Types that trigger notifications. Acceptable values are documented in the AWS documentation here
Declaration
public Output<ImmutableArray<string>> Notifications { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
TopicArn
The Topic ARN for notifications to be sent through
Declaration
public Output<string> TopicArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, NotificationState, CustomResourceOptions)
Get an existing Notification resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Notification Get(string name, Input<string> id, NotificationState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NotificationState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Notification |