From 2cf23a543af1b940c94a2f76f8202f621a2de8be Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 27 Sep 2024 18:43:01 +0000 Subject: [PATCH] feat(client-sesv2): This release adds support for engagement tracking over Https using custom domains. --- .../commands/CreateConfigurationSetCommand.ts | 1 + .../commands/GetConfigurationSetCommand.ts | 1 + ...tConfigurationSetTrackingOptionsCommand.ts | 1 + ...ailIdentityDkimSigningAttributesCommand.ts | 2 +- clients/client-sesv2/src/models/models_0.ts | 96 ++++++------------- clients/client-sesv2/src/models/models_1.ts | 66 +++++++++++++ .../src/protocols/Aws_restJson1.ts | 1 + codegen/sdk-codegen/aws-models/sesv2.json | 35 +++++++ 8 files changed, 137 insertions(+), 66 deletions(-) diff --git a/clients/client-sesv2/src/commands/CreateConfigurationSetCommand.ts b/clients/client-sesv2/src/commands/CreateConfigurationSetCommand.ts index 629ad88ac886..597b98ba3f20 100644 --- a/clients/client-sesv2/src/commands/CreateConfigurationSetCommand.ts +++ b/clients/client-sesv2/src/commands/CreateConfigurationSetCommand.ts @@ -43,6 +43,7 @@ export interface CreateConfigurationSetCommandOutput extends CreateConfiguration * ConfigurationSetName: "STRING_VALUE", // required * TrackingOptions: { // TrackingOptions * CustomRedirectDomain: "STRING_VALUE", // required + * HttpsPolicy: "REQUIRE" || "REQUIRE_OPEN_ONLY" || "OPTIONAL", * }, * DeliveryOptions: { // DeliveryOptions * TlsPolicy: "REQUIRE" || "OPTIONAL", diff --git a/clients/client-sesv2/src/commands/GetConfigurationSetCommand.ts b/clients/client-sesv2/src/commands/GetConfigurationSetCommand.ts index 65966a7674dd..250c6037867b 100644 --- a/clients/client-sesv2/src/commands/GetConfigurationSetCommand.ts +++ b/clients/client-sesv2/src/commands/GetConfigurationSetCommand.ts @@ -51,6 +51,7 @@ export interface GetConfigurationSetCommandOutput extends GetConfigurationSetRes * // ConfigurationSetName: "STRING_VALUE", * // TrackingOptions: { // TrackingOptions * // CustomRedirectDomain: "STRING_VALUE", // required + * // HttpsPolicy: "REQUIRE" || "REQUIRE_OPEN_ONLY" || "OPTIONAL", * // }, * // DeliveryOptions: { // DeliveryOptions * // TlsPolicy: "REQUIRE" || "OPTIONAL", diff --git a/clients/client-sesv2/src/commands/PutConfigurationSetTrackingOptionsCommand.ts b/clients/client-sesv2/src/commands/PutConfigurationSetTrackingOptionsCommand.ts index 4382234f9384..7195eaece0cc 100644 --- a/clients/client-sesv2/src/commands/PutConfigurationSetTrackingOptionsCommand.ts +++ b/clients/client-sesv2/src/commands/PutConfigurationSetTrackingOptionsCommand.ts @@ -47,6 +47,7 @@ export interface PutConfigurationSetTrackingOptionsCommandOutput * const input = { // PutConfigurationSetTrackingOptionsRequest * ConfigurationSetName: "STRING_VALUE", // required * CustomRedirectDomain: "STRING_VALUE", + * HttpsPolicy: "REQUIRE" || "REQUIRE_OPEN_ONLY" || "OPTIONAL", * }; * const command = new PutConfigurationSetTrackingOptionsCommand(input); * const response = await client.send(command); diff --git a/clients/client-sesv2/src/commands/PutEmailIdentityDkimSigningAttributesCommand.ts b/clients/client-sesv2/src/commands/PutEmailIdentityDkimSigningAttributesCommand.ts index d971c90a4cdf..7c329e95b13e 100644 --- a/clients/client-sesv2/src/commands/PutEmailIdentityDkimSigningAttributesCommand.ts +++ b/clients/client-sesv2/src/commands/PutEmailIdentityDkimSigningAttributesCommand.ts @@ -8,8 +8,8 @@ import { commonParams } from "../endpoint/EndpointParameters"; import { PutEmailIdentityDkimSigningAttributesRequest, PutEmailIdentityDkimSigningAttributesRequestFilterSensitiveLog, - PutEmailIdentityDkimSigningAttributesResponse, } from "../models/models_0"; +import { PutEmailIdentityDkimSigningAttributesResponse } from "../models/models_1"; import { de_PutEmailIdentityDkimSigningAttributesCommand, se_PutEmailIdentityDkimSigningAttributesCommand, diff --git a/clients/client-sesv2/src/models/models_0.ts b/clients/client-sesv2/src/models/models_0.ts index 89f4a9babcfa..9a4e1b99efea 100644 --- a/clients/client-sesv2/src/models/models_0.ts +++ b/clients/client-sesv2/src/models/models_0.ts @@ -1493,6 +1493,21 @@ export interface Tag { Value: string | undefined; } +/** + * @public + * @enum + */ +export const HttpsPolicy = { + OPTIONAL: "OPTIONAL", + REQUIRE: "REQUIRE", + REQUIRE_OPEN_ONLY: "REQUIRE_OPEN_ONLY", +} as const; + +/** + * @public + */ +export type HttpsPolicy = (typeof HttpsPolicy)[keyof typeof HttpsPolicy]; + /** *

