@aws-sdk/client-ssm-sap 3.476.0 → 3.478.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.
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListApplications = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListApplicationsCommand_1 = require("../commands/ListApplicationsCommand");
5
6
  const SsmSapClient_1 = require("../SsmSapClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListApplicationsCommand_1.ListApplicationsCommand(input), ...args);
8
- };
9
- async function* paginateListApplications(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SsmSapClient_1.SsmSapClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected SsmSap | SsmSapClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListApplications = paginateListApplications;
7
+ exports.paginateListApplications = (0, core_1.createPaginator)(SsmSapClient_1.SsmSapClient, ListApplicationsCommand_1.ListApplicationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListComponents = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListComponentsCommand_1 = require("../commands/ListComponentsCommand");
5
6
  const SsmSapClient_1 = require("../SsmSapClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListComponentsCommand_1.ListComponentsCommand(input), ...args);
8
- };
9
- async function* paginateListComponents(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SsmSapClient_1.SsmSapClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected SsmSap | SsmSapClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListComponents = paginateListComponents;
7
+ exports.paginateListComponents = (0, core_1.createPaginator)(SsmSapClient_1.SsmSapClient, ListComponentsCommand_1.ListComponentsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListDatabases = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDatabasesCommand_1 = require("../commands/ListDatabasesCommand");
5
6
  const SsmSapClient_1 = require("../SsmSapClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDatabasesCommand_1.ListDatabasesCommand(input), ...args);
8
- };
9
- async function* paginateListDatabases(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SsmSapClient_1.SsmSapClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected SsmSap | SsmSapClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListDatabases = paginateListDatabases;
7
+ exports.paginateListDatabases = (0, core_1.createPaginator)(SsmSapClient_1.SsmSapClient, ListDatabasesCommand_1.ListDatabasesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListOperations = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListOperationsCommand_1 = require("../commands/ListOperationsCommand");
5
6
  const SsmSapClient_1 = require("../SsmSapClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListOperationsCommand_1.ListOperationsCommand(input), ...args);
8
- };
9
- async function* paginateListOperations(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SsmSapClient_1.SsmSapClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected SsmSap | SsmSapClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListOperations = paginateListOperations;
7
+ exports.paginateListOperations = (0, core_1.createPaginator)(SsmSapClient_1.SsmSapClient, ListOperationsCommand_1.ListOperationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,105 +1,77 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateApplicationSettingsCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartApplicationRefreshCommand = exports.de_RegisterApplicationCommand = exports.de_PutResourcePermissionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListOperationsCommand = exports.de_ListDatabasesCommand = exports.de_ListComponentsCommand = exports.de_ListApplicationsCommand = exports.de_GetResourcePermissionCommand = exports.de_GetOperationCommand = exports.de_GetDatabaseCommand = exports.de_GetComponentCommand = exports.de_GetApplicationCommand = exports.de_DeregisterApplicationCommand = exports.de_DeleteResourcePermissionCommand = exports.se_UpdateApplicationSettingsCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartApplicationRefreshCommand = exports.se_RegisterApplicationCommand = exports.se_PutResourcePermissionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListOperationsCommand = exports.se_ListDatabasesCommand = exports.se_ListComponentsCommand = exports.se_ListApplicationsCommand = exports.se_GetResourcePermissionCommand = exports.se_GetOperationCommand = exports.se_GetDatabaseCommand = exports.se_GetComponentCommand = exports.se_GetApplicationCommand = exports.se_DeregisterApplicationCommand = exports.se_DeleteResourcePermissionCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const SsmSapServiceException_1 = require("../models/SsmSapServiceException");
8
8
  const se_DeleteResourcePermissionCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-resource-permission";
13
+ b.bp("/delete-resource-permission");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  ActionType: [],
17
17
  ResourceArn: [],
18
18
  SourceResourceArn: [],
19
19
  }));
20
- return new protocol_http_1.HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "POST",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
20
+ b.m("POST").h(headers).b(body);
21
+ return b.build();
29
22
  };
30
23
  exports.se_DeleteResourcePermissionCommand = se_DeleteResourcePermissionCommand;
31
24
  const se_DeregisterApplicationCommand = async (input, context) => {
32
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = (0, core_1.requestBuilder)(input, context);
33
26
  const headers = {
34
27
  "content-type": "application/json",
35
28
  };
36
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deregister-application";
29
+ b.bp("/deregister-application");
37
30
  let body;
38
31
  body = JSON.stringify((0, smithy_client_1.take)(input, {
39
32
  ApplicationId: [],
40
33
  }));
41
- return new protocol_http_1.HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "POST",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
50
36
  };
51
37
  exports.se_DeregisterApplicationCommand = se_DeregisterApplicationCommand;
52
38
  const se_GetApplicationCommand = async (input, context) => {
53
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = (0, core_1.requestBuilder)(input, context);
54
40
  const headers = {
55
41
  "content-type": "application/json",
56
42
  };
57
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-application";
43
+ b.bp("/get-application");
58
44
  let body;
59
45
  body = JSON.stringify((0, smithy_client_1.take)(input, {
60
46
  AppRegistryArn: [],
61
47
  ApplicationArn: [],
62
48
  ApplicationId: [],
63
49
  }));
64
- return new protocol_http_1.HttpRequest({
65
- protocol,
66
- hostname,
67
- port,
68
- method: "POST",
69
- headers,
70
- path: resolvedPath,
71
- body,
72
- });
50
+ b.m("POST").h(headers).b(body);
51
+ return b.build();
73
52
  };
74
53
  exports.se_GetApplicationCommand = se_GetApplicationCommand;
75
54
  const se_GetComponentCommand = async (input, context) => {
76
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const b = (0, core_1.requestBuilder)(input, context);
77
56
  const headers = {
78
57
  "content-type": "application/json",
79
58
  };
80
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-component";
59
+ b.bp("/get-component");
81
60
  let body;
82
61
  body = JSON.stringify((0, smithy_client_1.take)(input, {
83
62
  ApplicationId: [],
84
63
  ComponentId: [],
85
64
  }));
86
- return new protocol_http_1.HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "POST",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
65
+ b.m("POST").h(headers).b(body);
66
+ return b.build();
95
67
  };
96
68
  exports.se_GetComponentCommand = se_GetComponentCommand;
97
69
  const se_GetDatabaseCommand = async (input, context) => {
98
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
70
+ const b = (0, core_1.requestBuilder)(input, context);
99
71
  const headers = {
100
72
  "content-type": "application/json",
101
73
  };
102
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-database";
74
+ b.bp("/get-database");
103
75
  let body;
104
76
  body = JSON.stringify((0, smithy_client_1.take)(input, {
105
77
  ApplicationId: [],
@@ -107,112 +79,77 @@ const se_GetDatabaseCommand = async (input, context) => {
107
79
  DatabaseArn: [],
108
80
  DatabaseId: [],
109
81
  }));
110
- return new protocol_http_1.HttpRequest({
111
- protocol,
112
- hostname,
113
- port,
114
- method: "POST",
115
- headers,
116
- path: resolvedPath,
117
- body,
118
- });
82
+ b.m("POST").h(headers).b(body);
83
+ return b.build();
119
84
  };
120
85
  exports.se_GetDatabaseCommand = se_GetDatabaseCommand;
121
86
  const se_GetOperationCommand = async (input, context) => {
122
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
87
+ const b = (0, core_1.requestBuilder)(input, context);
123
88
  const headers = {
124
89
  "content-type": "application/json",
125
90
  };
126
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-operation";
91
+ b.bp("/get-operation");
127
92
  let body;
128
93
  body = JSON.stringify((0, smithy_client_1.take)(input, {
129
94
  OperationId: [],
130
95
  }));
131
- return new protocol_http_1.HttpRequest({
132
- protocol,
133
- hostname,
134
- port,
135
- method: "POST",
136
- headers,
137
- path: resolvedPath,
138
- body,
139
- });
96
+ b.m("POST").h(headers).b(body);
97
+ return b.build();
140
98
  };
141
99
  exports.se_GetOperationCommand = se_GetOperationCommand;
142
100
  const se_GetResourcePermissionCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
101
+ const b = (0, core_1.requestBuilder)(input, context);
144
102
  const headers = {
145
103
  "content-type": "application/json",
146
104
  };
147
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-resource-permission";
105
+ b.bp("/get-resource-permission");
148
106
  let body;
149
107
  body = JSON.stringify((0, smithy_client_1.take)(input, {
150
108
  ActionType: [],
151
109
  ResourceArn: [],
152
110
  }));
153
- return new protocol_http_1.HttpRequest({
154
- protocol,
155
- hostname,
156
- port,
157
- method: "POST",
158
- headers,
159
- path: resolvedPath,
160
- body,
161
- });
111
+ b.m("POST").h(headers).b(body);
112
+ return b.build();
162
113
  };
163
114
  exports.se_GetResourcePermissionCommand = se_GetResourcePermissionCommand;
164
115
  const se_ListApplicationsCommand = async (input, context) => {
165
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = (0, core_1.requestBuilder)(input, context);
166
117
  const headers = {
167
118
  "content-type": "application/json",
168
119
  };
169
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-applications";
120
+ b.bp("/list-applications");
170
121
  let body;
171
122
  body = JSON.stringify((0, smithy_client_1.take)(input, {
172
123
  Filters: (_) => (0, smithy_client_1._json)(_),
173
124
  MaxResults: [],
174
125
  NextToken: [],
175
126
  }));
176
- return new protocol_http_1.HttpRequest({
177
- protocol,
178
- hostname,
179
- port,
180
- method: "POST",
181
- headers,
182
- path: resolvedPath,
183
- body,
184
- });
127
+ b.m("POST").h(headers).b(body);
128
+ return b.build();
185
129
  };
186
130
  exports.se_ListApplicationsCommand = se_ListApplicationsCommand;
187
131
  const se_ListComponentsCommand = async (input, context) => {
188
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
132
+ const b = (0, core_1.requestBuilder)(input, context);
189
133
  const headers = {
190
134
  "content-type": "application/json",
191
135
  };
192
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-components";
136
+ b.bp("/list-components");
193
137
  let body;
194
138
  body = JSON.stringify((0, smithy_client_1.take)(input, {
195
139
  ApplicationId: [],
196
140
  MaxResults: [],
197
141
  NextToken: [],
198
142
  }));
199
- return new protocol_http_1.HttpRequest({
200
- protocol,
201
- hostname,
202
- port,
203
- method: "POST",
204
- headers,
205
- path: resolvedPath,
206
- body,
207
- });
143
+ b.m("POST").h(headers).b(body);
144
+ return b.build();
208
145
  };
209
146
  exports.se_ListComponentsCommand = se_ListComponentsCommand;
210
147
  const se_ListDatabasesCommand = async (input, context) => {
211
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
+ const b = (0, core_1.requestBuilder)(input, context);
212
149
  const headers = {
213
150
  "content-type": "application/json",
214
151
  };
215
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-databases";
152
+ b.bp("/list-databases");
216
153
  let body;
217
154
  body = JSON.stringify((0, smithy_client_1.take)(input, {
218
155
  ApplicationId: [],
@@ -220,23 +157,16 @@ const se_ListDatabasesCommand = async (input, context) => {
220
157
  MaxResults: [],
221
158
  NextToken: [],
222
159
  }));
223
- return new protocol_http_1.HttpRequest({
224
- protocol,
225
- hostname,
226
- port,
227
- method: "POST",
228
- headers,
229
- path: resolvedPath,
230
- body,
231
- });
160
+ b.m("POST").h(headers).b(body);
161
+ return b.build();
232
162
  };
233
163
  exports.se_ListDatabasesCommand = se_ListDatabasesCommand;
234
164
  const se_ListOperationsCommand = async (input, context) => {
235
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
165
+ const b = (0, core_1.requestBuilder)(input, context);
236
166
  const headers = {
237
167
  "content-type": "application/json",
238
168
  };
239
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-operations";
169
+ b.bp("/list-operations");
240
170
  let body;
241
171
  body = JSON.stringify((0, smithy_client_1.take)(input, {
242
172
  ApplicationId: [],
@@ -244,63 +174,42 @@ const se_ListOperationsCommand = async (input, context) => {
244
174
  MaxResults: [],
245
175
  NextToken: [],
246
176
  }));
247
- return new protocol_http_1.HttpRequest({
248
- protocol,
249
- hostname,
250
- port,
251
- method: "POST",
252
- headers,
253
- path: resolvedPath,
254
- body,
255
- });
177
+ b.m("POST").h(headers).b(body);
178
+ return b.build();
256
179
  };
257
180
  exports.se_ListOperationsCommand = se_ListOperationsCommand;
258
181
  const se_ListTagsForResourceCommand = async (input, context) => {
259
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
182
+ const b = (0, core_1.requestBuilder)(input, context);
260
183
  const headers = {};
261
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
262
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
184
+ b.bp("/tags/{resourceArn}");
185
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
263
186
  let body;
264
- return new protocol_http_1.HttpRequest({
265
- protocol,
266
- hostname,
267
- port,
268
- method: "GET",
269
- headers,
270
- path: resolvedPath,
271
- body,
272
- });
187
+ b.m("GET").h(headers).b(body);
188
+ return b.build();
273
189
  };
274
190
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
275
191
  const se_PutResourcePermissionCommand = async (input, context) => {
276
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
192
+ const b = (0, core_1.requestBuilder)(input, context);
277
193
  const headers = {
278
194
  "content-type": "application/json",
279
195
  };
280
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-resource-permission";
196
+ b.bp("/put-resource-permission");
281
197
  let body;
282
198
  body = JSON.stringify((0, smithy_client_1.take)(input, {
283
199
  ActionType: [],
284
200
  ResourceArn: [],
285
201
  SourceResourceArn: [],
286
202
  }));
287
- return new protocol_http_1.HttpRequest({
288
- protocol,
289
- hostname,
290
- port,
291
- method: "POST",
292
- headers,
293
- path: resolvedPath,
294
- body,
295
- });
203
+ b.m("POST").h(headers).b(body);
204
+ return b.build();
296
205
  };
297
206
  exports.se_PutResourcePermissionCommand = se_PutResourcePermissionCommand;
298
207
  const se_RegisterApplicationCommand = async (input, context) => {
299
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
208
+ const b = (0, core_1.requestBuilder)(input, context);
300
209
  const headers = {
301
210
  "content-type": "application/json",
302
211
  };
303
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/register-application";
212
+ b.bp("/register-application");
304
213
  let body;
305
214
  body = JSON.stringify((0, smithy_client_1.take)(input, {
306
215
  ApplicationId: [],
@@ -312,90 +221,61 @@ const se_RegisterApplicationCommand = async (input, context) => {
312
221
  Sid: [],
313
222
  Tags: (_) => (0, smithy_client_1._json)(_),
314
223
  }));
315
- return new protocol_http_1.HttpRequest({
316
- protocol,
317
- hostname,
318
- port,
319
- method: "POST",
320
- headers,
321
- path: resolvedPath,
322
- body,
323
- });
224
+ b.m("POST").h(headers).b(body);
225
+ return b.build();
324
226
  };
325
227
  exports.se_RegisterApplicationCommand = se_RegisterApplicationCommand;
326
228
  const se_StartApplicationRefreshCommand = async (input, context) => {
327
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
229
+ const b = (0, core_1.requestBuilder)(input, context);
328
230
  const headers = {
329
231
  "content-type": "application/json",
330
232
  };
331
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-application-refresh";
233
+ b.bp("/start-application-refresh");
332
234
  let body;
333
235
  body = JSON.stringify((0, smithy_client_1.take)(input, {
334
236
  ApplicationId: [],
335
237
  }));
336
- return new protocol_http_1.HttpRequest({
337
- protocol,
338
- hostname,
339
- port,
340
- method: "POST",
341
- headers,
342
- path: resolvedPath,
343
- body,
344
- });
238
+ b.m("POST").h(headers).b(body);
239
+ return b.build();
345
240
  };
346
241
  exports.se_StartApplicationRefreshCommand = se_StartApplicationRefreshCommand;
347
242
  const se_TagResourceCommand = async (input, context) => {
348
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
243
+ const b = (0, core_1.requestBuilder)(input, context);
349
244
  const headers = {
350
245
  "content-type": "application/json",
351
246
  };
352
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
353
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
247
+ b.bp("/tags/{resourceArn}");
248
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
354
249
  let body;
355
250
  body = JSON.stringify((0, smithy_client_1.take)(input, {
356
251
  tags: (_) => (0, smithy_client_1._json)(_),
357
252
  }));
358
- return new protocol_http_1.HttpRequest({
359
- protocol,
360
- hostname,
361
- port,
362
- method: "POST",
363
- headers,
364
- path: resolvedPath,
365
- body,
366
- });
253
+ b.m("POST").h(headers).b(body);
254
+ return b.build();
367
255
  };
368
256
  exports.se_TagResourceCommand = se_TagResourceCommand;
369
257
  const se_UntagResourceCommand = async (input, context) => {
370
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
258
+ const b = (0, core_1.requestBuilder)(input, context);
371
259
  const headers = {};
372
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
373
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
260
+ b.bp("/tags/{resourceArn}");
261
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
374
262
  const query = (0, smithy_client_1.map)({
375
- tagKeys: [
263
+ [_tK]: [
376
264
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
377
- () => (input.tagKeys || []).map((_entry) => _entry),
265
+ () => (input[_tK] || []).map((_entry) => _entry),
378
266
  ],
379
267
  });
380
268
  let body;
381
- return new protocol_http_1.HttpRequest({
382
- protocol,
383
- hostname,
384
- port,
385
- method: "DELETE",
386
- headers,
387
- path: resolvedPath,
388
- query,
389
- body,
390
- });
269
+ b.m("DELETE").h(headers).q(query).b(body);
270
+ return b.build();
391
271
  };
392
272
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
393
273
  const se_UpdateApplicationSettingsCommand = async (input, context) => {
394
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const b = (0, core_1.requestBuilder)(input, context);
395
275
  const headers = {
396
276
  "content-type": "application/json",
397
277
  };
398
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-application-settings";
278
+ b.bp("/update-application-settings");
399
279
  let body;
400
280
  body = JSON.stringify((0, smithy_client_1.take)(input, {
401
281
  ApplicationId: [],
@@ -404,15 +284,8 @@ const se_UpdateApplicationSettingsCommand = async (input, context) => {
404
284
  CredentialsToRemove: (_) => (0, smithy_client_1._json)(_),
405
285
  DatabaseArn: [],
406
286
  }));
407
- return new protocol_http_1.HttpRequest({
408
- protocol,
409
- hostname,
410
- port,
411
- method: "POST",
412
- headers,
413
- path: resolvedPath,
414
- body,
415
- });
287
+ b.m("POST").h(headers).b(body);
288
+ return b.build();
416
289
  };
417
290
  exports.se_UpdateApplicationSettingsCommand = se_UpdateApplicationSettingsCommand;
418
291
  const de_DeleteResourcePermissionCommand = async (output, context) => {
@@ -1301,6 +1174,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1301
1174
  value !== "" &&
1302
1175
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1303
1176
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1177
+ const _tK = "tagKeys";
1304
1178
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1305
1179
  if (encoded.length) {
1306
1180
  return JSON.parse(encoded);
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListApplicationsCommand, } from "../commands/ListApplicationsCommand";
2
3
  import { SsmSapClient } from "../SsmSapClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListApplicationsCommand(input), ...args);
5
- };
6
- export async function* paginateListApplications(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof SsmSapClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected SsmSap | SsmSapClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListApplications = createPaginator(SsmSapClient, ListApplicationsCommand, "NextToken", "NextToken", "MaxResults");