@aws-sdk/client-inspector2 3.200.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 CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.201.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.200.0...v3.201.0) (2022-11-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * end support for Node.js 12.x ([#4123](https://github.com/aws/aws-sdk-js-v3/issues/4123)) ([83f913e](https://github.com/aws/aws-sdk-js-v3/commit/83f913ec2ac3878d8726c6964f585550dc5caf3e))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-inspector2
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveClientEndpointParameters = void 0;
4
4
  const resolveClientEndpointParameters = (options) => {
5
- var _a, _b;
6
5
  return {
7
6
  ...options,
8
- useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false,
9
- useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false,
7
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
8
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
10
9
  defaultSigningName: "inspector2",
11
10
  };
12
11
  };
@@ -12,7 +12,7 @@ const serializeAws_restJson1AssociateMemberCommand = async (input, context) => {
12
12
  const headers = {
13
13
  "content-type": "application/json",
14
14
  };
15
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/members/associate";
15
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/associate";
16
16
  let body;
17
17
  body = JSON.stringify({
18
18
  ...(input.accountId != null && { accountId: input.accountId }),
@@ -33,7 +33,7 @@ const serializeAws_restJson1BatchGetAccountStatusCommand = async (input, context
33
33
  const headers = {
34
34
  "content-type": "application/json",
35
35
  };
36
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/status/batch/get";
36
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/status/batch/get";
37
37
  let body;
38
38
  body = JSON.stringify({
39
39
  ...(input.accountIds != null && { accountIds: serializeAws_restJson1AccountIdSet(input.accountIds, context) }),
@@ -54,7 +54,7 @@ const serializeAws_restJson1BatchGetFreeTrialInfoCommand = async (input, context
54
54
  const headers = {
55
55
  "content-type": "application/json",
56
56
  };
57
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/freetrialinfo/batchget";
57
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/freetrialinfo/batchget";
58
58
  let body;
59
59
  body = JSON.stringify({
60
60
  ...(input.accountIds != null && {
@@ -77,7 +77,7 @@ const serializeAws_restJson1CancelFindingsReportCommand = async (input, context)
77
77
  const headers = {
78
78
  "content-type": "application/json",
79
79
  };
80
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/cancel";
80
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/cancel";
81
81
  let body;
82
82
  body = JSON.stringify({
83
83
  ...(input.reportId != null && { reportId: input.reportId }),
@@ -98,7 +98,7 @@ const serializeAws_restJson1CreateFilterCommand = async (input, context) => {
98
98
  const headers = {
99
99
  "content-type": "application/json",
100
100
  };
101
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/filters/create";
101
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/create";
102
102
  let body;
103
103
  body = JSON.stringify({
104
104
  ...(input.action != null && { action: input.action }),
@@ -126,7 +126,7 @@ const serializeAws_restJson1CreateFindingsReportCommand = async (input, context)
126
126
  const headers = {
127
127
  "content-type": "application/json",
128
128
  };
129
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/create";
129
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/create";
130
130
  let body;
131
131
  body = JSON.stringify({
132
132
  ...(input.filterCriteria != null && {
@@ -153,7 +153,7 @@ const serializeAws_restJson1DeleteFilterCommand = async (input, context) => {
153
153
  const headers = {
154
154
  "content-type": "application/json",
155
155
  };
156
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/filters/delete";
156
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/delete";
157
157
  let body;
158
158
  body = JSON.stringify({
159
159
  ...(input.arn != null && { arn: input.arn }),
@@ -174,7 +174,7 @@ const serializeAws_restJson1DescribeOrganizationConfigurationCommand = async (in
174
174
  const headers = {
175
175
  "content-type": "application/json",
176
176
  };
177
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/organizationconfiguration/describe";
177
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organizationconfiguration/describe";
178
178
  let body;
179
179
  body = "";
180
180
  return new protocol_http_1.HttpRequest({
@@ -193,7 +193,7 @@ const serializeAws_restJson1DisableCommand = async (input, context) => {
193
193
  const headers = {
194
194
  "content-type": "application/json",
195
195
  };
196
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/disable";
196
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disable";
197
197
  let body;
198
198
  body = JSON.stringify({
199
199
  ...(input.accountIds != null && { accountIds: serializeAws_restJson1AccountIdSet(input.accountIds, context) }),
@@ -217,7 +217,7 @@ const serializeAws_restJson1DisableDelegatedAdminAccountCommand = async (input,
217
217
  const headers = {
218
218
  "content-type": "application/json",
219
219
  };
220
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/disable";
220
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/disable";
221
221
  let body;
222
222
  body = JSON.stringify({
223
223
  ...(input.delegatedAdminAccountId != null && { delegatedAdminAccountId: input.delegatedAdminAccountId }),
@@ -238,7 +238,7 @@ const serializeAws_restJson1DisassociateMemberCommand = async (input, context) =
238
238
  const headers = {
239
239
  "content-type": "application/json",
240
240
  };
241
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/members/disassociate";
241
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/disassociate";
242
242
  let body;
243
243
  body = JSON.stringify({
244
244
  ...(input.accountId != null && { accountId: input.accountId }),
@@ -255,16 +255,15 @@ const serializeAws_restJson1DisassociateMemberCommand = async (input, context) =
255
255
  };
256
256
  exports.serializeAws_restJson1DisassociateMemberCommand = serializeAws_restJson1DisassociateMemberCommand;
257
257
  const serializeAws_restJson1EnableCommand = async (input, context) => {
258
- var _a;
259
258
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
260
259
  const headers = {
261
260
  "content-type": "application/json",
262
261
  };
263
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/enable";
262
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enable";
264
263
  let body;
265
264
  body = JSON.stringify({
266
265
  ...(input.accountIds != null && { accountIds: serializeAws_restJson1AccountIdSet(input.accountIds, context) }),
267
- clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
266
+ clientToken: input.clientToken ?? (0, uuid_1.v4)(),
268
267
  ...(input.resourceTypes != null && {
269
268
  resourceTypes: serializeAws_restJson1EnableResourceTypeList(input.resourceTypes, context),
270
269
  }),
@@ -281,15 +280,14 @@ const serializeAws_restJson1EnableCommand = async (input, context) => {
281
280
  };
282
281
  exports.serializeAws_restJson1EnableCommand = serializeAws_restJson1EnableCommand;
283
282
  const serializeAws_restJson1EnableDelegatedAdminAccountCommand = async (input, context) => {
284
- var _a;
285
283
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
286
284
  const headers = {
287
285
  "content-type": "application/json",
288
286
  };
289
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/enable";
287
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/enable";
290
288
  let body;
291
289
  body = JSON.stringify({
292
- clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
290
+ clientToken: input.clientToken ?? (0, uuid_1.v4)(),
293
291
  ...(input.delegatedAdminAccountId != null && { delegatedAdminAccountId: input.delegatedAdminAccountId }),
294
292
  });
295
293
  return new protocol_http_1.HttpRequest({
@@ -308,7 +306,7 @@ const serializeAws_restJson1GetConfigurationCommand = async (input, context) =>
308
306
  const headers = {
309
307
  "content-type": "application/json",
310
308
  };
311
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/get";
309
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/get";
312
310
  let body;
313
311
  body = "";
314
312
  return new protocol_http_1.HttpRequest({
@@ -327,7 +325,7 @@ const serializeAws_restJson1GetDelegatedAdminAccountCommand = async (input, cont
327
325
  const headers = {
328
326
  "content-type": "application/json",
329
327
  };
330
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/get";
328
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/get";
331
329
  let body;
332
330
  body = "";
333
331
  return new protocol_http_1.HttpRequest({
@@ -346,7 +344,7 @@ const serializeAws_restJson1GetFindingsReportStatusCommand = async (input, conte
346
344
  const headers = {
347
345
  "content-type": "application/json",
348
346
  };
349
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/status/get";
347
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/status/get";
350
348
  let body;
351
349
  body = JSON.stringify({
352
350
  ...(input.reportId != null && { reportId: input.reportId }),
@@ -367,7 +365,7 @@ const serializeAws_restJson1GetMemberCommand = async (input, context) => {
367
365
  const headers = {
368
366
  "content-type": "application/json",
369
367
  };
370
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/members/get";
368
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/get";
371
369
  let body;
372
370
  body = JSON.stringify({
373
371
  ...(input.accountId != null && { accountId: input.accountId }),
@@ -388,7 +386,7 @@ const serializeAws_restJson1ListAccountPermissionsCommand = async (input, contex
388
386
  const headers = {
389
387
  "content-type": "application/json",
390
388
  };
391
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/accountpermissions/list";
389
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accountpermissions/list";
392
390
  let body;
393
391
  body = JSON.stringify({
394
392
  ...(input.maxResults != null && { maxResults: input.maxResults }),
@@ -411,7 +409,7 @@ const serializeAws_restJson1ListCoverageCommand = async (input, context) => {
411
409
  const headers = {
412
410
  "content-type": "application/json",
413
411
  };
414
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/coverage/list";
412
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/coverage/list";
415
413
  let body;
416
414
  body = JSON.stringify({
417
415
  ...(input.filterCriteria != null && {
@@ -436,7 +434,7 @@ const serializeAws_restJson1ListCoverageStatisticsCommand = async (input, contex
436
434
  const headers = {
437
435
  "content-type": "application/json",
438
436
  };
439
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/coverage/statistics/list";
437
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/coverage/statistics/list";
440
438
  let body;
441
439
  body = JSON.stringify({
442
440
  ...(input.filterCriteria != null && {
@@ -461,7 +459,7 @@ const serializeAws_restJson1ListDelegatedAdminAccountsCommand = async (input, co
461
459
  const headers = {
462
460
  "content-type": "application/json",
463
461
  };
464
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/list";
462
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/list";
465
463
  let body;
466
464
  body = JSON.stringify({
467
465
  ...(input.maxResults != null && { maxResults: input.maxResults }),
@@ -483,7 +481,7 @@ const serializeAws_restJson1ListFiltersCommand = async (input, context) => {
483
481
  const headers = {
484
482
  "content-type": "application/json",
485
483
  };
486
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/filters/list";
484
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/list";
487
485
  let body;
488
486
  body = JSON.stringify({
489
487
  ...(input.action != null && { action: input.action }),
@@ -507,7 +505,7 @@ const serializeAws_restJson1ListFindingAggregationsCommand = async (input, conte
507
505
  const headers = {
508
506
  "content-type": "application/json",
509
507
  };
510
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/findings/aggregation/list";
508
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/aggregation/list";
511
509
  let body;
512
510
  body = JSON.stringify({
513
511
  ...(input.accountIds != null && { accountIds: serializeAws_restJson1StringFilterList(input.accountIds, context) }),
@@ -534,7 +532,7 @@ const serializeAws_restJson1ListFindingsCommand = async (input, context) => {
534
532
  const headers = {
535
533
  "content-type": "application/json",
536
534
  };
537
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/findings/list";
535
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/list";
538
536
  let body;
539
537
  body = JSON.stringify({
540
538
  ...(input.filterCriteria != null && {
@@ -562,7 +560,7 @@ const serializeAws_restJson1ListMembersCommand = async (input, context) => {
562
560
  const headers = {
563
561
  "content-type": "application/json",
564
562
  };
565
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/members/list";
563
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/list";
566
564
  let body;
567
565
  body = JSON.stringify({
568
566
  ...(input.maxResults != null && { maxResults: input.maxResults }),
@@ -583,7 +581,7 @@ exports.serializeAws_restJson1ListMembersCommand = serializeAws_restJson1ListMem
583
581
  const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
584
582
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
585
583
  const headers = {};
586
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
584
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
587
585
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
588
586
  let body;
589
587
  return new protocol_http_1.HttpRequest({
@@ -602,7 +600,7 @@ const serializeAws_restJson1ListUsageTotalsCommand = async (input, context) => {
602
600
  const headers = {
603
601
  "content-type": "application/json",
604
602
  };
605
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usage/list";
603
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usage/list";
606
604
  let body;
607
605
  body = JSON.stringify({
608
606
  ...(input.accountIds != null && {
@@ -627,7 +625,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
627
625
  const headers = {
628
626
  "content-type": "application/json",
629
627
  };
630
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
628
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
631
629
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
632
630
  let body;
633
631
  body = JSON.stringify({
@@ -647,7 +645,7 @@ exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagReso
647
645
  const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
648
646
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
649
647
  const headers = {};
650
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
648
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
651
649
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
652
650
  const query = map({
653
651
  tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
@@ -670,7 +668,7 @@ const serializeAws_restJson1UpdateConfigurationCommand = async (input, context)
670
668
  const headers = {
671
669
  "content-type": "application/json",
672
670
  };
673
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/update";
671
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/update";
674
672
  let body;
675
673
  body = JSON.stringify({
676
674
  ...(input.ecrConfiguration != null && {
@@ -693,7 +691,7 @@ const serializeAws_restJson1UpdateFilterCommand = async (input, context) => {
693
691
  const headers = {
694
692
  "content-type": "application/json",
695
693
  };
696
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/filters/update";
694
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/update";
697
695
  let body;
698
696
  body = JSON.stringify({
699
697
  ...(input.action != null && { action: input.action }),
@@ -721,7 +719,7 @@ const serializeAws_restJson1UpdateOrganizationConfigurationCommand = async (inpu
721
719
  const headers = {
722
720
  "content-type": "application/json",
723
721
  };
724
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/organizationconfiguration/update";
722
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organizationconfiguration/update";
725
723
  let body;
726
724
  body = JSON.stringify({
727
725
  ...(input.autoEnable != null && { autoEnable: serializeAws_restJson1AutoEnable(input.autoEnable, context) }),
@@ -3807,15 +3805,12 @@ const deserializeAws_restJson1VulnerablePackageList = (output, context) => {
3807
3805
  });
3808
3806
  return retVal;
3809
3807
  };
3810
- const deserializeMetadata = (output) => {
3811
- var _a, _b;
3812
- return ({
3813
- httpStatusCode: output.statusCode,
3814
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
3815
- extendedRequestId: output.headers["x-amz-id-2"],
3816
- cfId: output.headers["x-amz-cf-id"],
3817
- });
3818
- };
3808
+ const deserializeMetadata = (output) => ({
3809
+ httpStatusCode: output.statusCode,
3810
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3811
+ extendedRequestId: output.headers["x-amz-id-2"],
3812
+ cfId: output.headers["x-amz-cf-id"],
3813
+ });
3819
3814
  const collectBody = (streamBody = new Uint8Array(), context) => {
3820
3815
  if (streamBody instanceof Uint8Array) {
3821
3816
  return Promise.resolve(streamBody);
@@ -3835,9 +3830,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3835
3830
  return {};
3836
3831
  });
3837
3832
  const parseErrorBody = async (errorBody, context) => {
3838
- var _a;
3839
3833
  const value = await parseBody(errorBody, context);
3840
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3834
+ value.message = value.message ?? value.Message;
3841
3835
  return value;
3842
3836
  };
3843
3837
  const loadRestJsonErrorCode = (output, data) => {
@@ -16,7 +16,6 @@ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
16
  const smithy_client_1 = require("@aws-sdk/smithy-client");
17
17
  const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
18
18
  const getRuntimeConfig = (config) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20
19
  const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
21
20
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
21
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
@@ -25,21 +24,22 @@ const getRuntimeConfig = (config) => {
25
24
  ...config,
26
25
  runtime: "browser",
27
26
  defaultsMode,
28
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
29
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
30
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
31
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : ((_) => () => Promise.reject(new Error("Credential is missing"))),
32
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
- region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
38
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
39
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.fromUtf8,
42
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.toUtf8,
27
+ base64Decoder: config?.base64Decoder ?? util_base64_browser_1.fromBase64,
28
+ base64Encoder: config?.base64Encoder ?? util_base64_browser_1.toBase64,
29
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
30
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
31
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
+ (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
+ maxAttempts: config?.maxAttempts ?? middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
38
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
39
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
42
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
43
43
  };
44
44
  };
45
45
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -19,7 +19,6 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
19
  const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
20
20
  const smithy_client_2 = require("@aws-sdk/smithy-client");
21
21
  const getRuntimeConfig = (config) => {
22
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
23
22
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
24
23
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
25
24
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
@@ -29,24 +28,26 @@ const getRuntimeConfig = (config) => {
29
28
  ...config,
30
29
  runtime: "node",
31
30
  defaultsMode,
32
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
33
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
34
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
35
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
36
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
- region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
39
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
40
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)({
41
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
42
- default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
43
- }),
44
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
45
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
46
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
47
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
48
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
49
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
31
+ base64Decoder: config?.base64Decoder ?? util_base64_node_1.fromBase64,
32
+ base64Encoder: config?.base64Encoder ?? util_base64_node_1.toBase64,
33
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
34
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
35
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
36
+ (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
39
+ requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
40
+ retryMode: config?.retryMode ??
41
+ (0, node_config_provider_1.loadConfig)({
42
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
43
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
44
+ }),
45
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
46
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
47
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
48
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
49
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_node_1.fromUtf8,
50
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_node_1.toUtf8,
50
51
  };
51
52
  };
52
53
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -4,13 +4,12 @@ exports.getRuntimeConfig = void 0;
4
4
  const sha256_js_1 = require("@aws-crypto/sha256-js");
5
5
  const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
6
  const getRuntimeConfig = (config) => {
7
- var _a;
8
7
  const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
9
8
  return {
10
9
  ...browserDefaults,
11
10
  ...config,
12
11
  runtime: "react-native",
13
- sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : sha256_js_1.Sha256,
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
14
13
  };
15
14
  };
16
15
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -3,15 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const url_parser_1 = require("@aws-sdk/url-parser");
5
5
  const endpointResolver_1 = require("./endpoint/endpointResolver");
6
- const getRuntimeConfig = (config) => {
7
- var _a, _b, _c, _d, _e;
8
- return ({
9
- apiVersion: "2020-06-08",
10
- disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
11
- endpointProvider: (_b = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _b !== void 0 ? _b : endpointResolver_1.defaultEndpointResolver,
12
- logger: (_c = config === null || config === void 0 ? void 0 : config.logger) !== null && _c !== void 0 ? _c : {},
13
- serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "Inspector2",
14
- urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
15
- });
16
- };
6
+ const getRuntimeConfig = (config) => ({
7
+ apiVersion: "2020-06-08",
8
+ disableHostPrefix: config?.disableHostPrefix ?? false,
9
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
10
+ logger: config?.logger ?? {},
11
+ serviceId: config?.serviceId ?? "Inspector2",
12
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
13
+ });
17
14
  exports.getRuntimeConfig = getRuntimeConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-inspector2",
3
3
  "description": "AWS SDK for JavaScript Inspector2 Client for Node.js, Browser and React Native",
4
- "version": "3.200.0",
4
+ "version": "3.201.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,45 +19,45 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.200.0",
23
- "@aws-sdk/config-resolver": "3.200.0",
24
- "@aws-sdk/credential-provider-node": "3.200.0",
25
- "@aws-sdk/fetch-http-handler": "3.200.0",
26
- "@aws-sdk/hash-node": "3.200.0",
27
- "@aws-sdk/invalid-dependency": "3.200.0",
28
- "@aws-sdk/middleware-content-length": "3.200.0",
29
- "@aws-sdk/middleware-endpoint": "3.200.0",
30
- "@aws-sdk/middleware-host-header": "3.200.0",
31
- "@aws-sdk/middleware-logger": "3.200.0",
32
- "@aws-sdk/middleware-recursion-detection": "3.200.0",
33
- "@aws-sdk/middleware-retry": "3.200.0",
34
- "@aws-sdk/middleware-serde": "3.200.0",
35
- "@aws-sdk/middleware-signing": "3.200.0",
36
- "@aws-sdk/middleware-stack": "3.200.0",
37
- "@aws-sdk/middleware-user-agent": "3.200.0",
38
- "@aws-sdk/node-config-provider": "3.200.0",
39
- "@aws-sdk/node-http-handler": "3.200.0",
40
- "@aws-sdk/protocol-http": "3.200.0",
41
- "@aws-sdk/smithy-client": "3.200.0",
42
- "@aws-sdk/types": "3.200.0",
43
- "@aws-sdk/url-parser": "3.200.0",
22
+ "@aws-sdk/client-sts": "3.201.0",
23
+ "@aws-sdk/config-resolver": "3.201.0",
24
+ "@aws-sdk/credential-provider-node": "3.201.0",
25
+ "@aws-sdk/fetch-http-handler": "3.201.0",
26
+ "@aws-sdk/hash-node": "3.201.0",
27
+ "@aws-sdk/invalid-dependency": "3.201.0",
28
+ "@aws-sdk/middleware-content-length": "3.201.0",
29
+ "@aws-sdk/middleware-endpoint": "3.201.0",
30
+ "@aws-sdk/middleware-host-header": "3.201.0",
31
+ "@aws-sdk/middleware-logger": "3.201.0",
32
+ "@aws-sdk/middleware-recursion-detection": "3.201.0",
33
+ "@aws-sdk/middleware-retry": "3.201.0",
34
+ "@aws-sdk/middleware-serde": "3.201.0",
35
+ "@aws-sdk/middleware-signing": "3.201.0",
36
+ "@aws-sdk/middleware-stack": "3.201.0",
37
+ "@aws-sdk/middleware-user-agent": "3.201.0",
38
+ "@aws-sdk/node-config-provider": "3.201.0",
39
+ "@aws-sdk/node-http-handler": "3.201.0",
40
+ "@aws-sdk/protocol-http": "3.201.0",
41
+ "@aws-sdk/smithy-client": "3.201.0",
42
+ "@aws-sdk/types": "3.201.0",
43
+ "@aws-sdk/url-parser": "3.201.0",
44
44
  "@aws-sdk/util-base64-browser": "3.188.0",
45
- "@aws-sdk/util-base64-node": "3.188.0",
45
+ "@aws-sdk/util-base64-node": "3.201.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
- "@aws-sdk/util-body-length-node": "3.188.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.200.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.200.0",
50
- "@aws-sdk/util-endpoints": "3.200.0",
51
- "@aws-sdk/util-user-agent-browser": "3.200.0",
52
- "@aws-sdk/util-user-agent-node": "3.200.0",
47
+ "@aws-sdk/util-body-length-node": "3.201.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.201.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.201.0",
50
+ "@aws-sdk/util-endpoints": "3.201.0",
51
+ "@aws-sdk/util-user-agent-browser": "3.201.0",
52
+ "@aws-sdk/util-user-agent-node": "3.201.0",
53
53
  "@aws-sdk/util-utf8-browser": "3.188.0",
54
- "@aws-sdk/util-utf8-node": "3.199.0",
54
+ "@aws-sdk/util-utf8-node": "3.201.0",
55
55
  "tslib": "^2.3.1",
56
56
  "uuid": "^8.3.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@aws-sdk/service-client-documentation-generator": "3.188.0",
60
- "@tsconfig/recommended": "1.0.1",
60
+ "@tsconfig/node14": "1.0.3",
61
61
  "@types/node": "^12.7.5",
62
62
  "@types/uuid": "^8.3.0",
63
63
  "concurrently": "7.0.0",
@@ -72,7 +72,7 @@
72
72
  }
73
73
  },
74
74
  "engines": {
75
- "node": ">=12.0.0"
75
+ "node": ">=14.0.0"
76
76
  },
77
77
  "typesVersions": {
78
78
  "<4.0": {