An object that defines the tracking options for a configuration set. When you use the * Amazon SES API v2 to send an email, it contains an invisible image that's used to track when @@ -1509,6 +1524,12 @@ export interface TrackingOptions { * @public */ CustomRedirectDomain: string | undefined; + + /** + *

The https policy to use for tracking open and click events.

+ * @public + */ + HttpsPolicy?: HttpsPolicy; } /** @@ -7127,6 +7148,16 @@ export interface PutConfigurationSetTrackingOptionsRequest { * @public */ CustomRedirectDomain?: string; + + /** + *

The https policy to use for tracking open and click events. If the value is OPTIONAL or HttpsPolicy is not + * specified, the open trackers use HTTP and click tracker use the original protocol of the link. + * If the value is REQUIRE, both open and click tracker uses HTTPS and if the value is REQUIRE_OPEN_ONLY + * open tracker uses HTTPS and link tracker is same as original protocol of the link. + *

+ * @public + */ + HttpsPolicy?: HttpsPolicy; } /** @@ -7367,71 +7398,6 @@ export interface PutEmailIdentityDkimSigningAttributesRequest { SigningAttributes?: DkimSigningAttributes; } -/** - *

If the action is successful, the service sends back an HTTP 200 response.

- *

The following data is returned in JSON format by the service.

- * @public - */ -export interface PutEmailIdentityDkimSigningAttributesResponse { - /** - *

The DKIM authentication status of the identity. Amazon SES determines the authentication - * status by searching for specific records in the DNS configuration for your domain. If - * you used Easy - * DKIM to set up DKIM authentication, Amazon SES tries to find three unique CNAME - * records in the DNS configuration for your domain.

- *

If you provided a public key to perform DKIM authentication, Amazon SES tries to find a TXT - * record that uses the selector that you specified. The value of the TXT record must be a - * public key that's paired with the private key that you specified in the process of - * creating the identity.

- *

The status can be one of the following:

- * - * @public - */ - DkimStatus?: DkimStatus; - - /** - *

If you used Easy DKIM to configure DKIM authentication for the domain, then this object - * contains a set of unique strings that you use to create a set of CNAME records that you - * add to the DNS configuration for your domain. When Amazon SES detects these records in the - * DNS configuration for your domain, the DKIM authentication process is complete.

- *

If you configured DKIM authentication for the domain by providing your own - * public-private key pair, then this object contains the selector that's associated with - * your public key.

- *

Regardless of the DKIM authentication method you use, Amazon SES searches for the - * appropriate records in the DNS configuration of the domain for up to 72 hours.

- * @public - */ - DkimTokens?: string[]; -} - /** * @internal */ diff --git a/clients/client-sesv2/src/models/models_1.ts b/clients/client-sesv2/src/models/models_1.ts index 9061f369c5d5..ba1248b4ae08 100644 --- a/clients/client-sesv2/src/models/models_1.ts +++ b/clients/client-sesv2/src/models/models_1.ts @@ -5,6 +5,7 @@ import { BulkEmailEntry, BulkEmailEntryResult, Destination, + DkimStatus, EmailContent, EmailTemplateContent, EventDestinationDefinition, @@ -16,6 +17,71 @@ import { TopicPreference, } from "./models_0"; +/** + *

If the action is successful, the service sends back an HTTP 200 response.

+ *

The following data is returned in JSON format by the service.

+ * @public + */ +export interface PutEmailIdentityDkimSigningAttributesResponse { + /** + *

The DKIM authentication status of the identity. Amazon SES determines the authentication + * status by searching for specific records in the DNS configuration for your domain. If + * you used Easy + * DKIM to set up DKIM authentication, Amazon SES tries to find three unique CNAME + * records in the DNS configuration for your domain.

+ *

If you provided a public key to perform DKIM authentication, Amazon SES tries to find a TXT + * record that uses the selector that you specified. The value of the TXT record must be a + * public key that's paired with the private key that you specified in the process of + * creating the identity.

+ *

The status can be one of the following:

+ * + * @public + */ + DkimStatus?: DkimStatus; + + /** + *

If you used Easy DKIM to configure DKIM authentication for the domain, then this object + * contains a set of unique strings that you use to create a set of CNAME records that you + * add to the DNS configuration for your domain. When Amazon SES detects these records in the + * DNS configuration for your domain, the DKIM authentication process is complete.

+ *

If you configured DKIM authentication for the domain by providing your own + * public-private key pair, then this object contains the selector that's associated with + * your public key.

+ *

Regardless of the DKIM authentication method you use, Amazon SES searches for the + * appropriate records in the DNS configuration of the domain for up to 72 hours.

+ * @public + */ + DkimTokens?: string[]; +} + /** *

A request to set the attributes that control how bounce and complaint events are * processed.

diff --git a/clients/client-sesv2/src/protocols/Aws_restJson1.ts b/clients/client-sesv2/src/protocols/Aws_restJson1.ts index 96d2ab5c459b..739864eaeb13 100644 --- a/clients/client-sesv2/src/protocols/Aws_restJson1.ts +++ b/clients/client-sesv2/src/protocols/Aws_restJson1.ts @@ -1762,6 +1762,7 @@ export const se_PutConfigurationSetTrackingOptionsCommand = async ( body = JSON.stringify( take(input, { CustomRedirectDomain: [], + HttpsPolicy: [], }) ); b.m("PUT").h(headers).b(body); diff --git a/codegen/sdk-codegen/aws-models/sesv2.json b/codegen/sdk-codegen/aws-models/sesv2.json index 31fa58294f28..fe5286d247ee 100644 --- a/codegen/sdk-codegen/aws-models/sesv2.json +++ b/codegen/sdk-codegen/aws-models/sesv2.json @@ -5696,6 +5696,32 @@ "smithy.api#documentation": "

An object containing additional settings for your VDM configuration as applicable to\n the Guardian.

" } }, + "com.amazonaws.sesv2#HttpsPolicy": { + "type": "enum", + "members": { + "REQUIRE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REQUIRE" + } + }, + "REQUIRE_OPEN_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REQUIRE_OPEN_ONLY" + } + }, + "OPTIONAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OPTIONAL" + } + } + }, + "traits": { + "smithy.api#documentation": "

The https policy to use for tracking open and click events. If the value is OPTIONAL or HttpsPolicy is not\n specified, the open trackers use HTTP and click tracker use the original protocol of the link.\n If the value is REQUIRE, both open and click tracker uses HTTPS and if the value is REQUIRE_OPEN_ONLY\n open tracker uses HTTPS and link tracker is same as original protocol of the link.\n

" + } + }, "com.amazonaws.sesv2#Identity": { "type": "string", "traits": { @@ -8693,6 +8719,9 @@ "traits": { "smithy.api#documentation": "

The domain to use to track open and click events.

" } + }, + "HttpsPolicy": { + "target": "com.amazonaws.sesv2#HttpsPolicy" } }, "traits": { @@ -11953,6 +11982,12 @@ "smithy.api#documentation": "

The domain to use for tracking open and click events.

", "smithy.api#required": {} } + }, + "HttpsPolicy": { + "target": "com.amazonaws.sesv2#HttpsPolicy", + "traits": { + "smithy.api#documentation": "

The https policy to use for tracking open and click events.

" + } } }, "traits": {