aws logo
AWS Classic v5.33.0, Mar 24 23

aws.dms.EventSubscription

Provides a DMS (Data Migration Service) event subscription resource.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Dms.EventSubscription("example", new()
    {
        Enabled = true,
        EventCategories = new[]
        {
            "creation",
            "failure",
        },
        SnsTopicArn = aws_sns_topic.Example.Arn,
        SourceIds = new[]
        {
            aws_dms_replication_task.Example.Replication_task_id,
        },
        SourceType = "replication-task",
        Tags = 
        {
            { "Name", "example" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/dms"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dms.NewEventSubscription(ctx, "example", &dms.EventSubscriptionArgs{
			Enabled: pulumi.Bool(true),
			EventCategories: pulumi.StringArray{
				pulumi.String("creation"),
				pulumi.String("failure"),
			},
			SnsTopicArn: pulumi.Any(aws_sns_topic.Example.Arn),
			SourceIds: pulumi.StringArray{
				aws_dms_replication_task.Example.Replication_task_id,
			},
			SourceType: pulumi.String("replication-task"),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("example"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dms.EventSubscription;
import com.pulumi.aws.dms.EventSubscriptionArgs;
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 EventSubscription("example", EventSubscriptionArgs.builder()        
            .enabled(true)
            .eventCategories(            
                "creation",
                "failure")
            .snsTopicArn(aws_sns_topic.example().arn())
            .sourceIds(aws_dms_replication_task.example().replication_task_id())
            .sourceType("replication-task")
            .tags(Map.of("Name", "example"))
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.dms.EventSubscription("example",
    enabled=True,
    event_categories=[
        "creation",
        "failure",
    ],
    sns_topic_arn=aws_sns_topic["example"]["arn"],
    source_ids=[aws_dms_replication_task["example"]["replication_task_id"]],
    source_type="replication-task",
    tags={
        "Name": "example",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.dms.EventSubscription("example", {
    enabled: true,
    eventCategories: [
        "creation",
        "failure",
    ],
    snsTopicArn: aws_sns_topic.example.arn,
    sourceIds: [aws_dms_replication_task.example.replication_task_id],
    sourceType: "replication-task",
    tags: {
        Name: "example",
    },
});
resources:
  example:
    type: aws:dms:EventSubscription
    properties:
      enabled: true
      eventCategories:
        - creation
        - failure
      snsTopicArn: ${aws_sns_topic.example.arn}
      sourceIds:
        - ${aws_dms_replication_task.example.replication_task_id}
      sourceType: replication-task
      tags:
        Name: example

Create EventSubscription Resource

new EventSubscription(name: string, args: EventSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def EventSubscription(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      enabled: Optional[bool] = None,
                      event_categories: Optional[Sequence[str]] = None,
                      name: Optional[str] = None,
                      sns_topic_arn: Optional[str] = None,
                      source_ids: Optional[Sequence[str]] = None,
                      source_type: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None)
@overload
def EventSubscription(resource_name: str,
                      args: EventSubscriptionArgs,
                      opts: Optional[ResourceOptions] = None)
func NewEventSubscription(ctx *Context, name string, args EventSubscriptionArgs, opts ...ResourceOption) (*EventSubscription, error)
public EventSubscription(string name, EventSubscriptionArgs args, CustomResourceOptions? opts = null)
public EventSubscription(String name, EventSubscriptionArgs args)
public EventSubscription(String name, EventSubscriptionArgs args, CustomResourceOptions options)
type: aws:dms:EventSubscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EventSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args EventSubscriptionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EventSubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EventSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EventSubscriptionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

EventSubscription Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The EventSubscription resource accepts the following input properties:

EventCategories List<string>

List of event categories to listen for, see DescribeEventCategories for a canonical list.

SnsTopicArn string

SNS topic arn to send events on.

Enabled bool

Whether the event subscription should be enabled.

Name string

Name of event subscription.

SourceIds List<string>

Ids of sources to listen to.

SourceType string

Type of source for events. Valid values: replication-instance or replication-task

Tags Dictionary<string, string>

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

EventCategories []string

List of event categories to listen for, see DescribeEventCategories for a canonical list.

SnsTopicArn string

SNS topic arn to send events on.

Enabled bool

Whether the event subscription should be enabled.

Name string

Name of event subscription.

SourceIds []string

Ids of sources to listen to.

SourceType string

Type of source for events. Valid values: replication-instance or replication-task

Tags map[string]string

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

eventCategories List<String>

List of event categories to listen for, see DescribeEventCategories for a canonical list.

snsTopicArn String

SNS topic arn to send events on.

enabled Boolean

Whether the event subscription should be enabled.

name String

Name of event subscription.

sourceIds List<String>

Ids of sources to listen to.

sourceType String

Type of source for events. Valid values: replication-instance or replication-task

tags Map<String,String>

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

eventCategories string[]

List of event categories to listen for, see DescribeEventCategories for a canonical list.

snsTopicArn string

SNS topic arn to send events on.

enabled boolean

Whether the event subscription should be enabled.

name string

Name of event subscription.

sourceIds string[]

Ids of sources to listen to.

sourceType string

Type of source for events. Valid values: replication-instance or replication-task

tags {[key: string]: string}

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

event_categories Sequence[str]

List of event categories to listen for, see DescribeEventCategories for a canonical list.

sns_topic_arn str

SNS topic arn to send events on.

enabled bool

Whether the event subscription should be enabled.

name str

Name of event subscription.

source_ids Sequence[str]

Ids of sources to listen to.

source_type str

Type of source for events. Valid values: replication-instance or replication-task

tags Mapping[str, str]

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

eventCategories List<String>

List of event categories to listen for, see DescribeEventCategories for a canonical list.

snsTopicArn String

SNS topic arn to send events on.

enabled Boolean

Whether the event subscription should be enabled.

name String

Name of event subscription.

sourceIds List<String>

Ids of sources to listen to.

sourceType String

Type of source for events. Valid values: replication-instance or replication-task

tags Map<String>

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

All input properties are implicitly available as output properties. Additionally, the EventSubscription resource produces the following output properties:

Arn string

Amazon Resource Name (ARN) of the DMS Event Subscription.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

Amazon Resource Name (ARN) of the DMS Event Subscription.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

Amazon Resource Name (ARN) of the DMS Event Subscription.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

Amazon Resource Name (ARN) of the DMS Event Subscription.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

Amazon Resource Name (ARN) of the DMS Event Subscription.

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

Amazon Resource Name (ARN) of the DMS Event Subscription.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up Existing EventSubscription Resource

Get an existing EventSubscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EventSubscriptionState, opts?: CustomResourceOptions): EventSubscription
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        enabled: Optional[bool] = None,
        event_categories: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        sns_topic_arn: Optional[str] = None,
        source_ids: Optional[Sequence[str]] = None,
        source_type: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> EventSubscription
func GetEventSubscription(ctx *Context, name string, id IDInput, state *EventSubscriptionState, opts ...ResourceOption) (*EventSubscription, error)
public static EventSubscription Get(string name, Input<string> id, EventSubscriptionState? state, CustomResourceOptions? opts = null)
public static EventSubscription get(String name, Output<String> id, EventSubscriptionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string

Amazon Resource Name (ARN) of the DMS Event Subscription.

Enabled bool

Whether the event subscription should be enabled.

EventCategories List<string>

List of event categories to listen for, see DescribeEventCategories for a canonical list.

Name string

Name of event subscription.

SnsTopicArn string

SNS topic arn to send events on.

SourceIds List<string>

Ids of sources to listen to.

SourceType string

Type of source for events. Valid values: replication-instance or replication-task

Tags Dictionary<string, string>

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

Amazon Resource Name (ARN) of the DMS Event Subscription.

Enabled bool

Whether the event subscription should be enabled.

EventCategories []string

List of event categories to listen for, see DescribeEventCategories for a canonical list.

Name string

Name of event subscription.

SnsTopicArn string

SNS topic arn to send events on.

SourceIds []string

Ids of sources to listen to.

SourceType string

Type of source for events. Valid values: replication-instance or replication-task

Tags map[string]string

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

Amazon Resource Name (ARN) of the DMS Event Subscription.

enabled Boolean

Whether the event subscription should be enabled.

eventCategories List<String>

List of event categories to listen for, see DescribeEventCategories for a canonical list.

name String

Name of event subscription.

snsTopicArn String

SNS topic arn to send events on.

sourceIds List<String>

Ids of sources to listen to.

sourceType String

Type of source for events. Valid values: replication-instance or replication-task

tags Map<String,String>

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

Amazon Resource Name (ARN) of the DMS Event Subscription.

enabled boolean

Whether the event subscription should be enabled.

eventCategories string[]

List of event categories to listen for, see DescribeEventCategories for a canonical list.

name string

Name of event subscription.

snsTopicArn string

SNS topic arn to send events on.

sourceIds string[]

Ids of sources to listen to.

sourceType string

Type of source for events. Valid values: replication-instance or replication-task

tags {[key: string]: string}

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

Amazon Resource Name (ARN) of the DMS Event Subscription.

enabled bool

Whether the event subscription should be enabled.

event_categories Sequence[str]

List of event categories to listen for, see DescribeEventCategories for a canonical list.

name str

Name of event subscription.

sns_topic_arn str

SNS topic arn to send events on.

source_ids Sequence[str]

Ids of sources to listen to.

source_type str

Type of source for events. Valid values: replication-instance or replication-task

tags Mapping[str, str]

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

Amazon Resource Name (ARN) of the DMS Event Subscription.

enabled Boolean

Whether the event subscription should be enabled.

eventCategories List<String>

List of event categories to listen for, see DescribeEventCategories for a canonical list.

name String

Name of event subscription.

snsTopicArn String

SNS topic arn to send events on.

sourceIds List<String>

Ids of sources to listen to.

sourceType String

Type of source for events. Valid values: replication-instance or replication-task

tags Map<String>

Map of resource tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Import

Event subscriptions can be imported using the name, e.g.,

 $ pulumi import aws:dms/eventSubscription:EventSubscription test my-awesome-event-subscription

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.