@aws-sdk/client-acm-pca 3.525.0 → 3.529.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/dist-cjs/index.js +15 -55
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -249,6 +249,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
249
249
|
var import_types = require("@smithy/types");
|
|
250
250
|
|
|
251
251
|
// src/protocols/Aws_json1_1.ts
|
|
252
|
+
var import_core2 = require("@aws-sdk/core");
|
|
252
253
|
|
|
253
254
|
|
|
254
255
|
|
|
@@ -832,7 +833,7 @@ var de_CreateCertificateAuthorityCommand = /* @__PURE__ */ __name(async (output,
|
|
|
832
833
|
if (output.statusCode >= 300) {
|
|
833
834
|
return de_CommandError(output, context);
|
|
834
835
|
}
|
|
835
|
-
const data = await
|
|
836
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
836
837
|
let contents = {};
|
|
837
838
|
contents = (0, import_smithy_client._json)(data);
|
|
838
839
|
const response = {
|
|
@@ -845,7 +846,7 @@ var de_CreateCertificateAuthorityAuditReportCommand = /* @__PURE__ */ __name(asy
|
|
|
845
846
|
if (output.statusCode >= 300) {
|
|
846
847
|
return de_CommandError(output, context);
|
|
847
848
|
}
|
|
848
|
-
const data = await
|
|
849
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
849
850
|
let contents = {};
|
|
850
851
|
contents = (0, import_smithy_client._json)(data);
|
|
851
852
|
const response = {
|
|
@@ -898,7 +899,7 @@ var de_DescribeCertificateAuthorityCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
898
899
|
if (output.statusCode >= 300) {
|
|
899
900
|
return de_CommandError(output, context);
|
|
900
901
|
}
|
|
901
|
-
const data = await
|
|
902
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
902
903
|
let contents = {};
|
|
903
904
|
contents = de_DescribeCertificateAuthorityResponse(data, context);
|
|
904
905
|
const response = {
|
|
@@ -911,7 +912,7 @@ var de_DescribeCertificateAuthorityAuditReportCommand = /* @__PURE__ */ __name(a
|
|
|
911
912
|
if (output.statusCode >= 300) {
|
|
912
913
|
return de_CommandError(output, context);
|
|
913
914
|
}
|
|
914
|
-
const data = await
|
|
915
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
915
916
|
let contents = {};
|
|
916
917
|
contents = de_DescribeCertificateAuthorityAuditReportResponse(data, context);
|
|
917
918
|
const response = {
|
|
@@ -924,7 +925,7 @@ var de_GetCertificateCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
924
925
|
if (output.statusCode >= 300) {
|
|
925
926
|
return de_CommandError(output, context);
|
|
926
927
|
}
|
|
927
|
-
const data = await
|
|
928
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
928
929
|
let contents = {};
|
|
929
930
|
contents = (0, import_smithy_client._json)(data);
|
|
930
931
|
const response = {
|
|
@@ -937,7 +938,7 @@ var de_GetCertificateAuthorityCertificateCommand = /* @__PURE__ */ __name(async
|
|
|
937
938
|
if (output.statusCode >= 300) {
|
|
938
939
|
return de_CommandError(output, context);
|
|
939
940
|
}
|
|
940
|
-
const data = await
|
|
941
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
941
942
|
let contents = {};
|
|
942
943
|
contents = (0, import_smithy_client._json)(data);
|
|
943
944
|
const response = {
|
|
@@ -950,7 +951,7 @@ var de_GetCertificateAuthorityCsrCommand = /* @__PURE__ */ __name(async (output,
|
|
|
950
951
|
if (output.statusCode >= 300) {
|
|
951
952
|
return de_CommandError(output, context);
|
|
952
953
|
}
|
|
953
|
-
const data = await
|
|
954
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
954
955
|
let contents = {};
|
|
955
956
|
contents = (0, import_smithy_client._json)(data);
|
|
956
957
|
const response = {
|
|
@@ -963,7 +964,7 @@ var de_GetPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
963
964
|
if (output.statusCode >= 300) {
|
|
964
965
|
return de_CommandError(output, context);
|
|
965
966
|
}
|
|
966
|
-
const data = await
|
|
967
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
967
968
|
let contents = {};
|
|
968
969
|
contents = (0, import_smithy_client._json)(data);
|
|
969
970
|
const response = {
|
|
@@ -986,7 +987,7 @@ var de_IssueCertificateCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
986
987
|
if (output.statusCode >= 300) {
|
|
987
988
|
return de_CommandError(output, context);
|
|
988
989
|
}
|
|
989
|
-
const data = await
|
|
990
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
990
991
|
let contents = {};
|
|
991
992
|
contents = (0, import_smithy_client._json)(data);
|
|
992
993
|
const response = {
|
|
@@ -999,7 +1000,7 @@ var de_ListCertificateAuthoritiesCommand = /* @__PURE__ */ __name(async (output,
|
|
|
999
1000
|
if (output.statusCode >= 300) {
|
|
1000
1001
|
return de_CommandError(output, context);
|
|
1001
1002
|
}
|
|
1002
|
-
const data = await
|
|
1003
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1003
1004
|
let contents = {};
|
|
1004
1005
|
contents = de_ListCertificateAuthoritiesResponse(data, context);
|
|
1005
1006
|
const response = {
|
|
@@ -1012,7 +1013,7 @@ var de_ListPermissionsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1012
1013
|
if (output.statusCode >= 300) {
|
|
1013
1014
|
return de_CommandError(output, context);
|
|
1014
1015
|
}
|
|
1015
|
-
const data = await
|
|
1016
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1016
1017
|
let contents = {};
|
|
1017
1018
|
contents = de_ListPermissionsResponse(data, context);
|
|
1018
1019
|
const response = {
|
|
@@ -1025,7 +1026,7 @@ var de_ListTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1025
1026
|
if (output.statusCode >= 300) {
|
|
1026
1027
|
return de_CommandError(output, context);
|
|
1027
1028
|
}
|
|
1028
|
-
const data = await
|
|
1029
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1029
1030
|
let contents = {};
|
|
1030
1031
|
contents = (0, import_smithy_client._json)(data);
|
|
1031
1032
|
const response = {
|
|
@@ -1097,9 +1098,9 @@ var de_UpdateCertificateAuthorityCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1097
1098
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1098
1099
|
const parsedOutput = {
|
|
1099
1100
|
...output,
|
|
1100
|
-
body: await
|
|
1101
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1101
1102
|
};
|
|
1102
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1103
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1103
1104
|
switch (errorCode) {
|
|
1104
1105
|
case "InvalidArgsException":
|
|
1105
1106
|
case "com.amazonaws.acmpca#InvalidArgsException":
|
|
@@ -1429,7 +1430,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1429
1430
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1430
1431
|
cfId: output.headers["x-amz-cf-id"]
|
|
1431
1432
|
}), "deserializeMetadata");
|
|
1432
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1433
1433
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(ACMPCAServiceException);
|
|
1434
1434
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1435
1435
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1456,46 +1456,6 @@ function sharedHeaders(operation) {
|
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
1458
|
__name(sharedHeaders, "sharedHeaders");
|
|
1459
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1460
|
-
if (encoded.length) {
|
|
1461
|
-
return JSON.parse(encoded);
|
|
1462
|
-
}
|
|
1463
|
-
return {};
|
|
1464
|
-
}), "parseBody");
|
|
1465
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1466
|
-
const value = await parseBody(errorBody, context);
|
|
1467
|
-
value.message = value.message ?? value.Message;
|
|
1468
|
-
return value;
|
|
1469
|
-
}, "parseErrorBody");
|
|
1470
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1471
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1472
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1473
|
-
let cleanValue = rawValue;
|
|
1474
|
-
if (typeof cleanValue === "number") {
|
|
1475
|
-
cleanValue = cleanValue.toString();
|
|
1476
|
-
}
|
|
1477
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1478
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1479
|
-
}
|
|
1480
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1481
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1482
|
-
}
|
|
1483
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1484
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1485
|
-
}
|
|
1486
|
-
return cleanValue;
|
|
1487
|
-
}, "sanitizeErrorCode");
|
|
1488
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1489
|
-
if (headerKey !== void 0) {
|
|
1490
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1491
|
-
}
|
|
1492
|
-
if (data.code !== void 0) {
|
|
1493
|
-
return sanitizeErrorCode(data.code);
|
|
1494
|
-
}
|
|
1495
|
-
if (data["__type"] !== void 0) {
|
|
1496
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1497
|
-
}
|
|
1498
|
-
}, "loadRestJsonErrorCode");
|
|
1499
1459
|
|
|
1500
1460
|
// src/commands/CreateCertificateAuthorityAuditReportCommand.ts
|
|
1501
1461
|
var _CreateCertificateAuthorityAuditReportCommand = class _CreateCertificateAuthorityAuditReportCommand 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, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { ACMPCAServiceException as __BaseException } from "../models/ACMPCAServiceException";
|
|
@@ -771,43 +772,3 @@ function sharedHeaders(operation) {
|
|
|
771
772
|
"x-amz-target": `ACMPrivateCA.${operation}`,
|
|
772
773
|
};
|
|
773
774
|
}
|
|
774
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
775
|
-
if (encoded.length) {
|
|
776
|
-
return JSON.parse(encoded);
|
|
777
|
-
}
|
|
778
|
-
return {};
|
|
779
|
-
});
|
|
780
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
781
|
-
const value = await parseBody(errorBody, context);
|
|
782
|
-
value.message = value.message ?? value.Message;
|
|
783
|
-
return value;
|
|
784
|
-
};
|
|
785
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
786
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
787
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
788
|
-
let cleanValue = rawValue;
|
|
789
|
-
if (typeof cleanValue === "number") {
|
|
790
|
-
cleanValue = cleanValue.toString();
|
|
791
|
-
}
|
|
792
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
793
|
-
cleanValue = cleanValue.split(",")[0];
|
|
794
|
-
}
|
|
795
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
796
|
-
cleanValue = cleanValue.split(":")[0];
|
|
797
|
-
}
|
|
798
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
799
|
-
cleanValue = cleanValue.split("#")[1];
|
|
800
|
-
}
|
|
801
|
-
return cleanValue;
|
|
802
|
-
};
|
|
803
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
804
|
-
if (headerKey !== undefined) {
|
|
805
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
806
|
-
}
|
|
807
|
-
if (data.code !== undefined) {
|
|
808
|
-
return sanitizeErrorCode(data.code);
|
|
809
|
-
}
|
|
810
|
-
if (data["__type"] !== undefined) {
|
|
811
|
-
return sanitizeErrorCode(data["__type"]);
|
|
812
|
-
}
|
|
813
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-acm-pca",
|
|
3
3
|
"description": "AWS SDK for JavaScript Acm Pca Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.0",
|
|
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-acm-pca",
|
|
@@ -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.0",
|
|
24
|
+
"@aws-sdk/core": "3.529.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.0",
|
|
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",
|