@aws-sdk/client-synthetics 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.
Files changed (31) hide show
  1. package/dist-cjs/pagination/DescribeCanariesLastRunPaginator.js +2 -24
  2. package/dist-cjs/pagination/DescribeCanariesPaginator.js +2 -24
  3. package/dist-cjs/pagination/DescribeRuntimeVersionsPaginator.js +2 -24
  4. package/dist-cjs/pagination/GetCanaryRunsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListAssociatedGroupsPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListGroupResourcesPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListGroupsPaginator.js +2 -24
  8. package/dist-cjs/protocols/Aws_restJson1.js +107 -252
  9. package/dist-es/pagination/DescribeCanariesLastRunPaginator.js +2 -23
  10. package/dist-es/pagination/DescribeCanariesPaginator.js +2 -23
  11. package/dist-es/pagination/DescribeRuntimeVersionsPaginator.js +2 -23
  12. package/dist-es/pagination/GetCanaryRunsPaginator.js +2 -23
  13. package/dist-es/pagination/ListAssociatedGroupsPaginator.js +2 -23
  14. package/dist-es/pagination/ListGroupResourcesPaginator.js +2 -23
  15. package/dist-es/pagination/ListGroupsPaginator.js +2 -23
  16. package/dist-es/protocols/Aws_restJson1.js +108 -253
  17. package/dist-types/pagination/DescribeCanariesLastRunPaginator.d.ts +1 -1
  18. package/dist-types/pagination/DescribeCanariesPaginator.d.ts +1 -1
  19. package/dist-types/pagination/DescribeRuntimeVersionsPaginator.d.ts +1 -1
  20. package/dist-types/pagination/GetCanaryRunsPaginator.d.ts +1 -1
  21. package/dist-types/pagination/ListAssociatedGroupsPaginator.d.ts +1 -1
  22. package/dist-types/pagination/ListGroupResourcesPaginator.d.ts +1 -1
  23. package/dist-types/pagination/ListGroupsPaginator.d.ts +1 -1
  24. package/dist-types/ts3.4/pagination/DescribeCanariesLastRunPaginator.d.ts +3 -3
  25. package/dist-types/ts3.4/pagination/DescribeCanariesPaginator.d.ts +3 -3
  26. package/dist-types/ts3.4/pagination/DescribeRuntimeVersionsPaginator.d.ts +3 -3
  27. package/dist-types/ts3.4/pagination/GetCanaryRunsPaginator.d.ts +3 -3
  28. package/dist-types/ts3.4/pagination/ListAssociatedGroupsPaginator.d.ts +3 -3
  29. package/dist-types/ts3.4/pagination/ListGroupResourcesPaginator.d.ts +3 -3
  30. package/dist-types/ts3.4/pagination/ListGroupsPaginator.d.ts +3 -3
  31. package/package.json +7 -6
@@ -1,38 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateCanaryCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopCanaryCommand = exports.de_StartCanaryCommand = exports.de_ListTagsForResourceCommand = exports.de_ListGroupsCommand = exports.de_ListGroupResourcesCommand = exports.de_ListAssociatedGroupsCommand = exports.de_GetGroupCommand = exports.de_GetCanaryRunsCommand = exports.de_GetCanaryCommand = exports.de_DisassociateResourceCommand = exports.de_DescribeRuntimeVersionsCommand = exports.de_DescribeCanariesLastRunCommand = exports.de_DescribeCanariesCommand = exports.de_DeleteGroupCommand = exports.de_DeleteCanaryCommand = exports.de_CreateGroupCommand = exports.de_CreateCanaryCommand = exports.de_AssociateResourceCommand = exports.se_UpdateCanaryCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopCanaryCommand = exports.se_StartCanaryCommand = exports.se_ListTagsForResourceCommand = exports.se_ListGroupsCommand = exports.se_ListGroupResourcesCommand = exports.se_ListAssociatedGroupsCommand = exports.se_GetGroupCommand = exports.se_GetCanaryRunsCommand = exports.se_GetCanaryCommand = exports.se_DisassociateResourceCommand = exports.se_DescribeRuntimeVersionsCommand = exports.se_DescribeCanariesLastRunCommand = exports.se_DescribeCanariesCommand = exports.se_DeleteGroupCommand = exports.se_DeleteCanaryCommand = exports.se_CreateGroupCommand = exports.se_CreateCanaryCommand = exports.se_AssociateResourceCommand = 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 SyntheticsServiceException_1 = require("../models/SyntheticsServiceException");
8
8
  const se_AssociateResourceCommand = 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
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}/associate";
14
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
13
+ b.bp("/group/{GroupIdentifier}/associate");
14
+ b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  ResourceArn: [],
18
18
  }));
