@aws-sdk/client-amp 3.121.0 → 3.130.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,33 @@
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.130.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.129.0...v3.130.0) (2022-07-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **codegen:** fix error code parsing when it's a number ([#3371](https://github.com/aws/aws-sdk-js-v3/issues/3371)) ([c2d8522](https://github.com/aws/aws-sdk-js-v3/commit/c2d852279a3d23958521a6ceb4f4c642b0cb1848))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-amp
20
+
21
+
22
+
23
+
24
+
25
+ # [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-amp
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
7
34
 
8
35
 
@@ -27,7 +27,7 @@ const serializeAws_restJson1CreateAlertManagerDefinitionCommand = async (input,
27
27
  let body;
28
28
  body = JSON.stringify({
29
29
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
30
- ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }),
30
+ ...(input.data != null && { data: context.base64Encoder(input.data) }),
31
31
  });
32
32
  return new protocol_http_1.HttpRequest({
33
33
  protocol,
@@ -61,9 +61,9 @@ const serializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (input, con
61
61
  let body;
62
62
  body = JSON.stringify({
63
63
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
64
- ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }),
65
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
66
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
64
+ ...(input.data != null && { data: context.base64Encoder(input.data) }),
65
+ ...(input.name != null && { name: input.name }),
66
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
67
67
  });
68
68
  return new protocol_http_1.HttpRequest({
69
69
  protocol,
@@ -85,9 +85,9 @@ const serializeAws_restJson1CreateWorkspaceCommand = async (input, context) => {
85
85
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
86
86
  let body;
87
87
  body = JSON.stringify({
88
- ...(input.alias !== undefined && input.alias !== null && { alias: input.alias }),
88
+ ...(input.alias != null && { alias: input.alias }),
89
89
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
90
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
90
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
91
91
  });
92
92
  return new protocol_http_1.HttpRequest({
93
93
  protocol,
@@ -394,7 +394,7 @@ const serializeAws_restJson1PutAlertManagerDefinitionCommand = async (input, con
394
394
  let body;
395
395
  body = JSON.stringify({
396
396
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
397
- ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }),
397
+ ...(input.data != null && { data: context.base64Encoder(input.data) }),
398
398
  });
399
399
  return new protocol_http_1.HttpRequest({
400
400
  protocol,
@@ -438,7 +438,7 @@ const serializeAws_restJson1PutRuleGroupsNamespaceCommand = async (input, contex
438
438
  let body;
439
439
  body = JSON.stringify({
440
440
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
441
- ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }),
441
+ ...(input.data != null && { data: context.base64Encoder(input.data) }),
442
442
  });
443
443
  return new protocol_http_1.HttpRequest({
444
444
  protocol,
@@ -469,7 +469,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
469
469
  }
470
470
  let body;
471
471
  body = JSON.stringify({
472
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
472
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
473
473
  });
474
474
  return new protocol_http_1.HttpRequest({
475
475
  protocol,
@@ -531,7 +531,7 @@ const serializeAws_restJson1UpdateWorkspaceAliasCommand = async (input, context)
531
531
  }
532
532
  let body;
533
533
  body = JSON.stringify({
534
- ...(input.alias !== undefined && input.alias !== null && { alias: input.alias }),
534
+ ...(input.alias != null && { alias: input.alias }),
535
535
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
536
536
  });
537
537
  return new protocol_http_1.HttpRequest({
@@ -1593,16 +1593,10 @@ const serializeAws_restJson1TagMap = (input, context) => {
1593
1593
  };
1594
1594
  const deserializeAws_restJson1AlertManagerDefinitionDescription = (output, context) => {
1595
1595
  return {
1596
- createdAt: output.createdAt !== undefined && output.createdAt !== null
1597
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
1598
- : undefined,
1599
- data: output.data !== undefined && output.data !== null ? context.base64Decoder(output.data) : undefined,
1600
- modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
1601
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt)))
1602
- : undefined,
1603
- status: output.status !== undefined && output.status !== null
1604
- ? deserializeAws_restJson1AlertManagerDefinitionStatus(output.status, context)
1605
- : undefined,
1596
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1597
+ data: output.data != null ? context.base64Decoder(output.data) : undefined,
1598
+ modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
1599
+ status: output.status != null ? deserializeAws_restJson1AlertManagerDefinitionStatus(output.status, context) : undefined,
1606
1600
  };
1607
1601
  };
1608
1602
  const deserializeAws_restJson1AlertManagerDefinitionStatus = (output, context) => {
@@ -1614,20 +1608,12 @@ const deserializeAws_restJson1AlertManagerDefinitionStatus = (output, context) =
1614
1608
  const deserializeAws_restJson1RuleGroupsNamespaceDescription = (output, context) => {
1615
1609
  return {
1616
1610
  arn: (0, smithy_client_1.expectString)(output.arn),
1617
- createdAt: output.createdAt !== undefined && output.createdAt !== null
1618
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
1619
- : undefined,
1620
- data: output.data !== undefined && output.data !== null ? context.base64Decoder(output.data) : undefined,
1621
- modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
1622
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt)))
1623
- : undefined,
1611
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1612
+ data: output.data != null ? context.base64Decoder(output.data) : undefined,
1613
+ modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
1624
1614
  name: (0, smithy_client_1.expectString)(output.name),
1625
- status: output.status !== undefined && output.status !== null
1626
- ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context)
1627
- : undefined,
1628
- tags: output.tags !== undefined && output.tags !== null
1629
- ? deserializeAws_restJson1TagMap(output.tags, context)
1630
- : undefined,
1615
+ status: output.status != null ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context) : undefined,
1616
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1631
1617
  };
1632
1618
  };
1633
1619
  const deserializeAws_restJson1RuleGroupsNamespaceStatus = (output, context) => {
@@ -1639,19 +1625,11 @@ const deserializeAws_restJson1RuleGroupsNamespaceStatus = (output, context) => {
1639
1625
  const deserializeAws_restJson1RuleGroupsNamespaceSummary = (output, context) => {
1640
1626
  return {
1641
1627
  arn: (0, smithy_client_1.expectString)(output.arn),
1642
- createdAt: output.createdAt !== undefined && output.createdAt !== null
1643
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
1644
- : undefined,
1645
- modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
1646
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt)))
1647
- : undefined,
1628
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1629
+ modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
1648
1630
  name: (0, smithy_client_1.expectString)(output.name),
1649
- status: output.status !== undefined && output.status !== null
1650
- ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context)
1651
- : undefined,
1652
- tags: output.tags !== undefined && output.tags !== null
1653
- ? deserializeAws_restJson1TagMap(output.tags, context)
1654
- : undefined,
1631
+ status: output.status != null ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context) : undefined,
1632
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1655
1633
  };
1656
1634
  };
