Skip to content

Commit

Permalink
feat(client-sesv2): This release adds support for Amazon EventBridge …
Browse files Browse the repository at this point in the history
…as an email sending events destination.
  • Loading branch information
awstools committed Jun 12, 2024
1 parent b6bd981 commit 13844af
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ export interface CreateConfigurationSetEventDestinationCommandOutput
* <p>Create an event destination. <i>Events</i> include message sends,
* deliveries, opens, clicks, bounces, and complaints. <i>Event
* destinations</i> are places that you can send information about these events
* to. For example, you can send event data to Amazon SNS to receive notifications when you
* receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term
* storage.</p>
* to. For example, you can send event data to Amazon EventBridge and associate a rule to send the event
* to the specified target.</p>
* <p>A single configuration set can include more than one event destination.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down Expand Up @@ -74,6 +73,9 @@ export interface CreateConfigurationSetEventDestinationCommandOutput
* SnsDestination: { // SnsDestination
* TopicArn: "STRING_VALUE", // required
* },
* EventBridgeDestination: { // EventBridgeDestination
* EventBusArn: "STRING_VALUE", // required
* },
* PinpointDestination: { // PinpointDestination
* ApplicationArn: "STRING_VALUE",
* },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export interface DeleteConfigurationSetEventDestinationCommandOutput
* <p>
* <i>Events</i> include message sends, deliveries, opens, clicks, bounces,
* and complaints. <i>Event destinations</i> are places that you can send
* information about these events to. For example, you can send event data to Amazon SNS to
* receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to
* stream data to Amazon S3 for long-term storage.</p>
* information about these events to. For example, you can send event data to Amazon EventBridge and
* associate a rule to send the event to the specified target.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export interface GetConfigurationSetEventDestinationsCommandOutput
* <p>
* <i>Events</i> include message sends, deliveries, opens, clicks, bounces,
* and complaints. <i>Event destinations</i> are places that you can send
* information about these events to. For example, you can send event data to Amazon SNS to
* receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to
* stream data to Amazon S3 for long-term storage.</p>
* information about these events to. For example, you can send event data to Amazon EventBridge and
* associate a rule to send the event to the specified target.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -79,6 +78,9 @@ export interface GetConfigurationSetEventDestinationsCommandOutput
* // SnsDestination: { // SnsDestination
* // TopicArn: "STRING_VALUE", // required
* // },
* // EventBridgeDestination: { // EventBridgeDestination
* // EventBusArn: "STRING_VALUE", // required
* // },
* // PinpointDestination: { // PinpointDestination
* // ApplicationArn: "STRING_VALUE",
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { PutEmailIdentityFeedbackAttributesRequest } from "../models/models_0";
import { PutEmailIdentityFeedbackAttributesResponse } from "../models/models_1";
import {
PutEmailIdentityFeedbackAttributesRequest,
PutEmailIdentityFeedbackAttributesResponse,
} from "../models/models_1";
import {
de_PutEmailIdentityFeedbackAttributesCommand,
se_PutEmailIdentityFeedbackAttributesCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export interface UpdateConfigurationSetEventDestinationCommandOutput
* <p>
* <i>Events</i> include message sends, deliveries, opens, clicks, bounces,
* and complaints. <i>Event destinations</i> are places that you can send
* information about these events to. For example, you can send event data to Amazon SNS to
* receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to
* stream data to Amazon S3 for long-term storage.</p>
* information about these events to. For example, you can send event data to Amazon EventBridge and
* associate a rule to send the event to the specified target.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -74,6 +73,9 @@ export interface UpdateConfigurationSetEventDestinationCommandOutput
* SnsDestination: { // SnsDestination
* TopicArn: "STRING_VALUE", // required
* },
* EventBridgeDestination: { // EventBridgeDestination
* EventBusArn: "STRING_VALUE", // required
* },
* PinpointDestination: { // PinpointDestination
* ApplicationArn: "STRING_VALUE",
* },
Expand Down
59 changes: 30 additions & 29 deletions clients/client-sesv2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,19 @@ export class LimitExceededException extends __BaseException {
}
}

/**
* <p>An object that defines an Amazon EventBridge destination for email events. You can use Amazon EventBridge to
* send notifications when certain email events occur.</p>
* @public
*/
export interface EventBridgeDestination {
/**
* <p>The Amazon Resource Name (ARN) of the Amazon EventBridge bus to publish email events to. Only the default bus is supported. </p>
* @public
*/
EventBusArn: string | undefined;
}