19
- return new protocol_http_1.HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "PATCH",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("PATCH").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  exports.se_AssociateResourceCommand = se_AssociateResourceCommand;
30
23
  const se_CreateCanaryCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = (0, core_1.requestBuilder)(input, context);
32
25
  const headers = {
33
26
  "content-type": "application/json",
34
27
  };
35
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary";
28
+ b.bp("/canary");
36
29
  let body;
37
30
  body = JSON.stringify((0, smithy_client_1.take)(input, {
38
31
  ArtifactConfig: (_) => (0, smithy_client_1._json)(_),
@@ -48,396 +41,261 @@ const se_CreateCanaryCommand = async (input, context) => {
48
41
  Tags: (_) => (0, smithy_client_1._json)(_),
49
42
  VpcConfig: (_) => (0, smithy_client_1._json)(_),
50
43
  }));
51
- return new protocol_http_1.HttpRequest({
52
- protocol,
53
- hostname,
54
- port,
55
- method: "POST",
56
- headers,
57
- path: resolvedPath,
58
- body,
59
- });
44
+ b.m("POST").h(headers).b(body);
45
+ return b.build();
60
46
  };
61
47
  exports.se_CreateCanaryCommand = se_CreateCanaryCommand;
62
48
  const se_CreateGroupCommand = async (input, context) => {
63
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
49
+ const b = (0, core_1.requestBuilder)(input, context);
64
50
  const headers = {
65
51
  "content-type": "application/json",
66
52
  };
67
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group";
53
+ b.bp("/group");
68
54
  let body;
69
55
  body = JSON.stringify((0, smithy_client_1.take)(input, {
70
56
  Name: [],
71
57
  Tags: (_) => (0, smithy_client_1._json)(_),
72
58
  }));
73
- return new protocol_http_1.HttpRequest({
74
- protocol,
75
- hostname,
76
- port,
77
- method: "POST",
78
- headers,
79
- path: resolvedPath,
80
- body,
81
- });
59
+ b.m("POST").h(headers).b(body);
60
+ return b.build();
82
61
  };
83
62
  exports.se_CreateGroupCommand = se_CreateGroupCommand;
84
63
  const se_DeleteCanaryCommand = async (input, context) => {
85
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
+ const b = (0, core_1.requestBuilder)(input, context);
86
65
  const headers = {};
87
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary/{Name}";
88
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
66
+ b.bp("/canary/{Name}");
67
+ b.p("Name", () => input.Name, "{Name}", false);
89
68
  const query = (0, smithy_client_1.map)({
90
- deleteLambda: [() => input.DeleteLambda !== void 0, () => input.DeleteLambda.toString()],
69
+ [_dL]: [() => input.DeleteLambda !== void 0, () => input[_DL].toString()],
91
70
  });
92
71
  let body;
93
- return new protocol_http_1.HttpRequest({
94
- protocol,
95
- hostname,
96
- port,
97
- method: "DELETE",
98
- headers,
99
- path: resolvedPath,
100
- query,
101
- body,
102
- });
72
+ b.m("DELETE").h(headers).q(query).b(body);
73
+ return b.build();
103
74
  };
104
75
  exports.se_DeleteCanaryCommand = se_DeleteCanaryCommand;
105
76
  const se_DeleteGroupCommand = async (input, context) => {
106
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = (0, core_1.requestBuilder)(input, context);
107
78
  const headers = {};
108
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}";
109
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
79
+ b.bp("/group/{GroupIdentifier}");
80
+ b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
110
81
  let body;