1657
1635
  const deserializeAws_restJson1RuleGroupsNamespaceSummaryList = (output, context) => {
@@ -1697,16 +1675,10 @@ const deserializeAws_restJson1WorkspaceDescription = (output, context) => {
1697
1675
  return {
1698
1676
  alias: (0, smithy_client_1.expectString)(output.alias),
1699
1677
  arn: (0, smithy_client_1.expectString)(output.arn),
1700
- createdAt: output.createdAt !== undefined && output.createdAt !== null
1701
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
1702
- : undefined,
1678
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1703
1679
  prometheusEndpoint: (0, smithy_client_1.expectString)(output.prometheusEndpoint),
1704
- status: output.status !== undefined && output.status !== null
1705
- ? deserializeAws_restJson1WorkspaceStatus(output.status, context)
1706
- : undefined,
1707
- tags: output.tags !== undefined && output.tags !== null
1708
- ? deserializeAws_restJson1TagMap(output.tags, context)
1709
- : undefined,
1680
+ status: output.status != null ? deserializeAws_restJson1WorkspaceStatus(output.status, context) : undefined,
1681
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1710
1682
  workspaceId: (0, smithy_client_1.expectString)(output.workspaceId),
1711
1683
  };
1712
1684
  };
@@ -1719,15 +1691,9 @@ const deserializeAws_restJson1WorkspaceSummary = (output, context) => {
1719
1691
  return {
1720
1692
  alias: (0, smithy_client_1.expectString)(output.alias),
1721
1693
  arn: (0, smithy_client_1.expectString)(output.arn),
1722
- createdAt: output.createdAt !== undefined && output.createdAt !== null
1723
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
1724
- : undefined,
1725
- status: output.status !== undefined && output.status !== null
1726
- ? deserializeAws_restJson1WorkspaceStatus(output.status, context)
1727
- : undefined,
1728
- tags: output.tags !== undefined && output.tags !== null
1729
- ? deserializeAws_restJson1TagMap(output.tags, context)
1730
- : undefined,
1694
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1695
+ status: output.status != null ? deserializeAws_restJson1WorkspaceStatus(output.status, context) : undefined,
1696
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1731
1697
  workspaceId: (0, smithy_client_1.expectString)(output.workspaceId),
1732
1698
  };
1733
1699
  };
@@ -1773,6 +1739,9 @@ const loadRestJsonErrorCode = (output, data) => {
1773
1739
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1774
1740
  const sanitizeErrorCode = (rawValue) => {
1775
1741
  let cleanValue = rawValue;
1742
+ if (typeof cleanValue === "number") {
1743
+ cleanValue = cleanValue.toString();
1744
+ }
1776
1745
  if (cleanValue.indexOf(":") >= 0) {
1777
1746
  cleanValue = cleanValue.split(":")[0];
1778
1747
  }
@@ -27,7 +27,7 @@ export var serializeAws_restJson1CreateAlertManagerDefinitionCommand = function
27
27
  else {
28
28
  throw new Error("No value provided for input HTTP label: workspaceId.");
29
29
  }
30
- body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) })));
30
+ body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data != null && { data: context.base64Encoder(input.data) })));
31
31
  return [2, new __HttpRequest({
32
32
  protocol: protocol,
33
33
  hostname: hostname,
@@ -63,7 +63,7 @@ export var serializeAws_restJson1CreateRuleGroupsNamespaceCommand = function (in
63
63
  else {
64
64
  throw new Error("No value provided for input HTTP label: workspaceId.");
65
65
  }
66
- body = JSON.stringify(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
66
+ body = JSON.stringify(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data != null && { data: context.base64Encoder(input.data) })), (input.name != null && { name: input.name })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
67
67
  return [2, new __HttpRequest({
68
68
  protocol: protocol,
69
69
  hostname: hostname,
@@ -88,7 +88,7 @@ export var serializeAws_restJson1CreateWorkspaceCommand = function (input, conte
88
88
  "content-type": "application/json",
89
89
  };
90
90
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces";
91
- body = JSON.stringify(__assign(__assign(__assign({}, (input.alias !== undefined && input.alias !== null && { alias: input.alias })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
91
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.alias != null && { alias: input.alias })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
92
92
  return [2, new __HttpRequest({
93
93
  protocol: protocol,
94
94
  hostname: hostname,
@@ -428,7 +428,7 @@ export var serializeAws_restJson1PutAlertManagerDefinitionCommand = function (in
428
428
  else {
429
429
  throw new Error("No value provided for input HTTP label: workspaceId.");
430
430
  }
431
- body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) })));
431
+ body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data != null && { data: context.base64Encoder(input.data) })));
432
432
  return [2, new __HttpRequest({
433
433
  protocol: protocol,
434
434
  hostname: hostname,
@@ -474,7 +474,7 @@ export var serializeAws_restJson1PutRuleGroupsNamespaceCommand = function (input
474
474
  else {
475
475
  throw new Error("No value provided for input HTTP label: name.");
476
476
  }
477
- body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) })));
477
+ body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.data != null && { data: context.base64Encoder(input.data) })));
478
478
  return [2, new __HttpRequest({
479
479
  protocol: protocol,
480
480
  hostname: hostname,
@@ -508,7 +508,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
508
508
  else {
509
509
  throw new Error("No value provided for input HTTP label: resourceArn.");
510
510
  }
511
- body = JSON.stringify(__assign({}, (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
511
+ body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
512
512
  return [2, new __HttpRequest({
513
513
  protocol: protocol,
514
514
  hostname: hostname,
@@ -576,7 +576,7 @@ export var serializeAws_restJson1UpdateWorkspaceAliasCommand = function (input,
576
576
  else {
577
577
  throw new Error("No value provided for input HTTP label: workspaceId.");
578
578
  }
579
- body = JSON.stringify(__assign(__assign({}, (input.alias !== undefined && input.alias !== null && { alias: input.alias })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }));
579
+ body = JSON.stringify(__assign(__assign({}, (input.alias != null && { alias: input.alias })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }));
580
580
  return [2, new __HttpRequest({
581
581
  protocol: protocol,
582
582
  hostname: hostname,
@@ -2028,16 +2028,10 @@ var serializeAws_restJson1TagMap = function (input, context) {
2028
2028
  };
2029
2029
  var deserializeAws_restJson1AlertManagerDefinitionDescription = function (output, context) {
2030
2030
  return {
2031
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2032
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
2033
- : undefined,
2034
- data: output.data !== undefined && output.data !== null ? context.base64Decoder(output.data) : undefined,
2035
- modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
2036
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt)))
2037
- : undefined,
2038
- status: output.status !== undefined && output.status !== null
2039
- ? deserializeAws_restJson1AlertManagerDefinitionStatus(output.status, context)
2040
- : undefined,
2031
+ createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
2032
+ data: output.data != null ? context.base64Decoder(output.data) : undefined,
2033
+ modifiedAt: output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined,
2034
+ status: output.status != null ? deserializeAws_restJson1AlertManagerDefinitionStatus(output.status, context) : undefined,
2041
2035
  };
2042
2036
  };
2043
2037
  var deserializeAws_restJson1AlertManagerDefinitionStatus = function (output, context) {
@@ -2049,20 +2043,12 @@ var deserializeAws_restJson1AlertManagerDefinitionStatus = function (output, con
2049
2043
  var deserializeAws_restJson1RuleGroupsNamespaceDescription = function (output, context) {
2050
2044
  return {
2051
2045
  arn: __expectString(output.arn),
2052
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2053
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
2054
- : undefined,
2055
- data: output.data !== undefined && output.data !== null ? context.base64Decoder(output.data) : undefined,
2056
- modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
2057
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt)))
2058
- : undefined,
2046
+ createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
2047
+ data: output.data != null ? context.base64Decoder(output.data) : undefined,
2048
+ modifiedAt: output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined,
2059
2049
  name: __expectString(output.name),
2060
- status: output.status !== undefined && output.status !== null
2061
- ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context)
2062
- : undefined,
2063
- tags: output.tags !== undefined && output.tags !== null
2064
- ? deserializeAws_restJson1TagMap(output.tags, context)
2065
- : undefined,
2050
+ status: output.status != null ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context) : undefined,
2051
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
2066
2052
  };
2067
2053
  };
2068
2054
  var deserializeAws_restJson1RuleGroupsNamespaceStatus = function (output, context) {
@@ -2074,19 +2060,11 @@ var deserializeAws_restJson1RuleGroupsNamespaceStatus = function (output, contex
2074
2060
  var deserializeAws_restJson1RuleGroupsNamespaceSummary = function (output, context) {
2075
2061
  return {
2076
2062
  arn: __expectString(output.arn),
2077
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2078
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
2079
- : undefined,
2080
- modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
2081
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt)))
2082
- : undefined,
2063
+ createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
2064
+ modifiedAt: output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined,
2083
2065
  name: __expectString(output.name),
2084
- status: output.status !== undefined && output.status !== null
2085
- ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context)
2086
- : undefined,
2087
- tags: output.tags !== undefined && output.tags !== null
2088
- ? deserializeAws_restJson1TagMap(output.tags, context)
2089
- : undefined,
2066
+ status: output.status != null ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context) : undefined,
2067
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
2090
2068
  };
2091
2069
  };
2092
2070
  var deserializeAws_restJson1RuleGroupsNamespaceSummaryList = function (output, context) {
@@ -2131,16 +2109,10 @@ var deserializeAws_restJson1WorkspaceDescription = function (output, context) {
2131
2109
  return {
2132
2110
  alias: __expectString(output.alias),
2133
2111
  arn: __expectString(output.arn),
2134
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2135
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
2136
- : undefined,
2112
+ createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
2137
2113
  prometheusEndpoint: __expectString(output.prometheusEndpoint),
2138
- status: output.status !== undefined && output.status !== null
2139
- ? deserializeAws_restJson1WorkspaceStatus(output.status, context)
2140
- : undefined,
2141
- tags: output.tags !== undefined && output.tags !== null
2142
- ? deserializeAws_restJson1TagMap(output.tags, context)
2143
- : undefined,
2114
+ status: output.status != null ? deserializeAws_restJson1WorkspaceStatus(output.status, context) : undefined,
2115
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
2144
2116
  workspaceId: __expectString(output.workspaceId),
2145
2117
  };
2146
2118
  };
@@ -2153,15 +2125,9 @@ var deserializeAws_restJson1WorkspaceSummary = function (output, context) {
2153
2125
  return {
2154
2126
  alias: __expectString(output.alias),
2155
2127
  arn: __expectString(output.arn),
2156
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2157
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
2158
- : undefined,
2159
- status: output.status !== undefined && output.status !== null
2160
- ? deserializeAws_restJson1WorkspaceStatus(output.status, context)
2161
- : undefined,
2162
- tags: output.tags !== undefined && output.tags !== null
2163
- ? deserializeAws_restJson1TagMap(output.tags, context)
2164
- : undefined,
2128
+ createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
2129
+ status: output.status != null ? deserializeAws_restJson1WorkspaceStatus(output.status, context) : undefined,
2130
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
2165
2131
  workspaceId: __expectString(output.workspaceId),
2166
2132
  };
2167
2133
  };
@@ -2214,6 +2180,9 @@ var loadRestJsonErrorCode = function (output, data) {
2214
2180
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2215
2181
  var sanitizeErrorCode = function (rawValue) {
2216
2182
  var cleanValue = rawValue;
2183
+ if (typeof cleanValue === "number") {
2184
+ cleanValue = cleanValue.toString();
2185
+ }
2217
2186
  if (cleanValue.indexOf(":") >= 0) {
2218
2187
  cleanValue = cleanValue.split(":")[0];
2219
2188
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-amp",
3
3
  "description": "AWS SDK for JavaScript Amp Client for Node.js, Browser and React Native",
4
- "version": "3.121.0",
4
+ "version": "3.130.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",
@@ -18,38 +18,38 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.121.0",
22
- "@aws-sdk/config-resolver": "3.110.0",
23
- "@aws-sdk/credential-provider-node": "3.121.0",
24
- "@aws-sdk/fetch-http-handler": "3.110.0",
25
- "@aws-sdk/hash-node": "3.110.0",
26
- "@aws-sdk/invalid-dependency": "3.110.0",
27
- "@aws-sdk/middleware-content-length": "3.110.0",
28
- "@aws-sdk/middleware-host-header": "3.110.0",
29
- "@aws-sdk/middleware-logger": "3.110.0",
30
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
31
- "@aws-sdk/middleware-retry": "3.118.1",
32
- "@aws-sdk/middleware-serde": "3.110.0",
33
- "@aws-sdk/middleware-signing": "3.110.0",
34
- "@aws-sdk/middleware-stack": "3.110.0",
35
- "@aws-sdk/middleware-user-agent": "3.110.0",
36
- "@aws-sdk/node-config-provider": "3.110.0",
37
- "@aws-sdk/node-http-handler": "3.118.1",
38
- "@aws-sdk/protocol-http": "3.110.0",
39
- "@aws-sdk/smithy-client": "3.110.0",
40
- "@aws-sdk/types": "3.110.0",
41
- "@aws-sdk/url-parser": "3.110.0",
21
+ "@aws-sdk/client-sts": "3.130.0",
22
+ "@aws-sdk/config-resolver": "3.130.0",
23
+ "@aws-sdk/credential-provider-node": "3.130.0",
24
+ "@aws-sdk/fetch-http-handler": "3.127.0",
25
+ "@aws-sdk/hash-node": "3.127.0",
26
+ "@aws-sdk/invalid-dependency": "3.127.0",
27
+ "@aws-sdk/middleware-content-length": "3.127.0",
28
+ "@aws-sdk/middleware-host-header": "3.127.0",
29
+ "@aws-sdk/middleware-logger": "3.127.0",
30
+ "@aws-sdk/middleware-recursion-detection": "3.127.0",
31
+ "@aws-sdk/middleware-retry": "3.127.0",
32
+ "@aws-sdk/middleware-serde": "3.127.0",
33
+ "@aws-sdk/middleware-signing": "3.130.0",
34
+ "@aws-sdk/middleware-stack": "3.127.0",
35
+ "@aws-sdk/middleware-user-agent": "3.127.0",
36
+ "@aws-sdk/node-config-provider": "3.127.0",
37
+ "@aws-sdk/node-http-handler": "3.127.0",
38
+ "@aws-sdk/protocol-http": "3.127.0",
39
+ "@aws-sdk/smithy-client": "3.127.0",
40
+ "@aws-sdk/types": "3.127.0",
41
+ "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
48
- "@aws-sdk/util-user-agent-browser": "3.110.0",
49
- "@aws-sdk/util-user-agent-node": "3.118.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.127.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.130.0",
48
+ "@aws-sdk/util-user-agent-browser": "3.127.0",
49
+ "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",
51
51
  "@aws-sdk/util-utf8-node": "3.109.0",
52
- "@aws-sdk/util-waiter": "3.118.1",
52
+ "@aws-sdk/util-waiter": "3.127.0",
53
53
  "tslib": "^2.3.1",
54
54
  "uuid": "^8.3.2"
55
55
  },