Resource: awsSesv2ConfigurationSetEventDestination
Terraform resource for managing an AWS SESv2 (Simple Email V2) Configuration Set Event Destination.
Example Usage
Cloud Watch Destination
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsSesv2ConfigurationSetExample =
new aws.sesv2ConfigurationSet.Sesv2ConfigurationSet(this, "example", {
configurationSetName: "example",
});
const awsSesv2ConfigurationSetEventDestinationExample =
new aws.sesv2ConfigurationSetEventDestination.Sesv2ConfigurationSetEventDestination(
this,
"example_1",
{
configurationSetName:
awsSesv2ConfigurationSetExample.configurationSetName,
eventDestination: {
cloudWatchDestination: {
dimensionConfiguration: [
{
defaultDimensionValue: "example",
dimensionName: "example",
dimensionValueSource: "MESSAGE_TAG",
},
],
},
enabled: true,
matchingEventTypes: ["SEND"],
},
eventDestinationName: "example",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSesv2ConfigurationSetEventDestinationExample.overrideLogicalId("example");
Kinesis Firehose Destination
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsSesv2ConfigurationSetExample =
new aws.sesv2ConfigurationSet.Sesv2ConfigurationSet(this, "example", {
configurationSetName: "example",
});
const awsSesv2ConfigurationSetEventDestinationExample =
new aws.sesv2ConfigurationSetEventDestination.Sesv2ConfigurationSetEventDestination(
this,
"example_1",
{
configurationSetName:
awsSesv2ConfigurationSetExample.configurationSetName,
eventDestination: {
enabled: true,
kinesisFirehoseDestination: {
deliveryStreamArn:
"${aws_kinesis_firehose_delivery_stream.example.arn}",
iamRoleArn: "${aws_iam_role.example.arn}",
},
matchingEventTypes: ["SEND"],
},
eventDestinationName: "example",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSesv2ConfigurationSetEventDestinationExample.overrideLogicalId("example");
Pinpoint Destination
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsSesv2ConfigurationSetExample =
new aws.sesv2ConfigurationSet.Sesv2ConfigurationSet(this, "example", {
configurationSetName: "example",
});
const awsSesv2ConfigurationSetEventDestinationExample =
new aws.sesv2ConfigurationSetEventDestination.Sesv2ConfigurationSetEventDestination(
this,
"example_1",
{
configurationSetName:
awsSesv2ConfigurationSetExample.configurationSetName,
eventDestination: {
enabled: true,
matchingEventTypes: ["SEND"],
pinpointDestination: {
applicationArn: "${aws_pinpoint_app.example.arn}",
},
},
eventDestinationName: "example",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSesv2ConfigurationSetEventDestinationExample.overrideLogicalId("example");
SNS Destination
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsSesv2ConfigurationSetExample =
new aws.sesv2ConfigurationSet.Sesv2ConfigurationSet(this, "example", {
configurationSetName: "example",
});
const awsSesv2ConfigurationSetEventDestinationExample =
new aws.sesv2ConfigurationSetEventDestination.Sesv2ConfigurationSetEventDestination(
this,
"example_1",
{
configurationSetName:
awsSesv2ConfigurationSetExample.configurationSetName,
eventDestination: {
enabled: true,
matchingEventTypes: ["SEND"],
snsDestination: {
topicArn: "${aws_sns_topic.example.arn}",
},
},
eventDestinationName: "example",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSesv2ConfigurationSetEventDestinationExample.overrideLogicalId("example");
Argument Reference
The following arguments are required:
configurationSetName
- (Required) The name of the configuration set.eventDestination
- (Required) A name that identifies the event destination within the configuration set.eventDestinationName
- (Required) An object that defines the event destination. See event_destination below.
eventDestination
The following arguments are required:
matchingEventTypes
- (Required) - An array that specifies which events the Amazon SES API v2 should send to the destinations. Valid values:send
,reject
,bounce
,complaint
,delivery
,open
,click
,RENDERING_FAILURE
,DELIVERY_DELAY
,subscription
.
The following arguments are optional:
cloudWatchDestination
- (Optional) An object that defines an Amazon CloudWatch destination for email events. See cloud_watch_destination belowenabled
- (Optional) When the event destination is enabled, the specified event types are sent to the destinations. Default:false
.kinesisFirehoseDestination
- (Optional) An object that defines an Amazon Kinesis Data Firehose destination for email events. See kinesis_firehose_destination below.pinpointDestination
- (Optional) An object that defines an Amazon Pinpoint project destination for email events. See pinpoint_destination below.snsDestination
- (Optional) An object that defines an Amazon SNS destination for email events. See sns_destination below.
cloudWatchDestination
The following arguments are required:
dimensionConfiguration
- (Required) An array of objects that define the dimensions to use when you send email events to Amazon CloudWatch. See dimension_configuration below.
dimensionConfiguration
The following arguments are required:
defaultDimensionValue
- (Required) The default value of the dimension that is published to Amazon CloudWatch if you don't provide the value of the dimension when you send an email. (dimensionName
- (Required) The name of an Amazon CloudWatch dimension associated with an email sending metric.dimensionValueSource
- (Required) The location where the Amazon SES API v2 finds the value of a dimension to publish to Amazon CloudWatch. Valid values:MESSAGE_TAG
,EMAIL_HEADER
,LINK_TAG
.
kinesisFirehoseDestination
The following arguments are required:
deliveryStreamArn
- (Required) The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose stream that the Amazon SES API v2 sends email events to.iamRoleArn
- (Required) The Amazon Resource Name (ARN) of the IAM role that the Amazon SES API v2 uses to send email events to the Amazon Kinesis Data Firehose stream.
pinpointDestination
The following arguments are required:
pinpointApplicationArn
- (Required) The Amazon Resource Name (ARN) of the Amazon Pinpoint project to send email events to.
snsDestination
The following arguments are required:
topicArn
- (Required) The Amazon Resource Name (ARN) of the Amazon SNS topic to publish email events to.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- A pipe-delimited string combiningconfigurationSetName
andeventDestinationName
.
Import
SESv2 (Simple Email V2) Configuration Set Event Destination can be imported using the id
(configurationSetName|eventDestinationName
), e.g.,