Skip to content

Commit 976549d

Browse files
author
awstools
committed
feat(client-sesv2): This release allows subscribers to enable Dedicated IPs (managed) to send email via a fully managed dedicated IP experience. It also adds identities' VerificationStatus in the response of GetEmailIdentity and ListEmailIdentities APIs, and ImportJobs counts in the response of ListImportJobs API.
1 parent 0acd4a7 commit 976549d

File tree

94 files changed

+4211
-683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+4211
-683
lines changed

clients/client-sesv2/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@aws-sdk/hash-node": "*",
2727
"@aws-sdk/invalid-dependency": "*",
2828
"@aws-sdk/middleware-content-length": "*",
29+
"@aws-sdk/middleware-endpoint": "*",
2930
"@aws-sdk/middleware-host-header": "*",
3031
"@aws-sdk/middleware-logger": "*",
3132
"@aws-sdk/middleware-recursion-detection": "*",

clients/client-sesv2/src/SESv2.ts

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ import {
138138
GetDedicatedIpCommandInput,
139139
GetDedicatedIpCommandOutput,
140140
} from "./commands/GetDedicatedIpCommand";
141+
import {
142+
GetDedicatedIpPoolCommand,
143+
GetDedicatedIpPoolCommandInput,
144+
GetDedicatedIpPoolCommandOutput,
145+
} from "./commands/GetDedicatedIpPoolCommand";
141146
import {
142147
GetDedicatedIpsCommand,
143148
GetDedicatedIpsCommandInput,
@@ -546,7 +551,8 @@ export class SESv2 extends SESv2Client {
546551

547552
/**
548553
* <p>Creates a new custom verification email template.</p>
549-
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-verify-address-custom.html">Using Custom Verification Email Templates</a> in the <i>Amazon SES Developer
554+
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using
555+
* custom verification email templates</a> in the <i>Amazon SES Developer
550556
* Guide</i>.</p>
551557
* <p>You can execute this operation no more than once per second.</p>
552558
*/
@@ -964,7 +970,8 @@ export class SESv2 extends SESv2Client {
964970

965971
/**
966972
* <p>Deletes an existing custom verification email template.</p>
967-
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-verify-address-custom.html">Using Custom Verification Email Templates</a> in the <i>Amazon SES Developer
973+
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using
974+
* custom verification email templates</a> in the <i>Amazon SES Developer
968975
* Guide</i>.</p>
969976
* <p>You can execute this operation no more than once per second.</p>
970977
*/
@@ -1373,7 +1380,8 @@ export class SESv2 extends SESv2Client {
13731380
/**
13741381
* <p>Returns the custom email verification template for the template name you
13751382
* specify.</p>
1376-
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-verify-address-custom.html">Using Custom Verification Email Templates</a> in the <i>Amazon SES Developer
1383+
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using
1384+
* custom verification email templates</a> in the <i>Amazon SES Developer
13771385
* Guide</i>.</p>
13781386
* <p>You can execute this operation no more than once per second.</p>
13791387
*/
@@ -1440,6 +1448,38 @@ export class SESv2 extends SESv2Client {
14401448
}
14411449
}
14421450

1451+
/**
1452+
* <p>Retrieve information about the dedicated pool.</p>
1453+
*/
1454+
public getDedicatedIpPool(
1455+
args: GetDedicatedIpPoolCommandInput,
1456+
options?: __HttpHandlerOptions
1457+
): Promise<GetDedicatedIpPoolCommandOutput>;
1458+
public getDedicatedIpPool(
1459+
args: GetDedicatedIpPoolCommandInput,
1460+
cb: (err: any, data?: GetDedicatedIpPoolCommandOutput) => void
1461+
): void;
1462+
public getDedicatedIpPool(
1463+
args: GetDedicatedIpPoolCommandInput,
1464+
options: __HttpHandlerOptions,
1465+
cb: (err: any, data?: GetDedicatedIpPoolCommandOutput) => void
1466+
): void;
1467+
public getDedicatedIpPool(
1468+
args: GetDedicatedIpPoolCommandInput,
1469+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDedicatedIpPoolCommandOutput) => void),
1470+
cb?: (err: any, data?: GetDedicatedIpPoolCommandOutput) => void
1471+
): Promise<GetDedicatedIpPoolCommandOutput> | void {
1472+
const command = new GetDedicatedIpPoolCommand(args);
1473+
if (typeof optionsOrCb === "function") {
1474+
this.send(command, optionsOrCb);
1475+
} else if (typeof cb === "function") {
1476+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1477+
this.send(command, optionsOrCb || {}, cb);
1478+
} else {
1479+
return this.send(command, optionsOrCb);
1480+
}
1481+
}
1482+
14431483
/**
14441484
* <p>List the dedicated IP addresses that are associated with your Amazon Web Services
14451485
* account.</p>
@@ -1886,8 +1926,9 @@ export class SESv2 extends SESv2Client {
18861926

18871927
/**
18881928
* <p>Lists the existing custom verification email templates for your account in the current
1889-
* Amazon Web Services Region.</p>
1890-
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-verify-address-custom.html">Using Custom Verification Email Templates</a> in the <i>Amazon SES Developer
1929+
* Amazon Web Services Region.</p>
1930+
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using
1931+
* custom verification email templates</a> in the <i>Amazon SES Developer
18911932
* Guide</i>.</p>
18921933
* <p>You can execute this operation no more than once per second.</p>
18931934
*/
@@ -2862,11 +2903,12 @@ export class SESv2 extends SESv2Client {
28622903

28632904
/**
28642905
* <p>Adds an email address to the list of identities for your Amazon SES account in the current
2865-
* Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a
2866-
* customized verification email is sent to the specified address.</p>
2906+
* Amazon Web Services Region and attempts to verify it. As a result of executing this
2907+
* operation, a customized verification email is sent to the specified address.</p>
28672908
* <p>To use this operation, you must first create a custom verification email template. For
28682909
* more information about creating and using custom verification email templates, see
2869-
* <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-verify-address-custom.html">Using Custom Verification Email Templates</a> in the <i>Amazon SES Developer
2910+
* <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using
2911+
* custom verification email templates</a> in the <i>Amazon SES Developer
28702912
* Guide</i>.</p>
28712913
* <p>You can execute this operation no more than once per second.</p>
28722914
*/
@@ -3157,7 +3199,8 @@ export class SESv2 extends SESv2Client {
31573199

31583200
/**
31593201
* <p>Updates an existing custom verification email template.</p>
3160-
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-verify-address-custom.html">Using Custom Verification Email Templates</a> in the <i>Amazon SES Developer
3202+
* <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using
3203+
* custom verification email templates</a> in the <i>Amazon SES Developer
31613204
* Guide</i>.</p>
31623205
* <p>You can execute this operation no more than once per second.</p>
31633206
*/

clients/client-sesv2/src/SESv2Client.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
// smithy-typescript generated code
2-
import {
3-
EndpointsInputConfig,
4-
EndpointsResolvedConfig,
5-
RegionInputConfig,
6-
RegionResolvedConfig,
7-
resolveEndpointsConfig,
8-
resolveRegionConfig,
9-
} from "@aws-sdk/config-resolver";
2+
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@aws-sdk/config-resolver";
103
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4+
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@aws-sdk/middleware-endpoint";
115
import {
126
getHostHeaderPlugin,
137
HostHeaderInputConfig,
@@ -41,13 +35,13 @@ import {
4135
Credentials as __Credentials,
4236
Decoder as __Decoder,
4337
Encoder as __Encoder,
38+
EndpointV2 as __EndpointV2,
4439
Hash as __Hash,
4540
HashConstructor as __HashConstructor,
4641
HttpHandlerOptions as __HttpHandlerOptions,
4742
Logger as __Logger,
4843
Provider as __Provider,
4944
Provider,
50-
RegionInfoProvider,
5145
StreamCollector as __StreamCollector,
5246
UrlParser as __UrlParser,
5347
UserAgent as __UserAgent,
@@ -142,6 +136,7 @@ import {
142136
GetCustomVerificationEmailTemplateCommandOutput,
143137
} from "./commands/GetCustomVerificationEmailTemplateCommand";
144138
import { GetDedicatedIpCommandInput, GetDedicatedIpCommandOutput } from "./commands/GetDedicatedIpCommand";
139+
import { GetDedicatedIpPoolCommandInput, GetDedicatedIpPoolCommandOutput } from "./commands/GetDedicatedIpPoolCommand";
145140
import { GetDedicatedIpsCommandInput, GetDedicatedIpsCommandOutput } from "./commands/GetDedicatedIpsCommand";
146141
import {
147142
GetDeliverabilityDashboardOptionsCommandInput,
@@ -305,6 +300,12 @@ import {
305300
UpdateEmailTemplateCommandInput,
306301
UpdateEmailTemplateCommandOutput,
307302
} from "./commands/UpdateEmailTemplateCommand";
303+
import {
304+
ClientInputEndpointParameters,
305+
ClientResolvedEndpointParameters,
306+
EndpointParameters,
307+
resolveClientEndpointParameters,
308+
} from "./endpoint/EndpointParameters";
308309
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
309310

310311
export type ServiceInputTypes =
@@ -337,6 +338,7 @@ export type ServiceInputTypes =
337338
| GetContactListCommandInput
338339
| GetCustomVerificationEmailTemplateCommandInput
339340
| GetDedicatedIpCommandInput
341+
| GetDedicatedIpPoolCommandInput
340342
| GetDedicatedIpsCommandInput
341343
| GetDeliverabilityDashboardOptionsCommandInput
342344
| GetDeliverabilityTestReportCommandInput
@@ -420,6 +422,7 @@ export type ServiceOutputTypes =
420422
| GetContactListCommandOutput
421423
| GetCustomVerificationEmailTemplateCommandOutput
422424
| GetDedicatedIpCommandOutput
425+
| GetDedicatedIpPoolCommandOutput
423426
| GetDedicatedIpsCommandOutput
424427
| GetDeliverabilityDashboardOptionsCommandOutput
425428
| GetDeliverabilityTestReportCommandOutput
@@ -582,12 +585,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
582585
*/
583586
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
584587

585-
/**
586-
* Fetch related hostname, signing name or signing region with given region.
587-
* @internal
588-
*/
589-
regionInfoProvider?: RegionInfoProvider;
590-
591588
/**
592589
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
593590
* @internal
@@ -603,11 +600,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
603600
type SESv2ClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
604601
ClientDefaults &
605602
RegionInputConfig &
606-
EndpointsInputConfig &
603+
EndpointInputConfig<EndpointParameters> &
607604
RetryInputConfig &
608605
HostHeaderInputConfig &
609606
AwsAuthInputConfig &
610-
UserAgentInputConfig;
607+
UserAgentInputConfig &
608+
ClientInputEndpointParameters;
611609
/**
612610
* The configuration interface of SESv2Client class constructor that set the region, credentials and other options.
613611
*/
@@ -616,11 +614,12 @@ export interface SESv2ClientConfig extends SESv2ClientConfigType {}
616614
type SESv2ClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
617615
Required<ClientDefaults> &
618616
RegionResolvedConfig &
619-
EndpointsResolvedConfig &
617+
EndpointResolvedConfig<EndpointParameters> &
620618
RetryResolvedConfig &
621619
HostHeaderResolvedConfig &
622620
AwsAuthResolvedConfig &
623-
UserAgentResolvedConfig;
621+
UserAgentResolvedConfig &
622+
ClientResolvedEndpointParameters;
624623
/**
625624
* The resolved configuration interface of SESv2Client class. This is resolved and normalized from the {@link SESv2ClientConfig | constructor configuration interface}.
626625
*/
@@ -649,14 +648,15 @@ export class SESv2Client extends __Client<
649648

650649
constructor(configuration: SESv2ClientConfig) {
651650
const _config_0 = __getRuntimeConfig(configuration);
652-
const _config_1 = resolveRegionConfig(_config_0);
653-
const _config_2 = resolveEndpointsConfig(_config_1);
654-
const _config_3 = resolveRetryConfig(_config_2);
655-
const _config_4 = resolveHostHeaderConfig(_config_3);
656-
const _config_5 = resolveAwsAuthConfig(_config_4);
657-
const _config_6 = resolveUserAgentConfig(_config_5);
658-
super(_config_6);
659-
this.config = _config_6;
651+
const _config_1 = resolveClientEndpointParameters(_config_0);
652+
const _config_2 = resolveRegionConfig(_config_1);
653+
const _config_3 = resolveEndpointConfig(_config_2);
654+
const _config_4 = resolveRetryConfig(_config_3);
655+
const _config_5 = resolveHostHeaderConfig(_config_4);
656+
const _config_6 = resolveAwsAuthConfig(_config_5);
657+
const _config_7 = resolveUserAgentConfig(_config_6);
658+
super(_config_7);
659+
this.config = _config_7;
660660
this.middlewareStack.use(getRetryPlugin(this.config));
661661
this.middlewareStack.use(getContentLengthPlugin(this.config));
662662
this.middlewareStack.use(getHostHeaderPlugin(this.config));

clients/client-sesv2/src/commands/CreateConfigurationSetCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -56,6 +57,15 @@ export class CreateConfigurationSetCommand extends $Command<
5657
// Start section: command_properties
5758
// End section: command_properties
5859

60+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
61+
return {
62+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
63+
Endpoint: { type: "builtInParams", name: "Endpoint" },
64+
Region: { type: "builtInParams", name: "region" },
65+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
66+
};
67+
}
68+
5969
constructor(readonly input: CreateConfigurationSetCommandInput) {
6070
// Start section: command_constructor
6171
super();
@@ -71,6 +81,9 @@ export class CreateConfigurationSetCommand extends $Command<
7181
options?: __HttpHandlerOptions
7282
): Handler<CreateConfigurationSetCommandInput, CreateConfigurationSetCommandOutput> {
7383
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
84+
this.middlewareStack.use(
85+
getEndpointPlugin(configuration, CreateConfigurationSetCommand.getEndpointParameterInstructions())
86+
);
7487

7588
const stack = clientStack.concat(this.middlewareStack);
7689

clients/client-sesv2/src/commands/CreateConfigurationSetEventDestinationCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -61,6 +62,15 @@ export class CreateConfigurationSetEventDestinationCommand extends $Command<
6162
// Start section: command_properties
6263
// End section: command_properties
6364

65+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
66+
return {
67+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
68+
Endpoint: { type: "builtInParams", name: "Endpoint" },
69+
Region: { type: "builtInParams", name: "region" },
70+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
71+
};
72+
}
73+
6474
constructor(readonly input: CreateConfigurationSetEventDestinationCommandInput) {
6575
// Start section: command_constructor
6676
super();
@@ -76,6 +86,9 @@ export class CreateConfigurationSetEventDestinationCommand extends $Command<
7686
options?: __HttpHandlerOptions
7787
): Handler<CreateConfigurationSetEventDestinationCommandInput, CreateConfigurationSetEventDestinationCommandOutput> {
7888
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
89+
this.middlewareStack.use(
90+
getEndpointPlugin(configuration, CreateConfigurationSetEventDestinationCommand.getEndpointParameterInstructions())
91+
);
7992

8093
const stack = clientStack.concat(this.middlewareStack);
8194

clients/client-sesv2/src/commands/CreateContactCommand.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -53,6 +54,15 @@ export class CreateContactCommand extends $Command<
5354
// Start section: command_properties
5455
// End section: command_properties
5556

57+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
58+
return {
59+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
60+
Endpoint: { type: "builtInParams", name: "Endpoint" },
61+
Region: { type: "builtInParams", name: "region" },
62+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
63+
};
64+
}
65+
5666
constructor(readonly input: CreateContactCommandInput) {
5767
// Start section: command_constructor
5868
super();
@@ -68,6 +78,7 @@ export class CreateContactCommand extends $Command<
6878
options?: __HttpHandlerOptions
6979
): Handler<CreateContactCommandInput, CreateContactCommandOutput> {
7080
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
81+
this.middlewareStack.use(getEndpointPlugin(configuration, CreateContactCommand.getEndpointParameterInstructions()));
7182

7283
const stack = clientStack.concat(this.middlewareStack);
7384

clients/client-sesv2/src/commands/CreateContactListCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -52,6 +53,15 @@ export class CreateContactListCommand extends $Command<
5253
// Start section: command_properties
5354
// End section: command_properties
5455

56+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
57+
return {
58+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
59+
Endpoint: { type: "builtInParams", name: "Endpoint" },
60+
Region: { type: "builtInParams", name: "region" },
61+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
62+
};
63+
}
64+
5565
constructor(readonly input: CreateContactListCommandInput) {
5666
// Start section: command_constructor
5767
super();
@@ -67,6 +77,9 @@ export class CreateContactListCommand extends $Command<
6777
options?: __HttpHandlerOptions
6878
): Handler<CreateContactListCommandInput, CreateContactListCommandOutput> {
6979
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
80+
this.middlewareStack.use(
81+
getEndpointPlugin(configuration, CreateContactListCommand.getEndpointParameterInstructions())
82+
);
7083

7184
const stack = clientStack.concat(this.middlewareStack);
7285

0 commit comments

Comments
 (0)