111
- return new protocol_http_1.HttpRequest({
112
- protocol,
113
- hostname,
114
- port,
115
- method: "DELETE",
116
- headers,
117
- path: resolvedPath,
118
- body,
119
- });
82
+ b.m("DELETE").h(headers).b(body);
83
+ return b.build();
120
84
  };
121
85
  exports.se_DeleteGroupCommand = se_DeleteGroupCommand;
122
86
  const se_DescribeCanariesCommand = async (input, context) => {
123
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
87
+ const b = (0, core_1.requestBuilder)(input, context);
124
88
  const headers = {
125
89
  "content-type": "application/json",
126
90
  };
127
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canaries";
91
+ b.bp("/canaries");
128
92
  let body;
129
93
  body = JSON.stringify((0, smithy_client_1.take)(input, {
130
94
  MaxResults: [],
131
95
  Names: (_) => (0, smithy_client_1._json)(_),
132
96
  NextToken: [],
133
97
  }));
134
- return new protocol_http_1.HttpRequest({
135
- protocol,
136
- hostname,
137
- port,
138
- method: "POST",
139
- headers,
140
- path: resolvedPath,
141
- body,
142
- });
98
+ b.m("POST").h(headers).b(body);
99
+ return b.build();
143
100
  };
144
101
  exports.se_DescribeCanariesCommand = se_DescribeCanariesCommand;
145
102
  const se_DescribeCanariesLastRunCommand = async (input, context) => {
146
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
103
+ const b = (0, core_1.requestBuilder)(input, context);
147
104
  const headers = {
148
105
  "content-type": "application/json",
149
106
  };
150
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canaries/last-run";
107
+ b.bp("/canaries/last-run");
151
108
  let body;
152
109
  body = JSON.stringify((0, smithy_client_1.take)(input, {
153
110
  MaxResults: [],
154
111
  Names: (_) => (0, smithy_client_1._json)(_),
155
112
  NextToken: [],
156
113
  }));
157
- return new protocol_http_1.HttpRequest({
158
- protocol,
159
- hostname,
160
- port,
161
- method: "POST",
162
- headers,
163
- path: resolvedPath,
164
- body,
165
- });
114
+ b.m("POST").h(headers).b(body);
115
+ return b.build();
166
116
  };
167
117
  exports.se_DescribeCanariesLastRunCommand = se_DescribeCanariesLastRunCommand;
168
118
  const se_DescribeRuntimeVersionsCommand = async (input, context) => {
169
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
119
+ const b = (0, core_1.requestBuilder)(input, context);
170
120
  const headers = {
171
121
  "content-type": "application/json",
172
122
  };
173
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/runtime-versions";
123
+ b.bp("/runtime-versions");
174
124
  let body;
175
125
  body = JSON.stringify((0, smithy_client_1.take)(input, {
176
126
  MaxResults: [],
177
127
  NextToken: [],
178
128
  }));
179
- return new protocol_http_1.HttpRequest({
180
- protocol,
181
- hostname,
182
- port,
183
- method: "POST",
184
- headers,
185
- path: resolvedPath,
186
- body,
187
- });
129
+ b.m("POST").h(headers).b(body);
130
+ return b.build();
188
131
  };
189
132
  exports.se_DescribeRuntimeVersionsCommand = se_DescribeRuntimeVersionsCommand;
190
133
  const se_DisassociateResourceCommand = async (input, context) => {
191
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
+ const b = (0, core_1.requestBuilder)(input, context);
192
135
  const headers = {
193
136
  "content-type": "application/json",
194
137
  };
195
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}/disassociate";
196
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
138
+ b.bp("/group/{GroupIdentifier}/disassociate");
139
+ b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
197
140
  let body;
198
141
  body = JSON.stringify((0, smithy_client_1.take)(input, {
199
142
  ResourceArn: [],
200
143
  }));
201
- return new protocol_http_1.HttpRequest({
202
- protocol,
203
- hostname,
204
- port,
205
- method: "PATCH",
206
- headers,
207
- path: resolvedPath,
208
- body,
209
- });
144
+ b.m("PATCH").h(headers).b(body);
145
+ return b.build();
210
146
  };
