@aws-sdk/client-data-pipeline 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 +20 -60
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -210,6 +210,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
210
210
|
var import_types = require("@smithy/types");
|
|
211
211
|
|
|
212
212
|
// src/protocols/Aws_json1_1.ts
|
|
213
|
+
var import_core2 = require("@aws-sdk/core");
|
|
213
214
|
|
|
214
215
|
|
|
215
216
|
|
|
@@ -445,7 +446,7 @@ var de_ActivatePipelineCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
445
446
|
if (output.statusCode >= 300) {
|
|
446
447
|
return de_CommandError(output, context);
|
|
447
448
|
}
|
|
448
|
-
const data = await
|
|
449
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
449
450
|
let contents = {};
|
|
450
451
|
contents = (0, import_smithy_client._json)(data);
|
|
451
452
|
const response = {
|
|
@@ -458,7 +459,7 @@ var de_AddTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
458
459
|
if (output.statusCode >= 300) {
|
|
459
460
|
return de_CommandError(output, context);
|
|
460
461
|
}
|
|
461
|
-
const data = await
|
|
462
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
462
463
|
let contents = {};
|
|
463
464
|
contents = (0, import_smithy_client._json)(data);
|
|
464
465
|
const response = {
|
|
@@ -471,7 +472,7 @@ var de_CreatePipelineCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
471
472
|
if (output.statusCode >= 300) {
|
|
472
473
|
return de_CommandError(output, context);
|
|
473
474
|
}
|
|
474
|
-
const data = await
|
|
475
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
475
476
|
let contents = {};
|
|
476
477
|
contents = (0, import_smithy_client._json)(data);
|
|
477
478
|
const response = {
|
|
@@ -484,7 +485,7 @@ var de_DeactivatePipelineCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
484
485
|
if (output.statusCode >= 300) {
|
|
485
486
|
return de_CommandError(output, context);
|
|
486
487
|
}
|
|
487
|
-
const data = await
|
|
488
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
488
489
|
let contents = {};
|
|
489
490
|
contents = (0, import_smithy_client._json)(data);
|
|
490
491
|
const response = {
|
|
@@ -507,7 +508,7 @@ var de_DescribeObjectsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
507
508
|
if (output.statusCode >= 300) {
|
|
508
509
|
return de_CommandError(output, context);
|
|
509
510
|
}
|
|
510
|
-
const data = await
|
|
511
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
511
512
|
let contents = {};
|
|
512
513
|
contents = (0, import_smithy_client._json)(data);
|
|
513
514
|
const response = {
|
|
@@ -520,7 +521,7 @@ var de_DescribePipelinesCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
520
521
|
if (output.statusCode >= 300) {
|
|
521
522
|
return de_CommandError(output, context);
|
|
522
523
|
}
|
|
523
|
-
const data = await
|
|
524
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
524
525
|
let contents = {};
|
|
525
526
|
contents = (0, import_smithy_client._json)(data);
|
|
526
527
|
const response = {
|
|
@@ -533,7 +534,7 @@ var de_EvaluateExpressionCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
533
534
|
if (output.statusCode >= 300) {
|
|
534
535
|
return de_CommandError(output, context);
|
|
535
536
|
}
|
|
536
|
-
const data = await
|
|
537
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
537
538
|
let contents = {};
|
|
538
539
|
contents = (0, import_smithy_client._json)(data);
|
|
539
540
|
const response = {
|
|
@@ -546,7 +547,7 @@ var de_GetPipelineDefinitionCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
546
547
|
if (output.statusCode >= 300) {
|
|
547
548
|
return de_CommandError(output, context);
|
|
548
549
|
}
|
|
549
|
-
const data = await
|
|
550
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
550
551
|
let contents = {};
|
|
551
552
|
contents = (0, import_smithy_client._json)(data);
|
|
552
553
|
const response = {
|
|
@@ -559,7 +560,7 @@ var de_ListPipelinesCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
559
560
|
if (output.statusCode >= 300) {
|
|
560
561
|
return de_CommandError(output, context);
|
|
561
562
|
}
|
|
562
|
-
const data = await
|
|
563
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
563
564
|
let contents = {};
|
|
564
565
|
contents = (0, import_smithy_client._json)(data);
|
|
565
566
|
const response = {
|
|
@@ -572,7 +573,7 @@ var de_PollForTaskCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
572
573
|
if (output.statusCode >= 300) {
|
|
573
574
|
return de_CommandError(output, context);
|
|
574
575
|
}
|
|
575
|
-
const data = await
|
|
576
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
576
577
|
let contents = {};
|
|
577
578
|
contents = (0, import_smithy_client._json)(data);
|
|
578
579
|
const response = {
|
|
@@ -585,7 +586,7 @@ var de_PutPipelineDefinitionCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
585
586
|
if (output.statusCode >= 300) {
|
|
586
587
|
return de_CommandError(output, context);
|
|
587
588
|
}
|
|
588
|
-
const data = await
|
|
589
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
589
590
|
let contents = {};
|
|
590
591
|
contents = (0, import_smithy_client._json)(data);
|
|
591
592
|
const response = {
|
|
@@ -598,7 +599,7 @@ var de_QueryObjectsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
598
599
|
if (output.statusCode >= 300) {
|
|
599
600
|
return de_CommandError(output, context);
|
|
600
601
|
}
|
|
601
|
-
const data = await
|
|
602
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
602
603
|
let contents = {};
|
|
603
604
|
contents = (0, import_smithy_client._json)(data);
|
|
604
605
|
const response = {
|
|
@@ -611,7 +612,7 @@ var de_RemoveTagsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
611
612
|
if (output.statusCode >= 300) {
|
|
612
613
|
return de_CommandError(output, context);
|
|
613
614
|
}
|
|
614
|
-
const data = await
|
|
615
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
615
616
|
let contents = {};
|
|
616
617
|
contents = (0, import_smithy_client._json)(data);
|
|
617
618
|
const response = {
|
|
@@ -624,7 +625,7 @@ var de_ReportTaskProgressCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
624
625
|
if (output.statusCode >= 300) {
|
|
625
626
|
return de_CommandError(output, context);
|
|
626
627
|
}
|
|
627
|
-
const data = await
|
|
628
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
628
629
|
let contents = {};
|
|
629
630
|
contents = (0, import_smithy_client._json)(data);
|
|
630
631
|
const response = {
|
|
@@ -637,7 +638,7 @@ var de_ReportTaskRunnerHeartbeatCommand = /* @__PURE__ */ __name(async (output,
|
|
|
637
638
|
if (output.statusCode >= 300) {
|
|
638
639
|
return de_CommandError(output, context);
|
|
639
640
|
}
|
|
640
|
-
const data = await
|
|
641
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
641
642
|
let contents = {};
|
|
642
643
|
contents = (0, import_smithy_client._json)(data);
|
|
643
644
|
const response = {
|
|
@@ -660,7 +661,7 @@ var de_SetTaskStatusCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
660
661
|
if (output.statusCode >= 300) {
|
|
661
662
|
return de_CommandError(output, context);
|
|
662
663
|
}
|
|
663
|
-
const data = await
|
|
664
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
664
665
|
let contents = {};
|
|
665
666
|
contents = (0, import_smithy_client._json)(data);
|
|
666
667
|
const response = {
|
|
@@ -673,7 +674,7 @@ var de_ValidatePipelineDefinitionCommand = /* @__PURE__ */ __name(async (output,
|
|
|
673
674
|
if (output.statusCode >= 300) {
|
|
674
675
|
return de_CommandError(output, context);
|
|
675
676
|
}
|
|
676
|
-
const data = await
|
|
677
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
677
678
|
let contents = {};
|
|
678
679
|
contents = (0, import_smithy_client._json)(data);
|
|
679
680
|
const response = {
|
|
@@ -685,9 +686,9 @@ var de_ValidatePipelineDefinitionCommand = /* @__PURE__ */ __name(async (output,
|
|
|
685
686
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
686
687
|
const parsedOutput = {
|
|
687
688
|
...output,
|
|
688
|
-
body: await
|
|
689
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
689
690
|
};
|
|
690
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
691
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
691
692
|
switch (errorCode) {
|
|
692
693
|
case "InternalServiceError":
|
|
693
694
|
case "com.amazonaws.datapipeline#InternalServiceError":
|
|
@@ -771,7 +772,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
771
772
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
772
773
|
cfId: output.headers["x-amz-cf-id"]
|
|
773
774
|
}), "deserializeMetadata");
|
|
774
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
775
775
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(DataPipelineServiceException);
|
|
776
776
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
777
777
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -798,46 +798,6 @@ function sharedHeaders(operation) {
|
|
|
798
798
|
};
|
|
799
799
|
}
|
|
800
800
|
__name(sharedHeaders, "sharedHeaders");
|
|
801
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
802
|
-
if (encoded.length) {
|
|
803
|
-
return JSON.parse(encoded);
|
|
804
|
-
}
|
|
805
|
-
return {};
|
|
806
|
-
}), "parseBody");
|
|
807
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
808
|
-
const value = await parseBody(errorBody, context);
|
|
809
|
-
value.message = value.message ?? value.Message;
|
|
810
|
-
return value;
|
|
811
|
-
}, "parseErrorBody");
|
|
812
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
813
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
814
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
815
|
-
let cleanValue = rawValue;
|
|
816
|
-
if (typeof cleanValue === "number") {
|
|
817
|
-
cleanValue = cleanValue.toString();
|
|
818
|
-
}
|
|
819
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
820
|
-
cleanValue = cleanValue.split(",")[0];
|
|
821
|
-
}
|
|
822
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
823
|
-
cleanValue = cleanValue.split(":")[0];
|
|
824
|
-
}
|
|
825
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
826
|
-
cleanValue = cleanValue.split("#")[1];
|
|
827
|
-
}
|
|
828
|
-
return cleanValue;
|
|
829
|
-
}, "sanitizeErrorCode");
|
|
830
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
831
|
-
if (headerKey !== void 0) {
|
|
832
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
833
|
-
}
|
|
834
|
-
if (data.code !== void 0) {
|
|
835
|
-
return sanitizeErrorCode(data.code);
|
|
836
|
-
}
|
|
837
|
-
if (data["__type"] !== void 0) {
|
|
838
|
-
return sanitizeErrorCode(data["__type"]);
|
|
839
|
-
}
|
|
840
|
-
}, "loadRestJsonErrorCode");
|
|
841
801
|
|
|
842
802
|
// src/commands/ActivatePipelineCommand.ts
|
|
843
803
|
var _ActivatePipelineCommand = class _ActivatePipelineCommand 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, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { DataPipelineServiceException as __BaseException } from "../models/DataPipelineServiceException";
|
|
@@ -472,43 +473,3 @@ function sharedHeaders(operation) {
|
|
|
472
473
|
"x-amz-target": `DataPipeline.${operation}`,
|
|
473
474
|
};
|
|
474
475
|
}
|
|
475
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
476
|
-
if (encoded.length) {
|
|
477
|
-
return JSON.parse(encoded);
|
|
478
|
-
}
|
|
479
|
-
return {};
|
|
480
|
-
});
|
|
481
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
482
|
-
const value = await parseBody(errorBody, context);
|
|
483
|
-
value.message = value.message ?? value.Message;
|
|
484
|
-
return value;
|
|
485
|
-
};
|
|
486
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
487
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
488
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
489
|
-
let cleanValue = rawValue;
|
|
490
|
-
if (typeof cleanValue === "number") {
|
|
491
|
-
cleanValue = cleanValue.toString();
|
|
492
|
-
}
|
|
493
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
494
|
-
cleanValue = cleanValue.split(",")[0];
|
|
495
|
-
}
|
|
496
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
497
|
-
cleanValue = cleanValue.split(":")[0];
|
|
498
|
-
}
|
|
499
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
500
|
-
cleanValue = cleanValue.split("#")[1];
|
|
501
|
-
}
|
|
502
|
-
return cleanValue;
|
|
503
|
-
};
|
|
504
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
505
|
-
if (headerKey !== undefined) {
|
|
506
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
507
|
-
}
|
|
508
|
-
if (data.code !== undefined) {
|
|
509
|
-
return sanitizeErrorCode(data.code);
|
|
510
|
-
}
|
|
511
|
-
if (data["__type"] !== undefined) {
|
|
512
|
-
return sanitizeErrorCode(data["__type"]);
|
|
513
|
-
}
|
|
514
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-data-pipeline",
|
|
3
3
|
"description": "AWS SDK for JavaScript Data Pipeline 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-data-pipeline",
|
|
@@ -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",
|