/**
* <p>An object that defines an Amazon Kinesis Data Firehose destination for email events. You can use Amazon Kinesis Data Firehose to
* stream data to other services, such as Amazon S3 and Amazon Redshift.</p>
Expand Down Expand Up @@ -1745,7 +1758,7 @@ export interface PinpointDestination {

/**
* <p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to
* send notification when certain email events occur.</p>
* send notifications when certain email events occur.</p>
* @public
*/
export interface SnsDestination {
Expand Down Expand Up @@ -1798,11 +1811,18 @@ export interface EventDestinationDefinition {

/**
* <p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to
* send notification when certain email events occur.</p>
* send notifications when certain email events occur.</p>
* @public
*/
SnsDestination?: SnsDestination;

/**
* <p>An object that defines an Amazon EventBridge destination for email events. You can use Amazon EventBridge to
* send notifications when certain email events occur.</p>
* @public
*/
EventBridgeDestination?: EventBridgeDestination;

/**
* <p>An object that defines an Amazon Pinpoint project destination for email events. You can send
* email event data to a Amazon Pinpoint project to view metrics using the Transactional Messaging
Expand Down Expand Up @@ -4076,11 +4096,18 @@ export interface EventDestination {

/**
* <p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to
* send notification when certain email events occur.</p>
* send notifications when certain email events occur.</p>
* @public
*/
SnsDestination?: SnsDestination;

/**
* <p>An object that defines an Amazon EventBridge destination for email events. You can use Amazon EventBridge to
* send notifications when certain email events occur.</p>
* @public
*/
EventBridgeDestination?: EventBridgeDestination;

/**
* <p>An object that defines an Amazon Pinpoint project destination for email events. You can send
* email event data to a Amazon Pinpoint project to view metrics using the Transactional Messaging
Expand Down Expand Up @@ -7401,32 +7428,6 @@ export interface PutEmailIdentityDkimSigningAttributesResponse {
DkimTokens?: string[];
}

/**
* <p>A request to set the attributes that control how bounce and complaint events are
* processed.</p>
* @public
*/
export interface PutEmailIdentityFeedbackAttributesRequest {
/**
* <p>The email identity.</p>
* @public
*/
EmailIdentity: string | undefined;

/**
* <p>Sets the feedback forwarding configuration for the identity.</p>
* <p>If the value is <code>true</code>, you receive email notifications when bounce or
* complaint events occur. These notifications are sent to the address that you specified
* in the <code>Return-Path</code> header of the original email.</p>
* <p>You're required to have a method of tracking bounces and complaints. If you haven't
* set up another mechanism for receiving bounce or complaint notifications (for example,
* by setting up an event destination), you receive an email notification when these events
* occur (even if this setting is disabled).</p>
* @public
*/
EmailForwardingEnabled?: boolean;
}

/**
* @internal
*/
Expand Down
26 changes: 26 additions & 0 deletions clients/client-sesv2/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,32 @@ import {
TopicPreference,
} from "./models_0";

/**
* <p>A request to set the attributes that control how bounce and complaint events are
* processed.</p>
* @public
*/
export interface PutEmailIdentityFeedbackAttributesRequest {
/**
* <p>The email identity.</p>
* @public
*/
EmailIdentity: string | undefined;

/**
* <p>Sets the feedback forwarding configuration for the identity.</p>
* <p>If the value is <code>true</code>, you receive email notifications when bounce or
* complaint events occur. These notifications are sent to the address that you specified
* in the <code>Return-Path</code> header of the original email.</p>
* <p>You're required to have a method of tracking bounces and complaints. If you haven't
* set up another mechanism for receiving bounce or complaint notifications (for example,
* by setting up an event destination), you receive an email notification when these events
* occur (even if this setting is disabled).</p>
* @public
*/
EmailForwardingEnabled?: boolean;
}

/**
* <p>An HTTP 200 response if the request succeeds, or an error message if the request
* fails.</p>
Expand Down
5 changes: 5 additions & 0 deletions clients/client-sesv2/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ import {
EmailTemplateContent,
EmailTemplateMetadata,
EngagementEventType,
EventBridgeDestination,
EventDestinationDefinition,
EventType,
ExportDataSource,
Expand Down Expand Up @@ -4577,6 +4578,8 @@ const se_EmailContent = (input: EmailContent, context: __SerdeContext): any => {

// se_EmailTemplateContent omitted.

// se_EventBridgeDestination omitted.

// se_EventDestinationDefinition omitted.

// se_EventTypes omitted.
Expand Down Expand Up @@ -5026,6 +5029,8 @@ const de_EmailTemplateMetadataList = (output: any, context: __SerdeContext): Ema

// de_Esps omitted.

// de_EventBridgeDestination omitted.

// de_EventDestination omitted.

// de_EventDestinations omitted.
Expand Down
41 changes: 34 additions & 7 deletions codegen/sdk-codegen/aws-models/sesv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Create an event destination. <i>Events</i> include message sends,\n deliveries, opens, clicks, bounces, and complaints. <i>Event\n destinations</i> are places that you can send information about these events\n to. For example, you can send event data to Amazon SNS to receive notifications when you\n receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term\n storage.</p>\n <p>A single configuration set can include more than one event destination.</p>",
"smithy.api#documentation": "<p>Create an event destination. <i>Events</i> include message sends,\n deliveries, opens, clicks, bounces, and complaints. <i>Event\n destinations</i> are places that you can send information about these events\n to. For example, you can send event data to Amazon EventBridge and associate a rule to send the event\n to the specified target.</p>\n <p>A single configuration set can include more than one event destination.</p>",
"smithy.api#http": {
"method": "POST",
"uri": "/v2/email/configuration-sets/{ConfigurationSetName}/event-destinations",
Expand Down Expand Up @@ -2149,7 +2149,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Delete an event destination.</p>\n <p>\n <i>Events</i> include message sends, deliveries, opens, clicks, bounces,\n and complaints. <i>Event destinations</i> are places that you can send\n information about these events to. For example, you can send event data to Amazon SNS to\n receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to\n stream data to Amazon S3 for long-term storage.</p>",
"smithy.api#documentation": "<p>Delete an event destination.</p>\n <p>\n <i>Events</i> include message sends, deliveries, opens, clicks, bounces,\n and complaints. <i>Event destinations</i> are places that you can send\n information about these events to. For example, you can send event data to Amazon EventBridge and\n associate a rule to send the event to the specified target.</p>",
"smithy.api#http": {
"method": "DELETE",
"uri": "/v2/email/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}",
Expand Down Expand Up @@ -3483,6 +3483,21 @@
"target": "com.amazonaws.sesv2#Esp"
}
},
"com.amazonaws.sesv2#EventBridgeDestination": {
"type": "structure",
"members": {
"EventBusArn": {
"target": "com.amazonaws.sesv2#AmazonResourceName",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the Amazon EventBridge bus to publish email events to. Only the default bus is supported. </p>",
"smithy.api#required": {}
}
}
},
"traits": {
"smithy.api#documentation": "<p>An object that defines an Amazon EventBridge destination for email events. You can use Amazon EventBridge to\n send notifications when certain email events occur.</p>"
}
},
"com.amazonaws.sesv2#EventDestination": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -3522,7 +3537,13 @@
"SnsDestination": {
"target": "com.amazonaws.sesv2#SnsDestination",
"traits": {
"smithy.api#documentation": "<p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to\n send notification when certain email events occur.</p>"
"smithy.api#documentation": "<p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to\n send notifications when certain email events occur.</p>"
}
},
"EventBridgeDestination": {
"target": "com.amazonaws.sesv2#EventBridgeDestination",
"traits": {
"smithy.api#documentation": "<p>An object that defines an Amazon EventBridge destination for email events. You can use Amazon EventBridge to\n send notifications when certain email events occur.</p>"
}
},
"PinpointDestination": {
Expand Down Expand Up @@ -3567,7 +3588,13 @@
"SnsDestination": {
"target": "com.amazonaws.sesv2#SnsDestination",
"traits": {
"smithy.api#documentation": "<p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to\n send notification when certain email events occur.</p>"
"smithy.api#documentation": "<p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to\n send notifications when certain email events occur.</p>"
}
},
"EventBridgeDestination": {
"target": "com.amazonaws.sesv2#EventBridgeDestination",
"traits": {
"smithy.api#documentation": "<p>An object that defines an Amazon EventBridge destination for email events. You can use Amazon EventBridge to\n send notifications when certain email events occur.</p>"
}
},
"PinpointDestination": {
Expand Down Expand Up @@ -4122,7 +4149,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Retrieve a list of event destinations that are associated with a configuration\n set.</p>\n <p>\n <i>Events</i> include message sends, deliveries, opens, clicks, bounces,\n and complaints. <i>Event destinations</i> are places that you can send\n information about these events to. For example, you can send event data to Amazon SNS to\n receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to\n stream data to Amazon S3 for long-term storage.</p>",
"smithy.api#documentation": "<p>Retrieve a list of event destinations that are associated with a configuration\n set.</p>\n <p>\n <i>Events</i> include message sends, deliveries, opens, clicks, bounces,\n and complaints. <i>Event destinations</i> are places that you can send\n information about these events to. For example, you can send event data to Amazon EventBridge and\n associate a rule to send the event to the specified target.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/v2/email/configuration-sets/{ConfigurationSetName}/event-destinations",
Expand Down Expand Up @@ -11369,7 +11396,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to\n send notification when certain email events occur.</p>"
"smithy.api#documentation": "<p>An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to\n send notifications when certain email events occur.</p>"
}
},
"com.amazonaws.sesv2#Subject": {
Expand Down Expand Up @@ -12021,7 +12048,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Update the configuration of an event destination for a configuration set.</p>\n <p>\n <i>Events</i> include message sends, deliveries, opens, clicks, bounces,\n and complaints. <i>Event destinations</i> are places that you can send\n information about these events to. For example, you can send event data to Amazon SNS to\n receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to\n stream data to Amazon S3 for long-term storage.</p>",
"smithy.api#documentation": "<p>Update the configuration of an event destination for a configuration set.</p>\n <p>\n <i>Events</i> include message sends, deliveries, opens, clicks, bounces,\n and complaints. <i>Event destinations</i> are places that you can send\n information about these events to. For example, you can send event data to Amazon EventBridge and\n associate a rule to send the event to the specified target.</p>",
"smithy.api#http": {
"method": "PUT",
"uri": "/v2/email/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}",
Expand Down

0 comments on commit 13844af

Please sign in to comment.