211
147
  exports.se_DisassociateResourceCommand = se_DisassociateResourceCommand;
212
148
  const se_GetCanaryCommand = async (input, context) => {
213
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = (0, core_1.requestBuilder)(input, context);
214
150
  const headers = {};
215
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary/{Name}";
216
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
151
+ b.bp("/canary/{Name}");
152
+ b.p("Name", () => input.Name, "{Name}", false);
217
153
  let body;
218
- return new protocol_http_1.HttpRequest({
219
- protocol,
220
- hostname,
221
- port,
222
- method: "GET",
223
- headers,
224
- path: resolvedPath,
225
- body,
226
- });
154
+ b.m("GET").h(headers).b(body);
155
+ return b.build();
227
156
  };
228
157
  exports.se_GetCanaryCommand = se_GetCanaryCommand;
229
158
  const se_GetCanaryRunsCommand = async (input, context) => {
230
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
159
+ const b = (0, core_1.requestBuilder)(input, context);
231
160
  const headers = {
232
161
  "content-type": "application/json",
233
162
  };
234
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary/{Name}/runs";
235
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
163
+ b.bp("/canary/{Name}/runs");
164
+ b.p("Name", () => input.Name, "{Name}", false);
236
165
  let body;
237
166
  body = JSON.stringify((0, smithy_client_1.take)(input, {
238
167
  MaxResults: [],
239
168
  NextToken: [],
240
169
  }));
241
- return new protocol_http_1.HttpRequest({
242
- protocol,
243
- hostname,
244
- port,
245
- method: "POST",
246
- headers,
247
- path: resolvedPath,
248
- body,
249
- });
170
+ b.m("POST").h(headers).b(body);
171
+ return b.build();
250
172
  };
251
173
  exports.se_GetCanaryRunsCommand = se_GetCanaryRunsCommand;
252
174
  const se_GetGroupCommand = async (input, context) => {
253
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
175
+ const b = (0, core_1.requestBuilder)(input, context);
254
176
  const headers = {};
255
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}";
256
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
177
+ b.bp("/group/{GroupIdentifier}");
178
+ b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
257
179
  let body;
258
- return new protocol_http_1.HttpRequest({
259
- protocol,
260
- hostname,
261
- port,
262
- method: "GET",
263
- headers,
264
- path: resolvedPath,
265
- body,
266
- });
180
+ b.m("GET").h(headers).b(body);
181
+ return b.build();
267
182
  };
268
183
  exports.se_GetGroupCommand = se_GetGroupCommand;
269
184
  const se_ListAssociatedGroupsCommand = async (input, context) => {
270
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
185
+ const b = (0, core_1.requestBuilder)(input, context);
271
186
  const headers = {
272
187
  "content-type": "application/json",
273
188
  };
274
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource/{ResourceArn}/groups";
275
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
189
+ b.bp("/resource/{ResourceArn}/groups");
190
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
276
191
  let body;
277
192
  body = JSON.stringify((0, smithy_client_1.take)(input, {
278
193
  MaxResults: [],
279
194
  NextToken: [],
280
195
  }));
281
- return new protocol_http_1.HttpRequest({
282
- protocol,
283
- hostname,
284
- port,
285
- method: "POST",
286
- headers,
287
- path: resolvedPath,
288
- body,
289
- });
196
+ b.m("POST").h(headers).b(body);
197
+ return b.build();
290
198
  };
291
199
  exports.se_ListAssociatedGroupsCommand = se_ListAssociatedGroupsCommand;
292
200
  const se_ListGroupResourcesCommand = async (input, context) => {
293
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
201
+ const b = (0, core_1.requestBuilder)(input, context);
294
202
  const headers = {
295
203
  "content-type": "application/json",
296
204
  };
297
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}/resources";
298
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
205
+ b.bp("/group/{GroupIdentifier}/resources");
206
+ b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
299
207
  let body;
300
208
  body = JSON.stringify((0, smithy_client_1.take)(input, {
301
209
  MaxResults: [],
302
210
  NextToken: [],
303
211
  }));
