Skip to content

Commit 56df20c

Browse files
author
awstools
committed
feat(client-sesv2): Fixes ListContacts and ListImportJobs APIs to use POST instead of GET.
1 parent 669a7de commit 56df20c

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

clients/client-sesv2/src/protocols/Aws_restJson1.ts

+8-12
Original file line numberDiff line numberDiff line change
@@ -1306,19 +1306,17 @@ export const se_ListContactsCommand = async (
13061306
const headers: any = {
13071307
"content-type": "application/json",
13081308
};
1309-
b.bp("/v2/email/contact-lists/{ContactListName}/contacts");
1309+
b.bp("/v2/email/contact-lists/{ContactListName}/contacts/list");
13101310
b.p("ContactListName", () => input.ContactListName!, "{ContactListName}", false);
1311-
const query: any = map({
1312-
[_PS]: [() => input.PageSize !== void 0, () => input[_PS]!.toString()],
1313-
[_NT]: [, input[_NT]!],
1314-
});
13151311
let body: any;
13161312
body = JSON.stringify(
13171313
take(input, {
13181314
Filter: (_) => _json(_),
1315+
NextToken: [],
1316+
PageSize: [],
13191317
})
13201318
);
1321-
b.m("GET").h(headers).q(query).b(body);
1319+
b.m("POST").h(headers).b(body);
13221320
return b.build();
13231321
};
13241322

@@ -1481,18 +1479,16 @@ export const se_ListImportJobsCommand = async (
14811479
const headers: any = {
14821480
"content-type": "application/json",
14831481
};
1484-
b.bp("/v2/email/import-jobs");
1485-
const query: any = map({
1486-
[_NT]: [, input[_NT]!],
1487-
[_PS]: [() => input.PageSize !== void 0, () => input[_PS]!.toString()],
1488-
});
1482+
b.bp("/v2/email/import-jobs/list");
14891483
let body: any;
14901484
body = JSON.stringify(
14911485
take(input, {
14921486
ImportDestinationType: [],
1487+
NextToken: [],
1488+
PageSize: [],
14931489
})
14941490
);
1495-
b.m("GET").h(headers).q(query).b(body);
1491+
b.m("POST").h(headers).b(body);
14961492
return b.build();
14971493
};
14981494

codegen/sdk-codegen/aws-models/sesv2.json

+8-12
Original file line numberDiff line numberDiff line change
@@ -6276,8 +6276,8 @@
62766276
"traits": {
62776277
"smithy.api#documentation": "<p>Lists the contacts present in a specific contact list.</p>",
62786278
"smithy.api#http": {
6279-
"method": "GET",
6280-
"uri": "/v2/email/contact-lists/{ContactListName}/contacts",
6279+
"method": "POST",
6280+
"uri": "/v2/email/contact-lists/{ContactListName}/contacts/list",
62816281
"code": 200
62826282
},
62836283
"smithy.api#paginated": {
@@ -6327,15 +6327,13 @@
63276327
"PageSize": {
63286328
"target": "com.amazonaws.sesv2#MaxItems",
63296329
"traits": {
6330-
"smithy.api#documentation": "<p>The number of contacts that may be returned at once, which is dependent on if there\n are more or less contacts than the value of the PageSize. Use this parameter to paginate\n results. If additional contacts exist beyond the specified limit, the\n <code>NextToken</code> element is sent in the response. Use the\n <code>NextToken</code> value in subsequent requests to retrieve additional\n contacts.</p>",
6331-
"smithy.api#httpQuery": "PageSize"
6330+
"smithy.api#documentation": "<p>The number of contacts that may be returned at once, which is dependent on if there\n are more or less contacts than the value of the PageSize. Use this parameter to paginate\n results. If additional contacts exist beyond the specified limit, the\n <code>NextToken</code> element is sent in the response. Use the\n <code>NextToken</code> value in subsequent requests to retrieve additional\n contacts.</p>"
63326331
}
63336332
},
63346333
"NextToken": {
63356334
"target": "com.amazonaws.sesv2#NextToken",
63366335
"traits": {
6337-
"smithy.api#documentation": "<p>A string token indicating that there might be additional contacts available to be\n listed. Use the token provided in the Response to use in the subsequent call to\n ListContacts with the same parameters to retrieve the next page of contacts.</p>",
6338-
"smithy.api#httpQuery": "NextToken"
6336+
"smithy.api#documentation": "<p>A string token indicating that there might be additional contacts available to be\n listed. Use the token provided in the Response to use in the subsequent call to\n ListContacts with the same parameters to retrieve the next page of contacts.</p>"
63396337
}
63406338
}
63416339
},
@@ -6942,8 +6940,8 @@
69426940
"traits": {
69436941
"smithy.api#documentation": "<p>Lists all of the import jobs.</p>",
69446942
"smithy.api#http": {
6945-
"method": "GET",
6946-
"uri": "/v2/email/import-jobs",
6943+
"method": "POST",
6944+
"uri": "/v2/email/import-jobs/list",
69476945
"code": 200
69486946
},
69496947
"smithy.api#paginated": {
@@ -6965,15 +6963,13 @@
69656963
"NextToken": {
69666964
"target": "com.amazonaws.sesv2#NextToken",
69676965
"traits": {
6968-
"smithy.api#documentation": "<p>A string token indicating that there might be additional import jobs available to be\n listed. Copy this token to a subsequent call to <code>ListImportJobs</code> with the\n same parameters to retrieve the next page of import jobs.</p>",
6969-
"smithy.api#httpQuery": "NextToken"
6966+
"smithy.api#documentation": "<p>A string token indicating that there might be additional import jobs available to be\n listed. Copy this token to a subsequent call to <code>ListImportJobs</code> with the\n same parameters to retrieve the next page of import jobs.</p>"
69706967
}
69716968
},
69726969
"PageSize": {
69736970
"target": "com.amazonaws.sesv2#MaxItems",
69746971
"traits": {
6975-
"smithy.api#documentation": "<p>Maximum number of import jobs to return at once. Use this parameter to paginate\n results. If additional import jobs exist beyond the specified limit, the\n <code>NextToken</code> element is sent in the response. Use the\n <code>NextToken</code> value in subsequent requests to retrieve additional\n addresses.</p>",
6976-
"smithy.api#httpQuery": "PageSize"
6972+
"smithy.api#documentation": "<p>Maximum number of import jobs to return at once. Use this parameter to paginate\n results. If additional import jobs exist beyond the specified limit, the\n <code>NextToken</code> element is sent in the response. Use the\n <code>NextToken</code> value in subsequent requests to retrieve additional\n addresses.</p>"
69776973
}
69786974
}
69796975
},

0 commit comments

Comments
 (0)