aws.dms.EventSubscription
Explore with Pulumi AI
Provides a DMS (Data Migration Service) event subscription resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.dms.EventSubscription("example", {
enabled: true,
eventCategories: [
"creation",
"failure",
],
name: "my-favorite-event-subscription",
snsTopicArn: exampleAwsSnsTopic.arn,
sourceIds: [exampleAwsDmsReplicationTask.replicationTaskId],
sourceType: "replication-task",
tags: {
Name: "example",
},
});
import pulumi
import pulumi_aws as aws
example = aws.dms.EventSubscription("example",
enabled=True,
event_categories=[
"creation",
"failure",
],
name="my-favorite-event-subscription",
sns_topic_arn=example_aws_sns_topic["arn"],
source_ids=[example_aws_dms_replication_task["replicationTaskId"]],
source_type="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"),
},
Name: pulumi.String("my-favorite-event-subscription"),
SnsTopicArn: pulumi.Any(exampleAwsSnsTopic.Arn),
SourceIds: pulumi.StringArray{
exampleAwsDmsReplicationTask.ReplicationTaskId,
},
SourceType: pulumi.String("replication-task"),
Tags: pulumi.StringMap{
"Name": pulumi.String("example"),
},
})
if err != nil {
return err
}
return nil
})
}
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",
},
Name = "my-favorite-event-subscription",
SnsTopicArn = exampleAwsSnsTopic.Arn,
SourceIds = new[]
{
exampleAwsDmsReplicationTask.ReplicationTaskId,
},
SourceType = "replication-task",
Tags =
{
{ "Name", "example" },
},
});
});
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")
.name("my-favorite-event-subscription")
.snsTopicArn(exampleAwsSnsTopic.arn())
.sourceIds(exampleAwsDmsReplicationTask.replicationTaskId())
.sourceType("replication-task")
.tags(Map.of("Name", "example"))
.build());
}
}
resources:
example:
type: aws:dms:EventSubscription
properties:
enabled: true
eventCategories:
- creation
- failure
name: my-favorite-event-subscription
snsTopicArn: ${exampleAwsSnsTopic.arn}
sourceIds:
- ${exampleAwsDmsReplicationTask.replicationTaskId}
sourceType: replication-task
tags:
Name: example
Create EventSubscription Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EventSubscription(name: string, args: EventSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def EventSubscription(resource_name: str,
args: EventSubscriptionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EventSubscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
event_categories: Optional[Sequence[str]] = None,
sns_topic_arn: Optional[str] = None,
source_type: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
source_ids: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var eventSubscriptionResource = new Aws.Dms.EventSubscription("eventSubscriptionResource", new()
{
EventCategories = new[]
{
"string",
},
SnsTopicArn = "string",
SourceType = "string",
Enabled = false,
Name = "string",
SourceIds = new[]
{
"string",
},
Tags =
{
{ "string", "string" },
},
});
example, err := dms.NewEventSubscription(ctx, "eventSubscriptionResource", &dms.EventSubscriptionArgs{
EventCategories: pulumi.StringArray{
pulumi.String("string"),
},
SnsTopicArn: pulumi.String("string"),
SourceType: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
SourceIds: pulumi.StringArray{
pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var eventSubscriptionResource = new EventSubscription("eventSubscriptionResource", EventSubscriptionArgs.builder()
.eventCategories("string")
.snsTopicArn("string")
.sourceType("string")
.enabled(false)
.name("string")
.sourceIds("string")
.tags(Map.of("string", "string"))
.build());
event_subscription_resource = aws.dms.EventSubscription("eventSubscriptionResource",
event_categories=["string"],
sns_topic_arn="string",
source_type="string",
enabled=False,
name="string",
source_ids=["string"],
tags={
"string": "string",
})
const eventSubscriptionResource = new aws.dms.EventSubscription("eventSubscriptionResource", {
eventCategories: ["string"],
snsTopicArn: "string",
sourceType: "string",
enabled: false,
name: "string",
sourceIds: ["string"],
tags: {
string: "string",
},
});
type: aws:dms:EventSubscription
properties:
enabled: false
eventCategories:
- string
name: string
snsTopicArn: string
sourceIds:
- string
sourceType: string
tags:
string: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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.
- Source
Type string - Type of source for events. Valid values:
replication-instance
orreplication-task
- 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. If you don't specify a value, notifications are provided for all sources.
- 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.
- Source
Type string - Type of source for events. Valid values:
replication-instance
orreplication-task
- Enabled bool
- Whether the event subscription should be enabled.
- Name string
- Name of event subscription.
- Source
Ids []string - Ids of sources to listen to. If you don't specify a value, notifications are provided for all sources.
- 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.
- source
Type String - Type of source for events. Valid values:
replication-instance
orreplication-task
- 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. If you don't specify a value, notifications are provided for all sources.
- 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.
- source
Type string - Type of source for events. Valid values:
replication-instance
orreplication-task
- enabled boolean
- Whether the event subscription should be enabled.
- name string
- Name of event subscription.
- source
Ids string[] - Ids of sources to listen to. If you don't specify a value, notifications are provided for all sources.
- {[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.
- source_
type str - Type of source for events. Valid values:
replication-instance
orreplication-task
- 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. If you don't specify a value, notifications are provided for all sources.
- 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.
- source
Type String - Type of source for events. Valid values:
replication-instance
orreplication-task
- 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. If you don't specify a value, notifications are provided for all sources.
- 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:
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. If you don't specify a value, notifications are provided for all sources.
- 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.
- 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. If you don't specify a value, notifications are provided for all sources.
- 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.
- 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. If you don't specify a value, notifications are provided for all sources.
- 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.
- 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. If you don't specify a value, notifications are provided for all sources.
- 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.
- 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. If you don't specify a value, notifications are provided for all sources.
- 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.
- 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. If you don't specify a value, notifications are provided for all sources.
- 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.
Import
Using pulumi import
, import event subscriptions using the name
. For example:
$ pulumi import aws:dms/eventSubscription:EventSubscription test my-awesome-event-subscription
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.