304
- return new protocol_http_1.HttpRequest({
305
- protocol,
306
- hostname,
307
- port,
308
- method: "POST",
309
- headers,
310
- path: resolvedPath,
311
- body,
312
- });
212
+ b.m("POST").h(headers).b(body);
213
+ return b.build();
313
214
  };
314
215
  exports.se_ListGroupResourcesCommand = se_ListGroupResourcesCommand;
315
216
  const se_ListGroupsCommand = async (input, context) => {
316
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
217
+ const b = (0, core_1.requestBuilder)(input, context);
317
218
  const headers = {
318
219
  "content-type": "application/json",
319
220
  };
320
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups";
221
+ b.bp("/groups");
321
222
  let body;
322
223
  body = JSON.stringify((0, smithy_client_1.take)(input, {
323
224
  MaxResults: [],
324
225
  NextToken: [],
325
226
  }));
326
- return new protocol_http_1.HttpRequest({
327
- protocol,
328
- hostname,
329
- port,
330
- method: "POST",
331
- headers,
332
- path: resolvedPath,
333
- body,
334
- });
227
+ b.m("POST").h(headers).b(body);
228
+ return b.build();
335
229
  };
336
230
  exports.se_ListGroupsCommand = se_ListGroupsCommand;
337
231
  const se_ListTagsForResourceCommand = async (input, context) => {
338
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
232
+ const b = (0, core_1.requestBuilder)(input, context);
339
233
  const headers = {};
340
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
341
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
234
+ b.bp("/tags/{ResourceArn}");
235
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
342
236
  let body;
343
- return new protocol_http_1.HttpRequest({
344
- protocol,
345
- hostname,
346
- port,
347
- method: "GET",
348
- headers,
349
- path: resolvedPath,
350
- body,
351
- });
237
+ b.m("GET").h(headers).b(body);
238
+ return b.build();
352
239
  };
353
240
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
354
241
  const se_StartCanaryCommand = async (input, context) => {
355
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
242
+ const b = (0, core_1.requestBuilder)(input, context);
356
243
  const headers = {};
357
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary/{Name}/start";
358
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
244
+ b.bp("/canary/{Name}/start");
245
+ b.p("Name", () => input.Name, "{Name}", false);
359
246
  let body;
360
- return new protocol_http_1.HttpRequest({
361
- protocol,
362
- hostname,
363
- port,
364
- method: "POST",
365
- headers,
366
- path: resolvedPath,
367
- body,
368
- });
247
+ b.m("POST").h(headers).b(body);
248
+ return b.build();
369
249
  };
370
250
  exports.se_StartCanaryCommand = se_StartCanaryCommand;
371
251
  const se_StopCanaryCommand = async (input, context) => {
372
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
252
+ const b = (0, core_1.requestBuilder)(input, context);
373
253
  const headers = {};
374
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary/{Name}/stop";
375
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
254
+ b.bp("/canary/{Name}/stop");
255
+ b.p("Name", () => input.Name, "{Name}", false);
376
256
  let body;
377
- return new protocol_http_1.HttpRequest({
378
- protocol,
379
- hostname,
380
- port,
381
- method: "POST",
382
- headers,
383
- path: resolvedPath,
384
- body,
385
- });
257
+ b.m("POST").h(headers).b(body);
258
+ return b.build();
386
259
  };
387
260
  exports.se_StopCanaryCommand = se_StopCanaryCommand;
388
261
  const se_TagResourceCommand = async (input, context) => {
389
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
262
+ const b = (0, core_1.requestBuilder)(input, context);
390
263
  const headers = {
391
264
  "content-type": "application/json",
392
265
  };
393
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
394
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
266
+ b.bp("/tags/{ResourceArn}");
267
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
395
268
  let body;
396
269
  body = JSON.stringify((0, smithy_client_1.take)(input, {
397
270
  Tags: (_) => (0, smithy_client_1._json)(_),
398
271
  }));
399
- return new protocol_http_1.HttpRequest({
400
- protocol,
401
- hostname,
402
- port,
403
- method: "POST",
404
- headers,
405
- path: resolvedPath,
406
- body,
407
- });
272
+ b.m("POST").h(headers).b(body);
273
+ return b.build();
408
274
  };
