Skip to content

Commit

Permalink
feat(client-sesv2): This release adds support for engagement tracking…
Browse files Browse the repository at this point in the history
… over Https using custom domains.
  • Loading branch information
awstools committed Sep 27, 2024
1 parent 2953ff4 commit 2cf23a5
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
96 changes: 31 additions & 65 deletions clients/client-sesv2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];

/**
* <p>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
Expand All @@ -1509,6 +1524,12 @@ export interface TrackingOptions {
* @public
*/
CustomRedirectDomain: string | undefined;

/**
* <p>The https policy to use for tracking open and click events.</p>
* @public
*/
HttpsPolicy?: HttpsPolicy;
}

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

/**
* <p>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.
* </p>
* @public
*/
HttpsPolicy?: HttpsPolicy;
}

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

/**
* <p>If the action is successful, the service sends back an HTTP 200 response.</p>
* <p>The following data is returned in JSON format by the service.</p>
* @public
*/
export interface PutEmailIdentityDkimSigningAttributesResponse {
/**
* <p>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 <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Easy
* DKIM</a> to set up DKIM authentication, Amazon SES tries to find three unique CNAME
* records in the DNS configuration for your domain.</p>
* <p>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.</p>
* <p>The status can be one of the following:</p>
* <ul>
* <li>
* <p>
* <code>PENDING</code> – The verification process was initiated, but Amazon SES
* hasn't yet detected the DKIM records in the DNS configuration for the
* domain.</p>
* </li>
* <li>
* <p>
* <code>SUCCESS</code> – The verification process completed
* successfully.</p>
* </li>
* <li>
* <p>
* <code>FAILED</code> – The verification process failed. This typically
* occurs when Amazon SES fails to find the DKIM records in the DNS configuration of the
* domain.</p>
* </li>
* <li>
* <p>
* <code>TEMPORARY_FAILURE</code> – A temporary issue is preventing Amazon SES
* from determining the DKIM authentication status of the domain.</p>
* </li>
* <li>
* <p>
* <code>NOT_STARTED</code> – The DKIM verification process hasn't been
* initiated for the domain.</p>
* </li>
* </ul>
* @public
*/
DkimStatus?: DkimStatus;

/**
* <p>If you used <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Easy DKIM</a> 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.</p>
* <p>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.</p>
* <p>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.</p>
* @public
*/
DkimTokens?: string[];
}

/**
* @internal
*/
Expand Down
66 changes: 66 additions & 0 deletions clients/client-sesv2/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
BulkEmailEntry,
BulkEmailEntryResult,
Destination,
DkimStatus,
EmailContent,
EmailTemplateContent,
EventDestinationDefinition,
Expand All @@ -16,6 +17,71 @@ import {
TopicPreference,
} from "./models_0";

/**
* <p>If the action is successful, the service sends back an HTTP 200 response.</p>
* <p>The following data is returned in JSON format by the service.</p>
* @public
*/
export interface PutEmailIdentityDkimSigningAttributesResponse {
/**
* <p>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 <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Easy
* DKIM</a> to set up DKIM authentication, Amazon SES tries to find three unique CNAME
* records in the DNS configuration for your domain.</p>
* <p>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.</p>
* <p>The status can be one of the following:</p>
* <ul>
* <li>
* <p>
* <code>PENDING</code> – The verification process was initiated, but Amazon SES
* hasn't yet detected the DKIM records in the DNS configuration for the
* domain.</p>
* </li>
* <li>
* <p>
* <code>SUCCESS</code> – The verification process completed
* successfully.</p>
* </li>
* <li>
* <p>
* <code>FAILED</code> – The verification process failed. This typically
* occurs when Amazon SES fails to find the DKIM records in the DNS configuration of the
* domain.</p>
* </li>
* <li>
* <p>
* <code>TEMPORARY_FAILURE</code> – A temporary issue is preventing Amazon SES
* from determining the DKIM authentication status of the domain.</p>
* </li>
* <li>
* <p>
* <code>NOT_STARTED</code> – The DKIM verification process hasn't been
* initiated for the domain.</p>
* </li>
* </ul>
* @public
*/
DkimStatus?: DkimStatus;

/**
* <p>If you used <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Easy DKIM</a> 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.</p>
* <p>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.</p>
* <p>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.</p>
* @public
*/
DkimTokens?: string[];
}

/**
* <p>A request to set the attributes that control how bounce and complaint events are
* processed.</p>
Expand Down
1 change: 1 addition & 0 deletions clients/client-sesv2/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ export const se_PutConfigurationSetTrackingOptionsCommand = async (
body = JSON.stringify(
take(input, {
CustomRedirectDomain: [],
HttpsPolicy: [],
})
);
b.m("PUT").h(headers).b(body);
Expand Down
35 changes: 35 additions & 0 deletions codegen/sdk-codegen/aws-models/sesv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5696,6 +5696,32 @@
"smithy.api#documentation": "<p>An object containing additional settings for your VDM configuration as applicable to\n the Guardian.</p>"
}
},
"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": "<p>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 </p>"
}
},
"com.amazonaws.sesv2#Identity": {
"type": "string",
"traits": {
Expand Down Expand Up @@ -8693,6 +8719,9 @@
"traits": {
"smithy.api#documentation": "<p>The domain to use to track open and click events.</p>"
}
},
"HttpsPolicy": {
"target": "com.amazonaws.sesv2#HttpsPolicy"
}
},
"traits": {
Expand Down Expand Up @@ -11953,6 +11982,12 @@
"smithy.api#documentation": "<p>The domain to use for tracking open and click events.</p>",
"smithy.api#required": {}
}
},
"HttpsPolicy": {
"target": "com.amazonaws.sesv2#HttpsPolicy",
"traits": {
"smithy.api#documentation": "<p>The https policy to use for tracking open and click events.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 2cf23a5

Please sign in to comment.