@aws-sdk/client-sesv2 3.199.0 → 3.201.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +7 -7
- package/dist-cjs/SESv2.js +60 -0
- package/dist-cjs/commands/BatchGetMetricDataCommand.js +46 -0
- package/dist-cjs/commands/ListRecommendationsCommand.js +46 -0
- package/dist-cjs/commands/PutAccountVdmAttributesCommand.js +46 -0
- package/dist-cjs/commands/PutConfigurationSetVdmOptionsCommand.js +46 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/endpoint/EndpointParameters.js +2 -3
- package/dist-cjs/endpoint/ruleset.js +1 -1
- package/dist-cjs/models/models_0.js +173 -32
- package/dist-cjs/pagination/ListRecommendationsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +567 -97
- package/dist-cjs/runtimeConfig.browser.js +16 -16
- package/dist-cjs/runtimeConfig.js +20 -19
- package/dist-cjs/runtimeConfig.native.js +1 -2
- package/dist-cjs/runtimeConfig.shared.js +8 -11
- package/dist-es/SESv2.js +60 -0
- package/dist-es/commands/BatchGetMetricDataCommand.js +42 -0
- package/dist-es/commands/ListRecommendationsCommand.js +42 -0
- package/dist-es/commands/PutAccountVdmAttributesCommand.js +42 -0
- package/dist-es/commands/PutConfigurationSetVdmOptionsCommand.js +42 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/endpoint/ruleset.js +1 -1
- package/dist-es/models/models_0.js +146 -24
- package/dist-es/pagination/ListRecommendationsPaginator.js +32 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +467 -1
- package/dist-types/SESv2.d.ts +33 -0
- package/dist-types/SESv2Client.d.ts +6 -2
- package/dist-types/commands/BatchGetMetricDataCommand.d.ts +39 -0
- package/dist-types/commands/ListRecommendationsCommand.d.ts +38 -0
- package/dist-types/commands/PutAccountVdmAttributesCommand.d.ts +38 -0
- package/dist-types/commands/PutConfigurationSetVdmOptionsCommand.d.ts +38 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +552 -22
- package/dist-types/pagination/ListRecommendationsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +12 -0
- package/dist-types/ts3.4/SESv2.d.ts +68 -0
- package/dist-types/ts3.4/SESv2Client.d.ts +24 -0
- package/dist-types/ts3.4/commands/BatchGetMetricDataCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListRecommendationsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/PutAccountVdmAttributesCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/PutConfigurationSetVdmOptionsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +194 -12
- package/dist-types/ts3.4/pagination/ListRecommendationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
- package/package.json +33 -33
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
|
-
import { AccountSuspendedException, AlreadyExistsException, BadRequestException, ConcurrentModificationException, ConflictException, InvalidNextTokenException, LimitExceededException, MailFromDomainNotVerifiedException, MessageRejected, NotFoundException, SendingPausedException, TooManyRequestsException, } from "../models/models_0";
|
|
3
|
+
import { AccountSuspendedException, AlreadyExistsException, BadRequestException, ConcurrentModificationException, ConflictException, InternalServiceErrorException, InvalidNextTokenException, LimitExceededException, MailFromDomainNotVerifiedException, MessageRejected, NotFoundException, SendingPausedException, TooManyRequestsException, } from "../models/models_0";
|
|
4
4
|
import { SESv2ServiceException as __BaseException } from "../models/SESv2ServiceException";
|
|
5
|
+
export const serializeAws_restJson1BatchGetMetricDataCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/metrics/batch";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.Queries != null && { Queries: serializeAws_restJson1BatchGetMetricDataQueries(input.Queries, context) }),
|
|
14
|
+
});
|
|
15
|
+
return new __HttpRequest({
|
|
16
|
+
protocol,
|
|
17
|
+
hostname,
|
|
18
|
+
port,
|
|
19
|
+
method: "POST",
|
|
20
|
+
headers,
|
|
21
|
+
path: resolvedPath,
|
|
22
|
+
body,
|
|
23
|
+
});
|
|
24
|
+
};
|
|
5
25
|
export const serializeAws_restJson1CreateConfigurationSetCommand = async (input, context) => {
|
|
6
26
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
27
|
const headers = {
|
|
@@ -27,6 +47,7 @@ export const serializeAws_restJson1CreateConfigurationSetCommand = async (input,
|
|
|
27
47
|
...(input.TrackingOptions != null && {
|
|
28
48
|
TrackingOptions: serializeAws_restJson1TrackingOptions(input.TrackingOptions, context),
|
|
29
49
|
}),
|
|
50
|
+
...(input.VdmOptions != null && { VdmOptions: serializeAws_restJson1VdmOptions(input.VdmOptions, context) }),
|
|
30
51
|
});
|
|
31
52
|
return new __HttpRequest({
|
|
32
53
|
protocol,
|
|
@@ -1008,6 +1029,28 @@ export const serializeAws_restJson1ListImportJobsCommand = async (input, context
|
|
|
1008
1029
|
body,
|
|
1009
1030
|
});
|
|
1010
1031
|
};
|
|
1032
|
+
export const serializeAws_restJson1ListRecommendationsCommand = async (input, context) => {
|
|
1033
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1034
|
+
const headers = {
|
|
1035
|
+
"content-type": "application/json",
|
|
1036
|
+
};
|
|
1037
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/vdm/recommendations";
|
|
1038
|
+
let body;
|
|
1039
|
+
body = JSON.stringify({
|
|
1040
|
+
...(input.Filter != null && { Filter: serializeAws_restJson1ListRecommendationsFilter(input.Filter, context) }),
|
|
1041
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1042
|
+
...(input.PageSize != null && { PageSize: input.PageSize }),
|
|
1043
|
+
});
|
|
1044
|
+
return new __HttpRequest({
|
|
1045
|
+
protocol,
|
|
1046
|
+
hostname,
|
|
1047
|
+
port,
|
|
1048
|
+
method: "POST",
|
|
1049
|
+
headers,
|
|
1050
|
+
path: resolvedPath,
|
|
1051
|
+
body,
|
|
1052
|
+
});
|
|
1053
|
+
};
|
|
1011
1054
|
export const serializeAws_restJson1ListSuppressedDestinationsCommand = async (input, context) => {
|
|
1012
1055
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1013
1056
|
const headers = {};
|
|
@@ -1142,6 +1185,28 @@ export const serializeAws_restJson1PutAccountSuppressionAttributesCommand = asyn
|
|
|
1142
1185
|
body,
|
|
1143
1186
|
});
|
|
1144
1187
|
};
|
|
1188
|
+
export const serializeAws_restJson1PutAccountVdmAttributesCommand = async (input, context) => {
|
|
1189
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1190
|
+
const headers = {
|
|
1191
|
+
"content-type": "application/json",
|
|
1192
|
+
};
|
|
1193
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/vdm";
|
|
1194
|
+
let body;
|
|
1195
|
+
body = JSON.stringify({
|
|
1196
|
+
...(input.VdmAttributes != null && {
|
|
1197
|
+
VdmAttributes: serializeAws_restJson1VdmAttributes(input.VdmAttributes, context),
|
|
1198
|
+
}),
|
|
1199
|
+
});
|
|
1200
|
+
return new __HttpRequest({
|
|
1201
|
+
protocol,
|
|
1202
|
+
hostname,
|
|
1203
|
+
port,
|
|
1204
|
+
method: "PUT",
|
|
1205
|
+
headers,
|
|
1206
|
+
path: resolvedPath,
|
|
1207
|
+
body,
|
|
1208
|
+
});
|
|
1209
|
+
};
|
|
1145
1210
|
export const serializeAws_restJson1PutConfigurationSetDeliveryOptionsCommand = async (input, context) => {
|
|
1146
1211
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1147
1212
|
const headers = {
|
|
@@ -1255,6 +1320,28 @@ export const serializeAws_restJson1PutConfigurationSetTrackingOptionsCommand = a
|
|
|
1255
1320
|
body,
|
|
1256
1321
|
});
|
|
1257
1322
|
};
|
|
1323
|
+
export const serializeAws_restJson1PutConfigurationSetVdmOptionsCommand = async (input, context) => {
|
|
1324
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1325
|
+
const headers = {
|
|
1326
|
+
"content-type": "application/json",
|
|
1327
|
+
};
|
|
1328
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1329
|
+
"/v2/email/configuration-sets/{ConfigurationSetName}/vdm-options";
|
|
1330
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ConfigurationSetName", () => input.ConfigurationSetName, "{ConfigurationSetName}", false);
|
|
1331
|
+
let body;
|
|
1332
|
+
body = JSON.stringify({
|
|
1333
|
+
...(input.VdmOptions != null && { VdmOptions: serializeAws_restJson1VdmOptions(input.VdmOptions, context) }),
|
|
1334
|
+
});
|
|
1335
|
+
return new __HttpRequest({
|
|
1336
|
+
protocol,
|
|
1337
|
+
hostname,
|
|
1338
|
+
port,
|
|
1339
|
+
method: "PUT",
|
|
1340
|
+
headers,
|
|
1341
|
+
path: resolvedPath,
|
|
1342
|
+
body,
|
|
1343
|
+
});
|
|
1344
|
+
};
|
|
1258
1345
|
export const serializeAws_restJson1PutDedicatedIpInPoolCommand = async (input, context) => {
|
|
1259
1346
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1260
1347
|
const headers = {
|
|
@@ -1766,6 +1853,51 @@ export const serializeAws_restJson1UpdateEmailTemplateCommand = async (input, co
|
|
|
1766
1853
|
body,
|
|
1767
1854
|
});
|
|
1768
1855
|
};
|
|
1856
|
+
export const deserializeAws_restJson1BatchGetMetricDataCommand = async (output, context) => {
|
|
1857
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1858
|
+
return deserializeAws_restJson1BatchGetMetricDataCommandError(output, context);
|
|
1859
|
+
}
|
|
1860
|
+
const contents = map({
|
|
1861
|
+
$metadata: deserializeMetadata(output),
|
|
1862
|
+
});
|
|
1863
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1864
|
+
if (data.Errors != null) {
|
|
1865
|
+
contents.Errors = deserializeAws_restJson1MetricDataErrorList(data.Errors, context);
|
|
1866
|
+
}
|
|
1867
|
+
if (data.Results != null) {
|
|
1868
|
+
contents.Results = deserializeAws_restJson1MetricDataResultList(data.Results, context);
|
|
1869
|
+
}
|
|
1870
|
+
return contents;
|
|
1871
|
+
};
|
|
1872
|
+
const deserializeAws_restJson1BatchGetMetricDataCommandError = async (output, context) => {
|
|
1873
|
+
const parsedOutput = {
|
|
1874
|
+
...output,
|
|
1875
|
+
body: await parseErrorBody(output.body, context),
|
|
1876
|
+
};
|
|
1877
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1878
|
+
switch (errorCode) {
|
|
1879
|
+
case "BadRequestException":
|
|
1880
|
+
case "com.amazonaws.sesv2#BadRequestException":
|
|
1881
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1882
|
+
case "InternalServiceErrorException":
|
|
1883
|
+
case "com.amazonaws.sesv2#InternalServiceErrorException":
|
|
1884
|
+
throw await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context);
|
|
1885
|
+
case "NotFoundException":
|
|
1886
|
+
case "com.amazonaws.sesv2#NotFoundException":
|
|
1887
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1888
|
+
case "TooManyRequestsException":
|
|
1889
|
+
case "com.amazonaws.sesv2#TooManyRequestsException":
|
|
1890
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1891
|
+
default:
|
|
1892
|
+
const parsedBody = parsedOutput.body;
|
|
1893
|
+
throwDefaultError({
|
|
1894
|
+
output,
|
|
1895
|
+
parsedBody,
|
|
1896
|
+
exceptionCtor: __BaseException,
|
|
1897
|
+
errorCode,
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
};
|
|
1769
1901
|
export const deserializeAws_restJson1CreateConfigurationSetCommand = async (output, context) => {
|
|
1770
1902
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1771
1903
|
return deserializeAws_restJson1CreateConfigurationSetCommandError(output, context);
|
|
@@ -2650,6 +2782,9 @@ export const deserializeAws_restJson1GetAccountCommand = async (output, context)
|
|
|
2650
2782
|
if (data.SuppressionAttributes != null) {
|
|
2651
2783
|
contents.SuppressionAttributes = deserializeAws_restJson1SuppressionAttributes(data.SuppressionAttributes, context);
|
|
2652
2784
|
}
|
|
2785
|
+
if (data.VdmAttributes != null) {
|
|
2786
|
+
contents.VdmAttributes = deserializeAws_restJson1VdmAttributes(data.VdmAttributes, context);
|
|
2787
|
+
}
|
|
2653
2788
|
return contents;
|
|
2654
2789
|
};
|
|
2655
2790
|
const deserializeAws_restJson1GetAccountCommandError = async (output, context) => {
|
|
@@ -2743,6 +2878,9 @@ export const deserializeAws_restJson1GetConfigurationSetCommand = async (output,
|
|
|
2743
2878
|
if (data.TrackingOptions != null) {
|
|
2744
2879
|
contents.TrackingOptions = deserializeAws_restJson1TrackingOptions(data.TrackingOptions, context);
|
|
2745
2880
|
}
|
|
2881
|
+
if (data.VdmOptions != null) {
|
|
2882
|
+
contents.VdmOptions = deserializeAws_restJson1VdmOptions(data.VdmOptions, context);
|
|
2883
|
+
}
|
|
2746
2884
|
return contents;
|
|
2747
2885
|
};
|
|
2748
2886
|
const deserializeAws_restJson1GetConfigurationSetCommandError = async (output, context) => {
|
|
@@ -3926,6 +4064,48 @@ const deserializeAws_restJson1ListImportJobsCommandError = async (output, contex
|
|
|
3926
4064
|
});
|
|
3927
4065
|
}
|
|
3928
4066
|
};
|
|
4067
|
+
export const deserializeAws_restJson1ListRecommendationsCommand = async (output, context) => {
|
|
4068
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4069
|
+
return deserializeAws_restJson1ListRecommendationsCommandError(output, context);
|
|
4070
|
+
}
|
|
4071
|
+
const contents = map({
|
|
4072
|
+
$metadata: deserializeMetadata(output),
|
|
4073
|
+
});
|
|
4074
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4075
|
+
if (data.NextToken != null) {
|
|
4076
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
4077
|
+
}
|
|
4078
|
+
if (data.Recommendations != null) {
|
|
4079
|
+
contents.Recommendations = deserializeAws_restJson1RecommendationsList(data.Recommendations, context);
|
|
4080
|
+
}
|
|
4081
|
+
return contents;
|
|
4082
|
+
};
|
|
4083
|
+
const deserializeAws_restJson1ListRecommendationsCommandError = async (output, context) => {
|
|
4084
|
+
const parsedOutput = {
|
|
4085
|
+
...output,
|
|
4086
|
+
body: await parseErrorBody(output.body, context),
|
|
4087
|
+
};
|
|
4088
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4089
|
+
switch (errorCode) {
|
|
4090
|
+
case "BadRequestException":
|
|
4091
|
+
case "com.amazonaws.sesv2#BadRequestException":
|
|
4092
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
4093
|
+
case "NotFoundException":
|
|
4094
|
+
case "com.amazonaws.sesv2#NotFoundException":
|
|
4095
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
4096
|
+
case "TooManyRequestsException":
|
|
4097
|
+
case "com.amazonaws.sesv2#TooManyRequestsException":
|
|
4098
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
4099
|
+
default:
|
|
4100
|
+
const parsedBody = parsedOutput.body;
|
|
4101
|
+
throwDefaultError({
|
|
4102
|
+
output,
|
|
4103
|
+
parsedBody,
|
|
4104
|
+
exceptionCtor: __BaseException,
|
|
4105
|
+
errorCode,
|
|
4106
|
+
});
|
|
4107
|
+
}
|
|
4108
|
+
};
|
|
3929
4109
|
export const deserializeAws_restJson1ListSuppressedDestinationsCommand = async (output, context) => {
|
|
3930
4110
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3931
4111
|
return deserializeAws_restJson1ListSuppressedDestinationsCommandError(output, context);
|
|
@@ -4142,6 +4322,39 @@ const deserializeAws_restJson1PutAccountSuppressionAttributesCommandError = asyn
|
|
|
4142
4322
|
});
|
|
4143
4323
|
}
|
|
4144
4324
|
};
|
|
4325
|
+
export const deserializeAws_restJson1PutAccountVdmAttributesCommand = async (output, context) => {
|
|
4326
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4327
|
+
return deserializeAws_restJson1PutAccountVdmAttributesCommandError(output, context);
|
|
4328
|
+
}
|
|
4329
|
+
const contents = map({
|
|
4330
|
+
$metadata: deserializeMetadata(output),
|
|
4331
|
+
});
|
|
4332
|
+
await collectBody(output.body, context);
|
|
4333
|
+
return contents;
|
|
4334
|
+
};
|
|
4335
|
+
const deserializeAws_restJson1PutAccountVdmAttributesCommandError = async (output, context) => {
|
|
4336
|
+
const parsedOutput = {
|
|
4337
|
+
...output,
|
|
4338
|
+
body: await parseErrorBody(output.body, context),
|
|
4339
|
+
};
|
|
4340
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4341
|
+
switch (errorCode) {
|
|
4342
|
+
case "BadRequestException":
|
|
4343
|
+
case "com.amazonaws.sesv2#BadRequestException":
|
|
4344
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
4345
|
+
case "TooManyRequestsException":
|
|
4346
|
+
case "com.amazonaws.sesv2#TooManyRequestsException":
|
|
4347
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
4348
|
+
default:
|
|
4349
|
+
const parsedBody = parsedOutput.body;
|
|
4350
|
+
throwDefaultError({
|
|
4351
|
+
output,
|
|
4352
|
+
parsedBody,
|
|
4353
|
+
exceptionCtor: __BaseException,
|
|
4354
|
+
errorCode,
|
|
4355
|
+
});
|
|
4356
|
+
}
|
|
4357
|
+
};
|
|
4145
4358
|
export const deserializeAws_restJson1PutConfigurationSetDeliveryOptionsCommand = async (output, context) => {
|
|
4146
4359
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4147
4360
|
return deserializeAws_restJson1PutConfigurationSetDeliveryOptionsCommandError(output, context);
|
|
@@ -4322,6 +4535,42 @@ const deserializeAws_restJson1PutConfigurationSetTrackingOptionsCommandError = a
|
|
|
4322
4535
|
});
|
|
4323
4536
|
}
|
|
4324
4537
|
};
|
|
4538
|
+
export const deserializeAws_restJson1PutConfigurationSetVdmOptionsCommand = async (output, context) => {
|
|
4539
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4540
|
+
return deserializeAws_restJson1PutConfigurationSetVdmOptionsCommandError(output, context);
|
|
4541
|
+
}
|
|
4542
|
+
const contents = map({
|
|
4543
|
+
$metadata: deserializeMetadata(output),
|
|
4544
|
+
});
|
|
4545
|
+
await collectBody(output.body, context);
|
|
4546
|
+
return contents;
|
|
4547
|
+
};
|
|
4548
|
+
const deserializeAws_restJson1PutConfigurationSetVdmOptionsCommandError = async (output, context) => {
|
|
4549
|
+
const parsedOutput = {
|
|
4550
|
+
...output,
|
|
4551
|
+
body: await parseErrorBody(output.body, context),
|
|
4552
|
+
};
|
|
4553
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4554
|
+
switch (errorCode) {
|
|
4555
|
+
case "BadRequestException":
|
|
4556
|
+
case "com.amazonaws.sesv2#BadRequestException":
|
|
4557
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
4558
|
+
case "NotFoundException":
|
|
4559
|
+
case "com.amazonaws.sesv2#NotFoundException":
|
|
4560
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
4561
|
+
case "TooManyRequestsException":
|
|
4562
|
+
case "com.amazonaws.sesv2#TooManyRequestsException":
|
|
4563
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
4564
|
+
default:
|
|
4565
|
+
const parsedBody = parsedOutput.body;
|
|
4566
|
+
throwDefaultError({
|
|
4567
|
+
output,
|
|
4568
|
+
parsedBody,
|
|
4569
|
+
exceptionCtor: __BaseException,
|
|
4570
|
+
errorCode,
|
|
4571
|
+
});
|
|
4572
|
+
}
|
|
4573
|
+
};
|
|
4325
4574
|
export const deserializeAws_restJson1PutDedicatedIpInPoolCommand = async (output, context) => {
|
|
4326
4575
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4327
4576
|
return deserializeAws_restJson1PutDedicatedIpInPoolCommandError(output, context);
|
|
@@ -5214,6 +5463,18 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
5214
5463
|
});
|
|
5215
5464
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
5216
5465
|
};
|
|
5466
|
+
const deserializeAws_restJson1InternalServiceErrorExceptionResponse = async (parsedOutput, context) => {
|
|
5467
|
+
const contents = map({});
|
|
5468
|
+
const data = parsedOutput.body;
|
|
5469
|
+
if (data.message != null) {
|
|
5470
|
+
contents.message = __expectString(data.message);
|
|
5471
|
+
}
|
|
5472
|
+
const exception = new InternalServiceErrorException({
|
|
5473
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
5474
|
+
...contents,
|
|
5475
|
+
});
|
|
5476
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
5477
|
+
};
|
|
5217
5478
|
const deserializeAws_restJson1InvalidNextTokenExceptionResponse = async (parsedOutput, context) => {
|
|
5218
5479
|
const contents = map({});
|
|
5219
5480
|
const data = parsedOutput.body;
|
|
@@ -5305,6 +5566,23 @@ const serializeAws_restJson1AdditionalContactEmailAddresses = (input, context) =
|
|
|
5305
5566
|
return entry;
|
|
5306
5567
|
});
|
|
5307
5568
|
};
|
|
5569
|
+
const serializeAws_restJson1BatchGetMetricDataQueries = (input, context) => {
|
|
5570
|
+
return input
|
|
5571
|
+
.filter((e) => e != null)
|
|
5572
|
+
.map((entry) => {
|
|
5573
|
+
return serializeAws_restJson1BatchGetMetricDataQuery(entry, context);
|
|
5574
|
+
});
|
|
5575
|
+
};
|
|
5576
|
+
const serializeAws_restJson1BatchGetMetricDataQuery = (input, context) => {
|
|
5577
|
+
return {
|
|
5578
|
+
...(input.Dimensions != null && { Dimensions: serializeAws_restJson1Dimensions(input.Dimensions, context) }),
|
|
5579
|
+
...(input.EndDate != null && { EndDate: Math.round(input.EndDate.getTime() / 1000) }),
|
|
5580
|
+
...(input.Id != null && { Id: input.Id }),
|
|
5581
|
+
...(input.Metric != null && { Metric: input.Metric }),
|
|
5582
|
+
...(input.Namespace != null && { Namespace: input.Namespace }),
|
|
5583
|
+
...(input.StartDate != null && { StartDate: Math.round(input.StartDate.getTime() / 1000) }),
|
|
5584
|
+
};
|
|
5585
|
+
};
|
|
5308
5586
|
const serializeAws_restJson1Body = (input, context) => {
|
|
5309
5587
|
return {
|
|
5310
5588
|
...(input.Html != null && { Html: serializeAws_restJson1Content(input.Html, context) }),
|
|
@@ -5367,6 +5645,16 @@ const serializeAws_restJson1Content = (input, context) => {
|
|
|
5367
5645
|
...(input.Data != null && { Data: input.Data }),
|
|
5368
5646
|
};
|
|
5369
5647
|
};
|
|
5648
|
+
const serializeAws_restJson1DashboardAttributes = (input, context) => {
|
|
5649
|
+
return {
|
|
5650
|
+
...(input.EngagementMetrics != null && { EngagementMetrics: input.EngagementMetrics }),
|
|
5651
|
+
};
|
|
5652
|
+
};
|
|
5653
|
+
const serializeAws_restJson1DashboardOptions = (input, context) => {
|
|
5654
|
+
return {
|
|
5655
|
+
...(input.EngagementMetrics != null && { EngagementMetrics: input.EngagementMetrics }),
|
|
5656
|
+
};
|
|
5657
|
+
};
|
|
5370
5658
|
const serializeAws_restJson1DeliveryOptions = (input, context) => {
|
|
5371
5659
|
return {
|
|
5372
5660
|
...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }),
|
|
@@ -5386,6 +5674,17 @@ const serializeAws_restJson1Destination = (input, context) => {
|
|
|
5386
5674
|
}),
|
|
5387
5675
|
};
|
|
5388
5676
|
};
|
|
5677
|
+
const serializeAws_restJson1Dimensions = (input, context) => {
|
|
5678
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
5679
|
+
if (value === null) {
|
|
5680
|
+
return acc;
|
|
5681
|
+
}
|
|
5682
|
+
return {
|
|
5683
|
+
...acc,
|
|
5684
|
+
[key]: value,
|
|
5685
|
+
};
|
|
5686
|
+
}, {});
|
|
5687
|
+
};
|
|
5389
5688
|
const serializeAws_restJson1DkimSigningAttributes = (input, context) => {
|
|
5390
5689
|
return {
|
|
5391
5690
|
...(input.DomainSigningPrivateKey != null && { DomainSigningPrivateKey: input.DomainSigningPrivateKey }),
|
|
@@ -5459,6 +5758,16 @@ const serializeAws_restJson1EventTypes = (input, context) => {
|
|
|
5459
5758
|
return entry;
|
|
5460
5759
|
});
|
|
5461
5760
|
};
|
|
5761
|
+
const serializeAws_restJson1GuardianAttributes = (input, context) => {
|
|
5762
|
+
return {
|
|
5763
|
+
...(input.OptimizedSharedDelivery != null && { OptimizedSharedDelivery: input.OptimizedSharedDelivery }),
|
|
5764
|
+
};
|
|
5765
|
+
};
|
|
5766
|
+
const serializeAws_restJson1GuardianOptions = (input, context) => {
|
|
5767
|
+
return {
|
|
5768
|
+
...(input.OptimizedSharedDelivery != null && { OptimizedSharedDelivery: input.OptimizedSharedDelivery }),
|
|
5769
|
+
};
|
|
5770
|
+
};
|
|
5462
5771
|
const serializeAws_restJson1ImportDataSource = (input, context) => {
|
|
5463
5772
|
return {
|
|
5464
5773
|
...(input.DataFormat != null && { DataFormat: input.DataFormat }),
|
|
@@ -5506,6 +5815,17 @@ const serializeAws_restJson1ListManagementOptions = (input, context) => {
|
|
|
5506
5815
|
...(input.TopicName != null && { TopicName: input.TopicName }),
|
|
5507
5816
|
};
|
|
5508
5817
|
};
|
|
5818
|
+
const serializeAws_restJson1ListRecommendationsFilter = (input, context) => {
|
|
5819
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
5820
|
+
if (value === null) {
|
|
5821
|
+
return acc;
|
|
5822
|
+
}
|
|
5823
|
+
return {
|
|
5824
|
+
...acc,
|
|
5825
|
+
[key]: value,
|
|
5826
|
+
};
|
|
5827
|
+
}, {});
|
|
5828
|
+
};
|
|
5509
5829
|
const serializeAws_restJson1Message = (input, context) => {
|
|
5510
5830
|
return {
|
|
5511
5831
|
...(input.Body != null && { Body: serializeAws_restJson1Body(input.Body, context) }),
|
|
@@ -5645,6 +5965,27 @@ const serializeAws_restJson1TrackingOptions = (input, context) => {
|
|
|
5645
5965
|
...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }),
|
|
5646
5966
|
};
|
|
5647
5967
|
};
|
|
5968
|
+
const serializeAws_restJson1VdmAttributes = (input, context) => {
|
|
5969
|
+
return {
|
|
5970
|
+
...(input.DashboardAttributes != null && {
|
|
5971
|
+
DashboardAttributes: serializeAws_restJson1DashboardAttributes(input.DashboardAttributes, context),
|
|
5972
|
+
}),
|
|
5973
|
+
...(input.GuardianAttributes != null && {
|
|
5974
|
+
GuardianAttributes: serializeAws_restJson1GuardianAttributes(input.GuardianAttributes, context),
|
|
5975
|
+
}),
|
|
5976
|
+
...(input.VdmEnabled != null && { VdmEnabled: input.VdmEnabled }),
|
|
5977
|
+
};
|
|
5978
|
+
};
|
|
5979
|
+
const serializeAws_restJson1VdmOptions = (input, context) => {
|
|
5980
|
+
return {
|
|
5981
|
+
...(input.DashboardOptions != null && {
|
|
5982
|
+
DashboardOptions: serializeAws_restJson1DashboardOptions(input.DashboardOptions, context),
|
|
5983
|
+
}),
|
|
5984
|
+
...(input.GuardianOptions != null && {
|
|
5985
|
+
GuardianOptions: serializeAws_restJson1GuardianOptions(input.GuardianOptions, context),
|
|
5986
|
+
}),
|
|
5987
|
+
};
|
|
5988
|
+
};
|
|
5648
5989
|
const deserializeAws_restJson1AccountDetails = (output, context) => {
|
|
5649
5990
|
return {
|
|
5650
5991
|
AdditionalContactEmailAddresses: output.AdditionalContactEmailAddresses != null
|
|
@@ -5824,6 +6165,16 @@ const deserializeAws_restJson1DailyVolumes = (output, context) => {
|
|
|
5824
6165
|
});
|
|
5825
6166
|
return retVal;
|
|
5826
6167
|
};
|
|
6168
|
+
const deserializeAws_restJson1DashboardAttributes = (output, context) => {
|
|
6169
|
+
return {
|
|
6170
|
+
EngagementMetrics: __expectString(output.EngagementMetrics),
|
|
6171
|
+
};
|
|
6172
|
+
};
|
|
6173
|
+
const deserializeAws_restJson1DashboardOptions = (output, context) => {
|
|
6174
|
+
return {
|
|
6175
|
+
EngagementMetrics: __expectString(output.EngagementMetrics),
|
|
6176
|
+
};
|
|
6177
|
+
};
|
|
5827
6178
|
const deserializeAws_restJson1DedicatedIp = (output, context) => {
|
|
5828
6179
|
return {
|
|
5829
6180
|
Ip: __expectString(output.Ip),
|
|
@@ -6061,6 +6412,16 @@ const deserializeAws_restJson1FailureInfo = (output, context) => {
|
|
|
6061
6412
|
FailedRecordsS3Url: __expectString(output.FailedRecordsS3Url),
|
|
6062
6413
|
};
|
|
6063
6414
|
};
|
|
6415
|
+
const deserializeAws_restJson1GuardianAttributes = (output, context) => {
|
|
6416
|
+
return {
|
|
6417
|
+
OptimizedSharedDelivery: __expectString(output.OptimizedSharedDelivery),
|
|
6418
|
+
};
|
|
6419
|
+
};
|
|
6420
|
+
const deserializeAws_restJson1GuardianOptions = (output, context) => {
|
|
6421
|
+
return {
|
|
6422
|
+
OptimizedSharedDelivery: __expectString(output.OptimizedSharedDelivery),
|
|
6423
|
+
};
|
|
6424
|
+
};
|
|
6064
6425
|
const deserializeAws_restJson1IdentityInfo = (output, context) => {
|
|
6065
6426
|
return {
|
|
6066
6427
|
IdentityName: __expectString(output.IdentityName),
|
|
@@ -6214,6 +6575,53 @@ const deserializeAws_restJson1MailFromAttributes = (output, context) => {
|
|
|
6214
6575
|
MailFromDomainStatus: __expectString(output.MailFromDomainStatus),
|
|
6215
6576
|
};
|
|
6216
6577
|
};
|
|
6578
|
+
const deserializeAws_restJson1MetricDataError = (output, context) => {
|
|
6579
|
+
return {
|
|
6580
|
+
Code: __expectString(output.Code),
|
|
6581
|
+
Id: __expectString(output.Id),
|
|
6582
|
+
Message: __expectString(output.Message),
|
|
6583
|
+
};
|
|
6584
|
+
};
|
|
6585
|
+
const deserializeAws_restJson1MetricDataErrorList = (output, context) => {
|
|
6586
|
+
const retVal = (output || [])
|
|
6587
|
+
.filter((e) => e != null)
|
|
6588
|
+
.map((entry) => {
|
|
6589
|
+
if (entry === null) {
|
|
6590
|
+
return null;
|
|
6591
|
+
}
|
|
6592
|
+
return deserializeAws_restJson1MetricDataError(entry, context);
|
|
6593
|
+
});
|
|
6594
|
+
return retVal;
|
|
6595
|
+
};
|
|
6596
|
+
const deserializeAws_restJson1MetricDataResult = (output, context) => {
|
|
6597
|
+
return {
|
|
6598
|
+
Id: __expectString(output.Id),
|
|
6599
|
+
Timestamps: output.Timestamps != null ? deserializeAws_restJson1TimestampList(output.Timestamps, context) : undefined,
|
|
6600
|
+
Values: output.Values != null ? deserializeAws_restJson1MetricValueList(output.Values, context) : undefined,
|
|
6601
|
+
};
|
|
6602
|
+
};
|
|
6603
|
+
const deserializeAws_restJson1MetricDataResultList = (output, context) => {
|
|
6604
|
+
const retVal = (output || [])
|
|
6605
|
+
.filter((e) => e != null)
|
|
6606
|
+
.map((entry) => {
|
|
6607
|
+
if (entry === null) {
|
|
6608
|
+
return null;
|
|
6609
|
+
}
|
|
6610
|
+
return deserializeAws_restJson1MetricDataResult(entry, context);
|
|
6611
|
+
});
|
|
6612
|
+
return retVal;
|
|
6613
|
+
};
|
|
6614
|
+
const deserializeAws_restJson1MetricValueList = (output, context) => {
|
|
6615
|
+
const retVal = (output || [])
|
|
6616
|
+
.filter((e) => e != null)
|
|
6617
|
+
.map((entry) => {
|
|
6618
|
+
if (entry === null) {
|
|
6619
|
+
return null;
|
|
6620
|
+
}
|
|
6621
|
+
return __expectLong(entry);
|
|
6622
|
+
});
|
|
6623
|
+
return retVal;
|
|
6624
|
+
};
|
|
6217
6625
|
const deserializeAws_restJson1OverallVolume = (output, context) => {
|
|
6218
6626
|
return {
|
|
6219
6627
|
DomainIspPlacements: output.DomainIspPlacements != null
|
|
@@ -6250,6 +6658,32 @@ const deserializeAws_restJson1PolicyMap = (output, context) => {
|
|
|
6250
6658
|
};
|
|
6251
6659
|
}, {});
|
|
6252
6660
|
};
|
|
6661
|
+
const deserializeAws_restJson1Recommendation = (output, context) => {
|
|
6662
|
+
return {
|
|
6663
|
+
CreatedTimestamp: output.CreatedTimestamp != null
|
|
6664
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
|
|
6665
|
+
: undefined,
|
|
6666
|
+
Description: __expectString(output.Description),
|
|
6667
|
+
Impact: __expectString(output.Impact),
|
|
6668
|
+
LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
|
|
6669
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp)))
|
|
6670
|
+
: undefined,
|
|
6671
|
+
ResourceArn: __expectString(output.ResourceArn),
|
|
6672
|
+
Status: __expectString(output.Status),
|
|
6673
|
+
Type: __expectString(output.Type),
|
|
6674
|
+
};
|
|
6675
|
+
};
|
|
6676
|
+
const deserializeAws_restJson1RecommendationsList = (output, context) => {
|
|
6677
|
+
const retVal = (output || [])
|
|
6678
|
+
.filter((e) => e != null)
|
|
6679
|
+
.map((entry) => {
|
|
6680
|
+
if (entry === null) {
|
|
6681
|
+
return null;
|
|
6682
|
+
}
|
|
6683
|
+
return deserializeAws_restJson1Recommendation(entry, context);
|
|
6684
|
+
});
|
|
6685
|
+
return retVal;
|
|
6686
|
+
};
|
|
6253
6687
|
const deserializeAws_restJson1ReputationOptions = (output, context) => {
|
|
6254
6688
|
return {
|
|
6255
6689
|
LastFreshStart: output.LastFreshStart != null
|
|
@@ -6366,6 +6800,17 @@ const deserializeAws_restJson1TagList = (output, context) => {
|
|
|
6366
6800
|
});
|
|
6367
6801
|
return retVal;
|
|
6368
6802
|
};
|
|
6803
|
+
const deserializeAws_restJson1TimestampList = (output, context) => {
|
|
6804
|
+
const retVal = (output || [])
|
|
6805
|
+
.filter((e) => e != null)
|
|
6806
|
+
.map((entry) => {
|
|
6807
|
+
if (entry === null) {
|
|
6808
|
+
return null;
|
|
6809
|
+
}
|
|
6810
|
+
return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry)));
|
|
6811
|
+
});
|
|
6812
|
+
return retVal;
|
|
6813
|
+
};
|
|
6369
6814
|
const deserializeAws_restJson1Topic = (output, context) => {
|
|
6370
6815
|
return {
|
|
6371
6816
|
DefaultSubscriptionStatus: __expectString(output.DefaultSubscriptionStatus),
|
|
@@ -6407,6 +6852,27 @@ const deserializeAws_restJson1TrackingOptions = (output, context) => {
|
|
|
6407
6852
|
CustomRedirectDomain: __expectString(output.CustomRedirectDomain),
|
|
6408
6853
|
};
|
|
6409
6854
|
};
|
|
6855
|
+
const deserializeAws_restJson1VdmAttributes = (output, context) => {
|
|
6856
|
+
return {
|
|
6857
|
+
DashboardAttributes: output.DashboardAttributes != null
|
|
6858
|
+
? deserializeAws_restJson1DashboardAttributes(output.DashboardAttributes, context)
|
|
6859
|
+
: undefined,
|
|
6860
|
+
GuardianAttributes: output.GuardianAttributes != null
|
|
6861
|
+
? deserializeAws_restJson1GuardianAttributes(output.GuardianAttributes, context)
|
|
6862
|
+
: undefined,
|
|
6863
|
+
VdmEnabled: __expectString(output.VdmEnabled),
|
|
6864
|
+
};
|
|
6865
|
+
};
|
|
6866
|
+
const deserializeAws_restJson1VdmOptions = (output, context) => {
|
|
6867
|
+
return {
|
|
6868
|
+
DashboardOptions: output.DashboardOptions != null
|
|
6869
|
+
? deserializeAws_restJson1DashboardOptions(output.DashboardOptions, context)
|
|
6870
|
+
: undefined,
|
|
6871
|
+
GuardianOptions: output.GuardianOptions != null
|
|
6872
|
+
? deserializeAws_restJson1GuardianOptions(output.GuardianOptions, context)
|
|
6873
|
+
: undefined,
|
|
6874
|
+
};
|
|
6875
|
+
};
|
|
6410
6876
|
const deserializeAws_restJson1VolumeStatistics = (output, context) => {
|
|
6411
6877
|
return {
|
|
6412
6878
|
InboxRawCount: __expectLong(output.InboxRawCount),
|