@aws-sdk/client-kms 3.525.0 → 3.529.1
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/dist-cjs/index.js +38 -78
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -323,6 +323,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
323
323
|
var import_types = require("@smithy/types");
|
|
324
324
|
|
|
325
325
|
// src/protocols/Aws_json1_1.ts
|
|
326
|
+
var import_core2 = require("@aws-sdk/core");
|
|
326
327
|
|
|
327
328
|
|
|
328
329
|
|
|
@@ -1699,7 +1700,7 @@ var de_CancelKeyDeletionCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1699
1700
|
if (output.statusCode >= 300) {
|
|
1700
1701
|
return de_CommandError(output, context);
|
|
1701
1702
|
}
|
|
1702
|
-
const data = await
|
|
1703
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1703
1704
|
let contents = {};
|
|
1704
1705
|
contents = (0, import_smithy_client._json)(data);
|
|
1705
1706
|
const response = {
|
|
@@ -1712,7 +1713,7 @@ var de_ConnectCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
1712
1713
|
if (output.statusCode >= 300) {
|
|
1713
1714
|
return de_CommandError(output, context);
|
|
1714
1715
|
}
|
|
1715
|
-
const data = await
|
|
1716
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1716
1717
|
let contents = {};
|
|
1717
1718
|
contents = (0, import_smithy_client._json)(data);
|
|
1718
1719
|
const response = {
|
|
@@ -1735,7 +1736,7 @@ var de_CreateCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
1735
1736
|
if (output.statusCode >= 300) {
|
|
1736
1737
|
return de_CommandError(output, context);
|
|
1737
1738
|
}
|
|
1738
|
-
const data = await
|
|
1739
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1739
1740
|
let contents = {};
|
|
1740
1741
|
contents = (0, import_smithy_client._json)(data);
|
|
1741
1742
|
const response = {
|
|
@@ -1748,7 +1749,7 @@ var de_CreateGrantCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1748
1749
|
if (output.statusCode >= 300) {
|
|
1749
1750
|
return de_CommandError(output, context);
|
|
1750
1751
|
}
|
|
1751
|
-
const data = await
|
|
1752
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1752
1753
|
let contents = {};
|
|
1753
1754
|
contents = (0, import_smithy_client._json)(data);
|
|
1754
1755
|
const response = {
|
|
@@ -1761,7 +1762,7 @@ var de_CreateKeyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1761
1762
|
if (output.statusCode >= 300) {
|
|
1762
1763
|
return de_CommandError(output, context);
|
|
1763
1764
|
}
|
|
1764
|
-
const data = await
|
|
1765
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1765
1766
|
let contents = {};
|
|
1766
1767
|
contents = de_CreateKeyResponse(data, context);
|
|
1767
1768
|
const response = {
|
|
@@ -1774,7 +1775,7 @@ var de_DecryptCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1774
1775
|
if (output.statusCode >= 300) {
|
|
1775
1776
|
return de_CommandError(output, context);
|
|
1776
1777
|
}
|
|
1777
|
-
const data = await
|
|
1778
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1778
1779
|
let contents = {};
|
|
1779
1780
|
contents = de_DecryptResponse(data, context);
|
|
1780
1781
|
const response = {
|
|
@@ -1797,7 +1798,7 @@ var de_DeleteCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
1797
1798
|
if (output.statusCode >= 300) {
|
|
1798
1799
|
return de_CommandError(output, context);
|
|
1799
1800
|
}
|
|
1800
|
-
const data = await
|
|
1801
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1801
1802
|
let contents = {};
|
|
1802
1803
|
contents = (0, import_smithy_client._json)(data);
|
|
1803
1804
|
const response = {
|
|
@@ -1820,7 +1821,7 @@ var de_DescribeCustomKeyStoresCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
1820
1821
|
if (output.statusCode >= 300) {
|
|
1821
1822
|
return de_CommandError(output, context);
|
|
1822
1823
|
}
|
|
1823
|
-
const data = await
|
|
1824
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1824
1825
|
let contents = {};
|
|
1825
1826
|
contents = de_DescribeCustomKeyStoresResponse(data, context);
|
|
1826
1827
|
const response = {
|
|
@@ -1833,7 +1834,7 @@ var de_DescribeKeyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1833
1834
|
if (output.statusCode >= 300) {
|
|
1834
1835
|
return de_CommandError(output, context);
|
|
1835
1836
|
}
|
|
1836
|
-
const data = await
|
|
1837
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1837
1838
|
let contents = {};
|
|
1838
1839
|
contents = de_DescribeKeyResponse(data, context);
|
|
1839
1840
|
const response = {
|
|
@@ -1866,7 +1867,7 @@ var de_DisconnectCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
1866
1867
|
if (output.statusCode >= 300) {
|
|
1867
1868
|
return de_CommandError(output, context);
|
|
1868
1869
|
}
|
|
1869
|
-
const data = await
|
|
1870
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1870
1871
|
let contents = {};
|
|
1871
1872
|
contents = (0, import_smithy_client._json)(data);
|
|
1872
1873
|
const response = {
|
|
@@ -1899,7 +1900,7 @@ var de_EncryptCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1899
1900
|
if (output.statusCode >= 300) {
|
|
1900
1901
|
return de_CommandError(output, context);
|
|
1901
1902
|
}
|
|
1902
|
-
const data = await
|
|
1903
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1903
1904
|
let contents = {};
|
|
1904
1905
|
contents = de_EncryptResponse(data, context);
|
|
1905
1906
|
const response = {
|
|
@@ -1912,7 +1913,7 @@ var de_GenerateDataKeyCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1912
1913
|
if (output.statusCode >= 300) {
|
|
1913
1914
|
return de_CommandError(output, context);
|
|
1914
1915
|
}
|
|
1915
|
-
const data = await
|
|
1916
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1916
1917
|
let contents = {};
|
|
1917
1918
|
contents = de_GenerateDataKeyResponse(data, context);
|
|
1918
1919
|
const response = {
|
|
@@ -1925,7 +1926,7 @@ var de_GenerateDataKeyPairCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1925
1926
|
if (output.statusCode >= 300) {
|
|
1926
1927
|
return de_CommandError(output, context);
|
|
1927
1928
|
}
|
|
1928
|
-
const data = await
|
|
1929
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1929
1930
|
let contents = {};
|
|
1930
1931
|
contents = de_GenerateDataKeyPairResponse(data, context);
|
|
1931
1932
|
const response = {
|
|
@@ -1938,7 +1939,7 @@ var de_GenerateDataKeyPairWithoutPlaintextCommand = /* @__PURE__ */ __name(async
|
|
|
1938
1939
|
if (output.statusCode >= 300) {
|
|
1939
1940
|
return de_CommandError(output, context);
|
|
1940
1941
|
}
|
|
1941
|
-
const data = await
|
|
1942
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1942
1943
|
let contents = {};
|
|
1943
1944
|
contents = de_GenerateDataKeyPairWithoutPlaintextResponse(data, context);
|
|
1944
1945
|
const response = {
|
|
@@ -1951,7 +1952,7 @@ var de_GenerateDataKeyWithoutPlaintextCommand = /* @__PURE__ */ __name(async (ou
|
|
|
1951
1952
|
if (output.statusCode >= 300) {
|
|
1952
1953
|
return de_CommandError(output, context);
|
|
1953
1954
|
}
|
|
1954
|
-
const data = await
|
|
1955
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1955
1956
|
let contents = {};
|
|
1956
1957
|
contents = de_GenerateDataKeyWithoutPlaintextResponse(data, context);
|
|
1957
1958
|
const response = {
|
|
@@ -1964,7 +1965,7 @@ var de_GenerateMacCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1964
1965
|
if (output.statusCode >= 300) {
|
|
1965
1966
|
return de_CommandError(output, context);
|
|
1966
1967
|
}
|
|
1967
|
-
const data = await
|
|
1968
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1968
1969
|
let contents = {};
|
|
1969
1970
|
contents = de_GenerateMacResponse(data, context);
|
|
1970
1971
|
const response = {
|
|
@@ -1977,7 +1978,7 @@ var de_GenerateRandomCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1977
1978
|
if (output.statusCode >= 300) {
|
|
1978
1979
|
return de_CommandError(output, context);
|
|
1979
1980
|
}
|
|
1980
|
-
const data = await
|
|
1981
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1981
1982
|
let contents = {};
|
|
1982
1983
|
contents = de_GenerateRandomResponse(data, context);
|
|
1983
1984
|
const response = {
|
|
@@ -1990,7 +1991,7 @@ var de_GetKeyPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1990
1991
|
if (output.statusCode >= 300) {
|
|
1991
1992
|
return de_CommandError(output, context);
|
|
1992
1993
|
}
|
|
1993
|
-
const data = await
|
|
1994
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1994
1995
|
let contents = {};
|
|
1995
1996
|
contents = (0, import_smithy_client._json)(data);
|
|
1996
1997
|
const response = {
|
|
@@ -2003,7 +2004,7 @@ var de_GetKeyRotationStatusCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
2003
2004
|
if (output.statusCode >= 300) {
|
|
2004
2005
|
return de_CommandError(output, context);
|
|
2005
2006
|
}
|
|
2006
|
-
const data = await
|
|
2007
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2007
2008
|
let contents = {};
|
|
2008
2009
|
contents = (0, import_smithy_client._json)(data);
|
|
2009
2010
|
const response = {
|
|
@@ -2016,7 +2017,7 @@ var de_GetParametersForImportCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
2016
2017
|
if (output.statusCode >= 300) {
|
|
2017
2018
|
return de_CommandError(output, context);
|
|
2018
2019
|
}
|
|
2019
|
-
const data = await
|
|
2020
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2020
2021
|
let contents = {};
|
|
2021
2022
|
contents = de_GetParametersForImportResponse(data, context);
|
|
2022
2023
|
const response = {
|
|
@@ -2029,7 +2030,7 @@ var de_GetPublicKeyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2029
2030
|
if (output.statusCode >= 300) {
|
|
2030
2031
|
return de_CommandError(output, context);
|
|
2031
2032
|
}
|
|
2032
|
-
const data = await
|
|
2033
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2033
2034
|
let contents = {};
|
|
2034
2035
|
contents = de_GetPublicKeyResponse(data, context);
|
|
2035
2036
|
const response = {
|
|
@@ -2042,7 +2043,7 @@ var de_ImportKeyMaterialCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
2042
2043
|
if (output.statusCode >= 300) {
|
|
2043
2044
|
return de_CommandError(output, context);
|
|
2044
2045
|
}
|
|
2045
|
-
const data = await
|
|
2046
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2046
2047
|
let contents = {};
|
|
2047
2048
|
contents = (0, import_smithy_client._json)(data);
|
|
2048
2049
|
const response = {
|
|
@@ -2055,7 +2056,7 @@ var de_ListAliasesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2055
2056
|
if (output.statusCode >= 300) {
|
|
2056
2057
|
return de_CommandError(output, context);
|
|
2057
2058
|
}
|
|
2058
|
-
const data = await
|
|
2059
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2059
2060
|
let contents = {};
|
|
2060
2061
|
contents = de_ListAliasesResponse(data, context);
|
|
2061
2062
|
const response = {
|
|
@@ -2068,7 +2069,7 @@ var de_ListGrantsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2068
2069
|
if (output.statusCode >= 300) {
|
|
2069
2070
|
return de_CommandError(output, context);
|
|
2070
2071
|
}
|
|
2071
|
-
const data = await
|
|
2072
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2072
2073
|
let contents = {};
|
|
2073
2074
|
contents = de_ListGrantsResponse(data, context);
|
|
2074
2075
|
const response = {
|
|
@@ -2081,7 +2082,7 @@ var de_ListKeyPoliciesCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
2081
2082
|
if (output.statusCode >= 300) {
|
|
2082
2083
|
return de_CommandError(output, context);
|
|
2083
2084
|
}
|
|
2084
|
-
const data = await
|
|
2085
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2085
2086
|
let contents = {};
|
|
2086
2087
|
contents = (0, import_smithy_client._json)(data);
|
|
2087
2088
|
const response = {
|
|
@@ -2094,7 +2095,7 @@ var de_ListKeysCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2094
2095
|
if (output.statusCode >= 300) {
|
|
2095
2096
|
return de_CommandError(output, context);
|
|
2096
2097
|
}
|
|
2097
|
-
const data = await
|
|
2098
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2098
2099
|
let contents = {};
|
|
2099
2100
|
contents = (0, import_smithy_client._json)(data);
|
|
2100
2101
|
const response = {
|
|
@@ -2107,7 +2108,7 @@ var de_ListResourceTagsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
2107
2108
|
if (output.statusCode >= 300) {
|
|
2108
2109
|
return de_CommandError(output, context);
|
|
2109
2110
|
}
|
|
2110
|
-
const data = await
|
|
2111
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2111
2112
|
let contents = {};
|
|
2112
2113
|
contents = (0, import_smithy_client._json)(data);
|
|
2113
2114
|
const response = {
|
|
@@ -2120,7 +2121,7 @@ var de_ListRetirableGrantsCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
2120
2121
|
if (output.statusCode >= 300) {
|
|
2121
2122
|
return de_CommandError(output, context);
|
|
2122
2123
|
}
|
|
2123
|
-
const data = await
|
|
2124
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2124
2125
|
let contents = {};
|
|
2125
2126
|
contents = de_ListGrantsResponse(data, context);
|
|
2126
2127
|
const response = {
|
|
@@ -2143,7 +2144,7 @@ var de_ReEncryptCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2143
2144
|
if (output.statusCode >= 300) {
|
|
2144
2145
|
return de_CommandError(output, context);
|
|
2145
2146
|
}
|
|
2146
|
-
const data = await
|
|
2147
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2147
2148
|
let contents = {};
|
|
2148
2149
|
contents = de_ReEncryptResponse(data, context);
|
|
2149
2150
|
const response = {
|
|
@@ -2156,7 +2157,7 @@ var de_ReplicateKeyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2156
2157
|
if (output.statusCode >= 300) {
|
|
2157
2158
|
return de_CommandError(output, context);
|
|
2158
2159
|
}
|
|
2159
|
-
const data = await
|
|
2160
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2160
2161
|
let contents = {};
|
|
2161
2162
|
contents = de_ReplicateKeyResponse(data, context);
|
|
2162
2163
|
const response = {
|
|
@@ -2189,7 +2190,7 @@ var de_ScheduleKeyDeletionCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
2189
2190
|
if (output.statusCode >= 300) {
|
|
2190
2191
|
return de_CommandError(output, context);
|
|
2191
2192
|
}
|
|
2192
|
-
const data = await
|
|
2193
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2193
2194
|
let contents = {};
|
|
2194
2195
|
contents = de_ScheduleKeyDeletionResponse(data, context);
|
|
2195
2196
|
const response = {
|
|
@@ -2202,7 +2203,7 @@ var de_SignCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2202
2203
|
if (output.statusCode >= 300) {
|
|
2203
2204
|
return de_CommandError(output, context);
|
|
2204
2205
|
}
|
|
2205
|
-
const data = await
|
|
2206
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2206
2207
|
let contents = {};
|
|
2207
2208
|
contents = de_SignResponse(data, context);
|
|
2208
2209
|
const response = {
|
|
@@ -2245,7 +2246,7 @@ var de_UpdateCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
2245
2246
|
if (output.statusCode >= 300) {
|
|
2246
2247
|
return de_CommandError(output, context);
|
|
2247
2248
|
}
|
|
2248
|
-
const data = await
|
|
2249
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2249
2250
|
let contents = {};
|
|
2250
2251
|
contents = (0, import_smithy_client._json)(data);
|
|
2251
2252
|
const response = {
|
|
@@ -2278,7 +2279,7 @@ var de_VerifyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2278
2279
|
if (output.statusCode >= 300) {
|
|
2279
2280
|
return de_CommandError(output, context);
|
|
2280
2281
|
}
|
|
2281
|
-
const data = await
|
|
2282
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2282
2283
|
let contents = {};
|
|
2283
2284
|
contents = (0, import_smithy_client._json)(data);
|
|
2284
2285
|
const response = {
|
|
@@ -2291,7 +2292,7 @@ var de_VerifyMacCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2291
2292
|
if (output.statusCode >= 300) {
|
|
2292
2293
|
return de_CommandError(output, context);
|
|
2293
2294
|
}
|
|
2294
|
-
const data = await
|
|
2295
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2295
2296
|
let contents = {};
|
|
2296
2297
|
contents = (0, import_smithy_client._json)(data);
|
|
2297
2298
|
const response = {
|
|
@@ -2303,9 +2304,9 @@ var de_VerifyMacCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2303
2304
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
2304
2305
|
const parsedOutput = {
|
|
2305
2306
|
...output,
|
|
2306
|
-
body: await
|
|
2307
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
2307
2308
|
};
|
|
2308
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2309
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
2309
2310
|
switch (errorCode) {
|
|
2310
2311
|
case "DependencyTimeoutException":
|
|
2311
2312
|
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
@@ -3225,7 +3226,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
3225
3226
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3226
3227
|
cfId: output.headers["x-amz-cf-id"]
|
|
3227
3228
|
}), "deserializeMetadata");
|
|
3228
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
3229
3229
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(KMSServiceException);
|
|
3230
3230
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
3231
3231
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -3252,46 +3252,6 @@ function sharedHeaders(operation) {
|
|
|
3252
3252
|
};
|
|
3253
3253
|
}
|
|
3254
3254
|
__name(sharedHeaders, "sharedHeaders");
|
|
3255
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
3256
|
-
if (encoded.length) {
|
|
3257
|
-
return JSON.parse(encoded);
|
|
3258
|
-
}
|
|
3259
|
-
return {};
|
|
3260
|
-
}), "parseBody");
|
|
3261
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
3262
|
-
const value = await parseBody(errorBody, context);
|
|
3263
|
-
value.message = value.message ?? value.Message;
|
|
3264
|
-
return value;
|
|
3265
|
-
}, "parseErrorBody");
|
|
3266
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
3267
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
3268
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
3269
|
-
let cleanValue = rawValue;
|
|
3270
|
-
if (typeof cleanValue === "number") {
|
|
3271
|
-
cleanValue = cleanValue.toString();
|
|
3272
|
-
}
|
|
3273
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
3274
|
-
cleanValue = cleanValue.split(",")[0];
|
|
3275
|
-
}
|
|
3276
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
3277
|
-
cleanValue = cleanValue.split(":")[0];
|
|
3278
|
-
}
|
|
3279
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
3280
|
-
cleanValue = cleanValue.split("#")[1];
|
|
3281
|
-
}
|
|
3282
|
-
return cleanValue;
|
|
3283
|
-
}, "sanitizeErrorCode");
|
|
3284
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3285
|
-
if (headerKey !== void 0) {
|
|
3286
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3287
|
-
}
|
|
3288
|
-
if (data.code !== void 0) {
|
|
3289
|
-
return sanitizeErrorCode(data.code);
|
|
3290
|
-
}
|
|
3291
|
-
if (data["__type"] !== void 0) {
|
|
3292
|
-
return sanitizeErrorCode(data["__type"]);
|
|
3293
|
-
}
|
|
3294
|
-
}, "loadRestJsonErrorCode");
|
|
3295
3255
|
|
|
3296
3256
|
// src/commands/CancelKeyDeletionCommand.ts
|
|
3297
3257
|
var _CancelKeyDeletionCommand = class _CancelKeyDeletionCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { KMSServiceException as __BaseException } from "../models/KMSServiceException";
|
|
@@ -1864,43 +1865,3 @@ function sharedHeaders(operation) {
|
|
|
1864
1865
|
"x-amz-target": `TrentService.${operation}`,
|
|
1865
1866
|
};
|
|
1866
1867
|
}
|
|
1867
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1868
|
-
if (encoded.length) {
|
|
1869
|
-
return JSON.parse(encoded);
|
|
1870
|
-
}
|
|
1871
|
-
return {};
|
|
1872
|
-
});
|
|
1873
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1874
|
-
const value = await parseBody(errorBody, context);
|
|
1875
|
-
value.message = value.message ?? value.Message;
|
|
1876
|
-
return value;
|
|
1877
|
-
};
|
|
1878
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1879
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1880
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1881
|
-
let cleanValue = rawValue;
|
|
1882
|
-
if (typeof cleanValue === "number") {
|
|
1883
|
-
cleanValue = cleanValue.toString();
|
|
1884
|
-
}
|
|
1885
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1886
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1887
|
-
}
|
|
1888
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1889
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1890
|
-
}
|
|
1891
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1892
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1893
|
-
}
|
|
1894
|
-
return cleanValue;
|
|
1895
|
-
};
|
|
1896
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1897
|
-
if (headerKey !== undefined) {
|
|
1898
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1899
|
-
}
|
|
1900
|
-
if (data.code !== undefined) {
|
|
1901
|
-
return sanitizeErrorCode(data.code);
|
|
1902
|
-
}
|
|
1903
|
-
if (data["__type"] !== undefined) {
|
|
1904
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1905
|
-
}
|
|
1906
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-kms",
|
|
3
3
|
"description": "AWS SDK for JavaScript Kms Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-kms",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|