@aws-sdk/client-bcm-data-exports 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
|
@@ -208,6 +208,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
208
208
|
var import_types = require("@smithy/types");
|
|
209
209
|
|
|
210
210
|
// src/protocols/Aws_json1_1.ts
|
|
211
|
+
var import_core2 = require("@aws-sdk/core");
|
|
211
212
|
|
|
212
213
|
|
|
213
214
|
|
|
@@ -446,7 +447,7 @@ var de_CreateExportCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
446
447
|
if (output.statusCode >= 300) {
|
|
447
448
|
return de_CommandError(output, context);
|
|
448
449
|
}
|
|
449
|
-
const data = await
|
|
450
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
450
451
|
let contents = {};
|
|
451
452
|
contents = (0, import_smithy_client._json)(data);
|
|
452
453
|
const response = {
|
|
@@ -459,7 +460,7 @@ var de_DeleteExportCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
459
460
|
if (output.statusCode >= 300) {
|
|
460
461
|
return de_CommandError(output, context);
|
|
461
462
|
}
|
|
462
|
-
const data = await
|
|
463
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
463
464
|
let contents = {};
|
|
464
465
|
contents = (0, import_smithy_client._json)(data);
|
|
465
466
|
const response = {
|
|
@@ -472,7 +473,7 @@ var de_GetExecutionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
472
473
|
if (output.statusCode >= 300) {
|
|
473
474
|
return de_CommandError(output, context);
|
|
474
475
|
}
|
|
475
|
-
const data = await
|
|
476
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
476
477
|
let contents = {};
|
|
477
478
|
contents = de_GetExecutionResponse(data, context);
|
|
478
479
|
const response = {
|
|
@@ -485,7 +486,7 @@ var de_GetExportCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
485
486
|
if (output.statusCode >= 300) {
|
|
486
487
|
return de_CommandError(output, context);
|
|
487
488
|
}
|
|
488
|
-
const data = await
|
|
489
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
489
490
|
let contents = {};
|
|
490
491
|
contents = de_GetExportResponse(data, context);
|
|
491
492
|
const response = {
|
|
@@ -498,7 +499,7 @@ var de_GetTableCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
498
499
|
if (output.statusCode >= 300) {
|
|
499
500
|
return de_CommandError(output, context);
|
|
500
501
|
}
|
|
501
|
-
const data = await
|
|
502
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
502
503
|
let contents = {};
|
|
503
504
|
contents = (0, import_smithy_client._json)(data);
|
|
504
505
|
const response = {
|
|
@@ -511,7 +512,7 @@ var de_ListExecutionsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
511
512
|
if (output.statusCode >= 300) {
|
|
512
513
|
return de_CommandError(output, context);
|
|
513
514
|
}
|
|
514
|
-
const data = await
|
|
515
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
515
516
|
let contents = {};
|
|
516
517
|
contents = de_ListExecutionsResponse(data, context);
|
|
517
518
|
const response = {
|
|
@@ -524,7 +525,7 @@ var de_ListExportsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
524
525
|
if (output.statusCode >= 300) {
|
|
525
526
|
return de_CommandError(output, context);
|
|
526
527
|
}
|
|
527
|
-
const data = await
|
|
528
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
528
529
|
let contents = {};
|
|
529
530
|
contents = de_ListExportsResponse(data, context);
|
|
530
531
|
const response = {
|
|
@@ -537,7 +538,7 @@ var de_ListTablesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
537
538
|
if (output.statusCode >= 300) {
|
|
538
539
|
return de_CommandError(output, context);
|
|
539
540
|
}
|
|
540
|
-
const data = await
|
|
541
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
541
542
|
let contents = {};
|
|
542
543
|
contents = (0, import_smithy_client._json)(data);
|
|
543
544
|
const response = {
|
|
@@ -550,7 +551,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
550
551
|
if (output.statusCode >= 300) {
|
|
551
552
|
return de_CommandError(output, context);
|
|
552
553
|
}
|
|
553
|
-
const data = await
|
|
554
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
554
555
|
let contents = {};
|
|
555
556
|
contents = (0, import_smithy_client._json)(data);
|
|
556
557
|
const response = {
|
|
@@ -563,7 +564,7 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
563
564
|
if (output.statusCode >= 300) {
|
|
564
565
|
return de_CommandError(output, context);
|
|
565
566
|
}
|
|
566
|
-
const data = await
|
|
567
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
567
568
|
let contents = {};
|
|
568
569
|
contents = (0, import_smithy_client._json)(data);
|
|
569
570
|
const response = {
|
|
@@ -576,7 +577,7 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
576
577
|
if (output.statusCode >= 300) {
|
|
577
578
|
return de_CommandError(output, context);
|
|
578
579
|
}
|
|
579
|
-
const data = await
|
|
580
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
580
581
|
let contents = {};
|
|
581
582
|
contents = (0, import_smithy_client._json)(data);
|
|
582
583
|
const response = {
|
|
@@ -589,7 +590,7 @@ var de_UpdateExportCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
589
590
|
if (output.statusCode >= 300) {
|
|
590
591
|
return de_CommandError(output, context);
|
|
591
592
|
}
|
|
592
|
-
const data = await
|
|
593
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
593
594
|
let contents = {};
|
|
594
595
|
contents = (0, import_smithy_client._json)(data);
|
|
595
596
|
const response = {
|
|
@@ -601,9 +602,9 @@ var de_UpdateExportCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
601
602
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
602
603
|
const parsedOutput = {
|
|
603
604
|
...output,
|
|
604
|
-
body: await
|
|
605
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
605
606
|
};
|
|
606
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
607
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
607
608
|
switch (errorCode) {
|
|
608
609
|
case "InternalServerException":
|
|
609
610
|
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
@@ -748,7 +749,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
748
749
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
749
750
|
cfId: output.headers["x-amz-cf-id"]
|
|
750
751
|
}), "deserializeMetadata");
|
|
751
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
752
752
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(BCMDataExportsServiceException);
|
|
753
753
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
754
754
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -775,46 +775,6 @@ function sharedHeaders(operation) {
|
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
777
|
__name(sharedHeaders, "sharedHeaders");
|
|
778
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
779
|
-
if (encoded.length) {
|
|
780
|
-
return JSON.parse(encoded);
|
|
781
|
-
}
|
|
782
|
-
return {};
|
|
783
|
-
}), "parseBody");
|
|
784
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
785
|
-
const value = await parseBody(errorBody, context);
|
|
786
|
-
value.message = value.message ?? value.Message;
|
|
787
|
-
return value;
|
|
788
|
-
}, "parseErrorBody");
|
|
789
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
790
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
791
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
792
|
-
let cleanValue = rawValue;
|
|
793
|
-
if (typeof cleanValue === "number") {
|
|
794
|
-
cleanValue = cleanValue.toString();
|
|
795
|
-
}
|
|
796
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
797
|
-
cleanValue = cleanValue.split(",")[0];
|
|
798
|
-
}
|
|
799
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
800
|
-
cleanValue = cleanValue.split(":")[0];
|
|
801
|
-
}
|
|
802
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
803
|
-
cleanValue = cleanValue.split("#")[1];
|
|
804
|
-
}
|
|
805
|
-
return cleanValue;
|
|
806
|
-
}, "sanitizeErrorCode");
|
|
807
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
808
|
-
if (headerKey !== void 0) {
|
|
809
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
810
|
-
}
|
|
811
|
-
if (data.code !== void 0) {
|
|
812
|
-
return sanitizeErrorCode(data.code);
|
|
813
|
-
}
|
|
814
|
-
if (data["__type"] !== void 0) {
|
|
815
|
-
return sanitizeErrorCode(data["__type"]);
|
|
816
|
-
}
|
|
817
|
-
}, "loadRestJsonErrorCode");
|
|
818
778
|
|
|
819
779
|
// src/commands/CreateExportCommand.ts
|
|
820
780
|
var _CreateExportCommand = class _CreateExportCommand 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, expectString as __expectString, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { BCMDataExportsServiceException as __BaseException } from "../models/BCMDataExportsServiceException";
|
|
@@ -410,43 +411,3 @@ function sharedHeaders(operation) {
|
|
|
410
411
|
"x-amz-target": `AWSBillingAndCostManagementDataExports.${operation}`,
|
|
411
412
|
};
|
|
412
413
|
}
|
|
413
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
414
|
-
if (encoded.length) {
|
|
415
|
-
return JSON.parse(encoded);
|
|
416
|
-
}
|
|
417
|
-
return {};
|
|
418
|
-
});
|
|
419
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
420
|
-
const value = await parseBody(errorBody, context);
|
|
421
|
-
value.message = value.message ?? value.Message;
|
|
422
|
-
return value;
|
|
423
|
-
};
|
|
424
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
425
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
426
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
427
|
-
let cleanValue = rawValue;
|
|
428
|
-
if (typeof cleanValue === "number") {
|
|
429
|
-
cleanValue = cleanValue.toString();
|
|
430
|
-
}
|
|
431
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
432
|
-
cleanValue = cleanValue.split(",")[0];
|
|
433
|
-
}
|
|
434
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
435
|
-
cleanValue = cleanValue.split(":")[0];
|
|
436
|
-
}
|
|
437
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
438
|
-
cleanValue = cleanValue.split("#")[1];
|
|
439
|
-
}
|
|
440
|
-
return cleanValue;
|
|
441
|
-
};
|
|
442
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
443
|
-
if (headerKey !== undefined) {
|
|
444
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
445
|
-
}
|
|
446
|
-
if (data.code !== undefined) {
|
|
447
|
-
return sanitizeErrorCode(data.code);
|
|
448
|
-
}
|
|
449
|
-
if (data["__type"] !== undefined) {
|
|
450
|
-
return sanitizeErrorCode(data["__type"]);
|
|
451
|
-
}
|
|
452
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bcm-data-exports",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bcm Data Exports 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-bcm-data-exports",
|
|
@@ -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",
|