Try AWS Native preview for resources not in the classic version.
aws.dms.EventSubscription
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a DMS (Data Migration Service) event subscription resource.
Example Usage
using System.Collections.Generic;
using System.Linq;
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/v6/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:
- Event
Categories List<string> List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- Sns
Topic stringArn SNS topic arn to send events on.
- Enabled bool
Whether the event subscription should be enabled.
- Name string
Name of event subscription.
- Source
Ids List<string> Ids of sources to listen to.
- Source
Type string Type of source for events. Valid values:
replication-instance
orreplication-task
- 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.
- Event
Categories []string List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- Sns
Topic stringArn SNS topic arn to send events on.
- Enabled bool
Whether the event subscription should be enabled.
- Name string
Name of event subscription.
- Source
Ids []string Ids of sources to listen to.
- Source
Type string Type of source for events. Valid values:
replication-instance
orreplication-task
- 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.
- event
Categories List<String> List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- sns
Topic StringArn SNS topic arn to send events on.
- enabled Boolean
Whether the event subscription should be enabled.
- name String
Name of event subscription.
- source
Ids List<String> Ids of sources to listen to.
- source
Type String Type of source for events. Valid values:
replication-instance
orreplication-task
- 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.
- event
Categories string[] List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- sns
Topic stringArn SNS topic arn to send events on.
- enabled boolean
Whether the event subscription should be enabled.
- name string
Name of event subscription.
- source
Ids string[] Ids of sources to listen to.
- source
Type string Type of source for events. Valid values:
replication-instance
orreplication-task
- {[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_ strarn 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
orreplication-task
- 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.
- event
Categories List<String> List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- sns
Topic StringArn SNS topic arn to send events on.
- enabled Boolean
Whether the event subscription should be enabled.
- name String
Name of event subscription.
- source
Ids List<String> Ids of sources to listen to.
- source
Type String Type of source for events. Valid values:
replication-instance
orreplication-task
- 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.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
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.
- Arn string
Amazon Resource Name (ARN) of the DMS Event Subscription.
- Enabled bool
Whether the event subscription should be enabled.
- Event
Categories List<string> List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- Name string
Name of event subscription.
- Sns
Topic stringArn SNS topic arn to send events on.
- Source
Ids List<string> Ids of sources to listen to.
- Source
Type string Type of source for events. Valid values:
replication-instance
orreplication-task
- 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.- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- Arn string
Amazon Resource Name (ARN) of the DMS Event Subscription.
- Enabled bool
Whether the event subscription should be enabled.
- Event
Categories []string List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- Name string
Name of event subscription.
- Sns
Topic stringArn SNS topic arn to send events on.
- Source
Ids []string Ids of sources to listen to.
- Source
Type string Type of source for events. Valid values:
replication-instance
orreplication-task
- 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.- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn String
Amazon Resource Name (ARN) of the DMS Event Subscription.
- enabled Boolean
Whether the event subscription should be enabled.
- event
Categories List<String> List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- name String
Name of event subscription.
- sns
Topic StringArn SNS topic arn to send events on.
- source
Ids List<String> Ids of sources to listen to.
- source
Type String Type of source for events. Valid values:
replication-instance
orreplication-task
- 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.- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn string
Amazon Resource Name (ARN) of the DMS Event Subscription.
- enabled boolean
Whether the event subscription should be enabled.
- event
Categories string[] List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- name string
Name of event subscription.
- sns
Topic stringArn SNS topic arn to send events on.
- source
Ids string[] Ids of sources to listen to.
- source
Type string Type of source for events. Valid values:
replication-instance
orreplication-task
- {[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.- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- 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_ strarn 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
orreplication-task
- 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.- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn String
Amazon Resource Name (ARN) of the DMS Event Subscription.
- enabled Boolean
Whether the event subscription should be enabled.
- event
Categories List<String> List of event categories to listen for, see
DescribeEventCategories
for a canonical list.- name String
Name of event subscription.
- sns
Topic StringArn SNS topic arn to send events on.
- source
Ids List<String> Ids of sources to listen to.
- source
Type String Type of source for events. Valid values:
replication-instance
orreplication-task
- 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.- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
Import
Using pulumi import
, import event subscriptions using the name
. For example:
$ 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.
Try AWS Native preview for resources not in the classic version.