409
275
  exports.se_TagResourceCommand = se_TagResourceCommand;
410
276
  const se_UntagResourceCommand = async (input, context) => {
411
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
277
+ const b = (0, core_1.requestBuilder)(input, context);
412
278
  const headers = {};
413
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
414
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
279
+ b.bp("/tags/{ResourceArn}");
280
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
415
281
  const query = (0, smithy_client_1.map)({
416
- tagKeys: [
282
+ [_tK]: [
417
283
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
418
- () => (input.TagKeys || []).map((_entry) => _entry),
284
+ () => (input[_TK] || []).map((_entry) => _entry),
419
285
  ],
420
286
  });
421
287
  let body;
422
- return new protocol_http_1.HttpRequest({
423
- protocol,
424
- hostname,
425
- port,
426
- method: "DELETE",
427
- headers,
428
- path: resolvedPath,
429
- query,
430
- body,
431
- });
288
+ b.m("DELETE").h(headers).q(query).b(body);
289
+ return b.build();
432
290
  };
433
291
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
434
292
  const se_UpdateCanaryCommand = async (input, context) => {
435
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
293
+ const b = (0, core_1.requestBuilder)(input, context);
436
294
  const headers = {
437
295
  "content-type": "application/json",
438
296
  };
439
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary/{Name}";
440
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
297
+ b.bp("/canary/{Name}");
298
+ b.p("Name", () => input.Name, "{Name}", false);
441
299
  let body;
442
300
  body = JSON.stringify((0, smithy_client_1.take)(input, {
443
301
  ArtifactConfig: (_) => (0, smithy_client_1._json)(_),
@@ -452,15 +310,8 @@ const se_UpdateCanaryCommand = async (input, context) => {
452
310
  VisualReference: (_) => (0, smithy_client_1._json)(_),
453
311
  VpcConfig: (_) => (0, smithy_client_1._json)(_),
454
312
  }));
455
- return new protocol_http_1.HttpRequest({
456
- protocol,
457
- hostname,
458
- port,
459
- method: "PATCH",
460
- headers,
461
- path: resolvedPath,
462
- body,
463
- });
313
+ b.m("PATCH").h(headers).b(body);
314
+ return b.build();
464
315
  };
465
316
  exports.se_UpdateCanaryCommand = se_UpdateCanaryCommand;
466
317
  const de_AssociateResourceCommand = async (output, context) => {
@@ -1565,6 +1416,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1565
1416
  value !== "" &&
1566
1417
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1567
1418
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1419
+ const _DL = "DeleteLambda";
1420
+ const _TK = "TagKeys";
1421
+ const _dL = "deleteLambda";
1422
+ const _tK = "tagKeys";
1568
1423
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1569
1424
  if (encoded.length) {
1570
1425
  return JSON.parse(encoded);
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeCanariesLastRunCommand, } from "../commands/DescribeCanariesLastRunCommand";
2
3
  import { SyntheticsClient } from "../SyntheticsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeCanariesLastRunCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeCanariesLastRun(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 SyntheticsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Synthetics | SyntheticsClient");
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 paginateDescribeCanariesLastRun = createPaginator(SyntheticsClient, DescribeCanariesLastRunCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeCanariesCommand, } from "../commands/DescribeCanariesCommand";
2
3
  import { SyntheticsClient } from "../SyntheticsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeCanariesCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeCanaries(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 SyntheticsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Synthetics | SyntheticsClient");
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 paginateDescribeCanaries = createPaginator(SyntheticsClient, DescribeCanariesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeRuntimeVersionsCommand, } from "../commands/DescribeRuntimeVersionsCommand";
2
3
  import { SyntheticsClient } from "../SyntheticsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeRuntimeVersionsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeRuntimeVersions(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 SyntheticsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Synthetics | SyntheticsClient");
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 paginateDescribeRuntimeVersions = createPaginator(SyntheticsClient, DescribeRuntimeVersionsCommand, "NextToken", "NextToken", "MaxResults");