@aws-sdk/client-bedrock-data-automation-runtime 3.706.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.
Files changed (87) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +227 -0
  3. package/dist-cjs/BedrockDataAutomationRuntime.js +15 -0
  4. package/dist-cjs/BedrockDataAutomationRuntimeClient.js +50 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/GetDataAutomationStatusCommand.js +26 -0
  8. package/dist-cjs/commands/InvokeDataAutomationAsyncCommand.js +26 -0
  9. package/dist-cjs/commands/index.js +5 -0
  10. package/dist-cjs/endpoint/EndpointParameters.js +18 -0
  11. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  12. package/dist-cjs/endpoint/ruleset.js +7 -0
  13. package/dist-cjs/extensionConfiguration.js +2 -0
  14. package/dist-cjs/index.js +10 -0
  15. package/dist-cjs/models/BedrockDataAutomationRuntimeServiceException.js +12 -0
  16. package/dist-cjs/models/index.js +4 -0
  17. package/dist-cjs/models/models_0.js +97 -0
  18. package/dist-cjs/protocols/Aws_json1_1.js +182 -0
  19. package/dist-cjs/runtimeConfig.browser.js +39 -0
  20. package/dist-cjs/runtimeConfig.js +50 -0
  21. package/dist-cjs/runtimeConfig.native.js +15 -0
  22. package/dist-cjs/runtimeConfig.shared.js +34 -0
  23. package/dist-cjs/runtimeExtensions.js +25 -0
  24. package/dist-es/BedrockDataAutomationRuntime.js +11 -0
  25. package/dist-es/BedrockDataAutomationRuntimeClient.js +46 -0
  26. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  27. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  28. package/dist-es/commands/GetDataAutomationStatusCommand.js +22 -0
  29. package/dist-es/commands/InvokeDataAutomationAsyncCommand.js +22 -0
  30. package/dist-es/commands/index.js +2 -0
  31. package/dist-es/endpoint/EndpointParameters.js +14 -0
  32. package/dist-es/endpoint/endpointResolver.js +14 -0
  33. package/dist-es/endpoint/ruleset.js +4 -0
  34. package/dist-es/extensionConfiguration.js +1 -0
  35. package/dist-es/index.js +5 -0
  36. package/dist-es/models/BedrockDataAutomationRuntimeServiceException.js +8 -0
  37. package/dist-es/models/index.js +1 -0
  38. package/dist-es/models/models_0.js +88 -0
  39. package/dist-es/protocols/Aws_json1_1.js +175 -0
  40. package/dist-es/runtimeConfig.browser.js +34 -0
  41. package/dist-es/runtimeConfig.js +45 -0
  42. package/dist-es/runtimeConfig.native.js +11 -0
  43. package/dist-es/runtimeConfig.shared.js +30 -0
  44. package/dist-es/runtimeExtensions.js +21 -0
  45. package/dist-types/BedrockDataAutomationRuntime.d.ts +24 -0
  46. package/dist-types/BedrockDataAutomationRuntimeClient.d.ts +171 -0
  47. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  48. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  49. package/dist-types/commands/GetDataAutomationStatusCommand.d.ts +91 -0
  50. package/dist-types/commands/InvokeDataAutomationAsyncCommand.d.ts +114 -0
  51. package/dist-types/commands/index.d.ts +2 -0
  52. package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
  53. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  54. package/dist-types/endpoint/ruleset.d.ts +2 -0
  55. package/dist-types/extensionConfiguration.d.ts +9 -0
  56. package/dist-types/index.d.ts +13 -0
  57. package/dist-types/models/BedrockDataAutomationRuntimeServiceException.d.ts +14 -0
  58. package/dist-types/models/index.d.ts +1 -0
  59. package/dist-types/models/models_0.d.ts +299 -0
  60. package/dist-types/protocols/Aws_json1_1.d.ts +20 -0
  61. package/dist-types/runtimeConfig.browser.d.ts +48 -0
  62. package/dist-types/runtimeConfig.d.ts +48 -0
  63. package/dist-types/runtimeConfig.native.d.ts +47 -0
  64. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  65. package/dist-types/runtimeExtensions.d.ts +17 -0
  66. package/dist-types/ts3.4/BedrockDataAutomationRuntime.d.ts +41 -0
  67. package/dist-types/ts3.4/BedrockDataAutomationRuntimeClient.d.ts +133 -0
  68. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  69. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  70. package/dist-types/ts3.4/commands/GetDataAutomationStatusCommand.d.ts +51 -0
  71. package/dist-types/ts3.4/commands/InvokeDataAutomationAsyncCommand.d.ts +51 -0
  72. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  73. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  74. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  75. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  76. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  77. package/dist-types/ts3.4/index.d.ts +8 -0
  78. package/dist-types/ts3.4/models/BedrockDataAutomationRuntimeServiceException.d.ts +9 -0
  79. package/dist-types/ts3.4/models/index.d.ts +1 -0
  80. package/dist-types/ts3.4/models/models_0.d.ts +111 -0
  81. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +29 -0
  82. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +95 -0
  83. package/dist-types/ts3.4/runtimeConfig.d.ts +96 -0
  84. package/dist-types/ts3.4/runtimeConfig.native.d.ts +89 -0
  85. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
  86. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  87. package/package.json +103 -0
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultEndpointResolver = void 0;
4
+ const util_endpoints_1 = require("@aws-sdk/util-endpoints");
5
+ const util_endpoints_2 = require("@smithy/util-endpoints");
6
+ const ruleset_1 = require("./ruleset");
7
+ const cache = new util_endpoints_2.EndpointCache({
8
+ size: 50,
9
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
10
+ });
11
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
12
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
13
+ endpointParams: endpointParams,
14
+ logger: context.logger,
15
+ }));
16
+ };
17
+ exports.defaultEndpointResolver = defaultEndpointResolver;
18
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ruleSet = void 0;
4
+ const s = "required", t = "fn", u = "argv", v = "ref";
5
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
6
+ const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ rules: [{ endpoint: { url: "https://bedrock-data-automation-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ rules: [{ endpoint: { url: "https://bedrock-data-automation-runtime-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ rules: [{ endpoint: { url: "https://bedrock-data-automation-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { rules: [{ endpoint: { url: "https://bedrock-data-automation-runtime.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
7
+ exports.ruleSet = _data;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BedrockDataAutomationRuntimeServiceException = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./BedrockDataAutomationRuntimeClient"), exports);
6
+ tslib_1.__exportStar(require("./BedrockDataAutomationRuntime"), exports);
7
+ tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./models"), exports);
9
+ var BedrockDataAutomationRuntimeServiceException_1 = require("./models/BedrockDataAutomationRuntimeServiceException");
10
+ Object.defineProperty(exports, "BedrockDataAutomationRuntimeServiceException", { enumerable: true, get: function () { return BedrockDataAutomationRuntimeServiceException_1.BedrockDataAutomationRuntimeServiceException; } });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BedrockDataAutomationRuntimeServiceException = exports.__ServiceException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
+ class BedrockDataAutomationRuntimeServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, BedrockDataAutomationRuntimeServiceException.prototype);
10
+ }
11
+ }
12
+ exports.BedrockDataAutomationRuntimeServiceException = BedrockDataAutomationRuntimeServiceException;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./models_0"), exports);
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceQuotaExceededException = exports.DataAutomationStage = exports.BlueprintStage = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.AutomationJobStatus = exports.AccessDeniedException = void 0;
4
+ const BedrockDataAutomationRuntimeServiceException_1 = require("./BedrockDataAutomationRuntimeServiceException");
5
+ class AccessDeniedException extends BedrockDataAutomationRuntimeServiceException_1.BedrockDataAutomationRuntimeServiceException {
6
+ constructor(opts) {
7
+ super({
8
+ name: "AccessDeniedException",
9
+ $fault: "client",
10
+ ...opts,
11
+ });
12
+ this.name = "AccessDeniedException";
13
+ this.$fault = "client";
14
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
15
+ }
16
+ }
17
+ exports.AccessDeniedException = AccessDeniedException;
18
+ exports.AutomationJobStatus = {
19
+ CLIENT_ERROR: "ClientError",
20
+ CREATED: "Created",
21
+ IN_PROGRESS: "InProgress",
22
+ SERVICE_ERROR: "ServiceError",
23
+ SUCCESS: "Success",
24
+ };
25
+ class InternalServerException extends BedrockDataAutomationRuntimeServiceException_1.BedrockDataAutomationRuntimeServiceException {
26
+ constructor(opts) {
27
+ super({
28
+ name: "InternalServerException",
29
+ $fault: "server",
30
+ ...opts,
31
+ });
32
+ this.name = "InternalServerException";
33
+ this.$fault = "server";
34
+ Object.setPrototypeOf(this, InternalServerException.prototype);
35
+ }
36
+ }
37
+ exports.InternalServerException = InternalServerException;
38
+ class ResourceNotFoundException extends BedrockDataAutomationRuntimeServiceException_1.BedrockDataAutomationRuntimeServiceException {
39
+ constructor(opts) {
40
+ super({
41
+ name: "ResourceNotFoundException",
42
+ $fault: "client",
43
+ ...opts,
44
+ });
45
+ this.name = "ResourceNotFoundException";
46
+ this.$fault = "client";
47
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
48
+ }
49
+ }
50
+ exports.ResourceNotFoundException = ResourceNotFoundException;
51
+ class ThrottlingException extends BedrockDataAutomationRuntimeServiceException_1.BedrockDataAutomationRuntimeServiceException {
52
+ constructor(opts) {
53
+ super({
54
+ name: "ThrottlingException",
55
+ $fault: "client",
56
+ ...opts,
57
+ });
58
+ this.name = "ThrottlingException";
59
+ this.$fault = "client";
60
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
61
+ }
62
+ }
63
+ exports.ThrottlingException = ThrottlingException;
64
+ class ValidationException extends BedrockDataAutomationRuntimeServiceException_1.BedrockDataAutomationRuntimeServiceException {
65
+ constructor(opts) {
66
+ super({
67
+ name: "ValidationException",
68
+ $fault: "client",
69
+ ...opts,
70
+ });
71
+ this.name = "ValidationException";
72
+ this.$fault = "client";
73
+ Object.setPrototypeOf(this, ValidationException.prototype);
74
+ }
75
+ }
76
+ exports.ValidationException = ValidationException;
77
+ exports.BlueprintStage = {
78
+ DEVELOPMENT: "DEVELOPMENT",
79
+ LIVE: "LIVE",
80
+ };
81
+ exports.DataAutomationStage = {
82
+ DEVELOPMENT: "DEVELOPMENT",
83
+ LIVE: "LIVE",
84
+ };
85
+ class ServiceQuotaExceededException extends BedrockDataAutomationRuntimeServiceException_1.BedrockDataAutomationRuntimeServiceException {
86
+ constructor(opts) {
87
+ super({
88
+ name: "ServiceQuotaExceededException",
89
+ $fault: "client",
90
+ ...opts,
91
+ });
92
+ this.name = "ServiceQuotaExceededException";
93
+ this.$fault = "client";
94
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
95
+ }
96
+ }
97
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_InvokeDataAutomationAsyncCommand = exports.de_GetDataAutomationStatusCommand = exports.se_InvokeDataAutomationAsyncCommand = exports.se_GetDataAutomationStatusCommand = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const protocol_http_1 = require("@smithy/protocol-http");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const uuid_1 = require("uuid");
8
+ const BedrockDataAutomationRuntimeServiceException_1 = require("../models/BedrockDataAutomationRuntimeServiceException");
9
+ const models_0_1 = require("../models/models_0");
10
+ const se_GetDataAutomationStatusCommand = async (input, context) => {
11
+ const headers = sharedHeaders("GetDataAutomationStatus");
12
+ let body;
13
+ body = JSON.stringify((0, smithy_client_1._json)(input));
14
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
15
+ };
16
+ exports.se_GetDataAutomationStatusCommand = se_GetDataAutomationStatusCommand;
17
+ const se_InvokeDataAutomationAsyncCommand = async (input, context) => {
18
+ const headers = sharedHeaders("InvokeDataAutomationAsync");
19
+ let body;
20
+ body = JSON.stringify(se_InvokeDataAutomationAsyncRequest(input, context));
21
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
+ };
23
+ exports.se_InvokeDataAutomationAsyncCommand = se_InvokeDataAutomationAsyncCommand;
24
+ const de_GetDataAutomationStatusCommand = async (output, context) => {
25
+ if (output.statusCode >= 300) {
26
+ return de_CommandError(output, context);
27
+ }
28
+ const data = await (0, core_1.parseJsonBody)(output.body, context);
29
+ let contents = {};
30
+ contents = (0, smithy_client_1._json)(data);
31
+ const response = {
32
+ $metadata: deserializeMetadata(output),
33
+ ...contents,
34
+ };
35
+ return response;
36
+ };
37
+ exports.de_GetDataAutomationStatusCommand = de_GetDataAutomationStatusCommand;
38
+ const de_InvokeDataAutomationAsyncCommand = async (output, context) => {
39
+ if (output.statusCode >= 300) {
40
+ return de_CommandError(output, context);
41
+ }
42
+ const data = await (0, core_1.parseJsonBody)(output.body, context);
43
+ let contents = {};
44
+ contents = (0, smithy_client_1._json)(data);
45
+ const response = {
46
+ $metadata: deserializeMetadata(output),
47
+ ...contents,
48
+ };
49
+ return response;
50
+ };
51
+ exports.de_InvokeDataAutomationAsyncCommand = de_InvokeDataAutomationAsyncCommand;
52
+ const de_CommandError = async (output, context) => {
53
+ const parsedOutput = {
54
+ ...output,
55
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context),
56
+ };
57
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
58
+ switch (errorCode) {
59
+ case "AccessDeniedException":
60
+ case "com.amazonaws.bedrockdataautomationruntime#AccessDeniedException":
61
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
62
+ case "InternalServerException":
63
+ case "com.amazonaws.bedrockdataautomationruntime#InternalServerException":
64
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
65
+ case "ResourceNotFoundException":
66
+ case "com.amazonaws.bedrockdataautomationruntime#ResourceNotFoundException":
67
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
68
+ case "ThrottlingException":
69
+ case "com.amazonaws.bedrockdataautomationruntime#ThrottlingException":
70
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
71
+ case "ValidationException":
72
+ case "com.amazonaws.bedrockdataautomationruntime#ValidationException":
73
+ throw await de_ValidationExceptionRes(parsedOutput, context);
74
+ case "ServiceQuotaExceededException":
75
+ case "com.amazonaws.bedrockdataautomationruntime#ServiceQuotaExceededException":
76
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
77
+ default:
78
+ const parsedBody = parsedOutput.body;
79
+ return throwDefaultError({
80
+ output,
81
+ parsedBody,
82
+ errorCode,
83
+ });
84
+ }
85
+ };
86
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
87
+ const body = parsedOutput.body;
88
+ const deserialized = (0, smithy_client_1._json)(body);
89
+ const exception = new models_0_1.AccessDeniedException({
90
+ $metadata: deserializeMetadata(parsedOutput),
91
+ ...deserialized,
92
+ });
93
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
94
+ };
95
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
96
+ const body = parsedOutput.body;
97
+ const deserialized = (0, smithy_client_1._json)(body);
98
+ const exception = new models_0_1.InternalServerException({
99
+ $metadata: deserializeMetadata(parsedOutput),
100
+ ...deserialized,
101
+ });
102
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
103
+ };
104
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
105
+ const body = parsedOutput.body;
106
+ const deserialized = (0, smithy_client_1._json)(body);
107
+ const exception = new models_0_1.ResourceNotFoundException({
108
+ $metadata: deserializeMetadata(parsedOutput),
109
+ ...deserialized,
110
+ });
111
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
112
+ };
113
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
114
+ const body = parsedOutput.body;
115
+ const deserialized = (0, smithy_client_1._json)(body);
116
+ const exception = new models_0_1.ServiceQuotaExceededException({
117
+ $metadata: deserializeMetadata(parsedOutput),
118
+ ...deserialized,
119
+ });
120
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
121
+ };
122
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
123
+ const body = parsedOutput.body;
124
+ const deserialized = (0, smithy_client_1._json)(body);
125
+ const exception = new models_0_1.ThrottlingException({
126
+ $metadata: deserializeMetadata(parsedOutput),
127
+ ...deserialized,
128
+ });
129
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
130
+ };
131
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
132
+ const body = parsedOutput.body;
133
+ const deserialized = (0, smithy_client_1._json)(body);
134
+ const exception = new models_0_1.ValidationException({
135
+ $metadata: deserializeMetadata(parsedOutput),
136
+ ...deserialized,
137
+ });
138
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
139
+ };
140
+ const se_InvokeDataAutomationAsyncRequest = (input, context) => {
141
+ return (0, smithy_client_1.take)(input, {
142
+ blueprints: smithy_client_1._json,
143
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
144
+ dataAutomationConfiguration: smithy_client_1._json,
145
+ encryptionConfiguration: smithy_client_1._json,
146
+ inputConfiguration: smithy_client_1._json,
147
+ notificationConfiguration: smithy_client_1._json,
148
+ outputConfiguration: smithy_client_1._json,
149
+ });
150
+ };
151
+ const deserializeMetadata = (output) => ({
152
+ httpStatusCode: output.statusCode,
153
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
154
+ extendedRequestId: output.headers["x-amz-id-2"],
155
+ cfId: output.headers["x-amz-cf-id"],
156
+ });
157
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
158
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(BedrockDataAutomationRuntimeServiceException_1.BedrockDataAutomationRuntimeServiceException);
159
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
160
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
161
+ const contents = {
162
+ protocol,
163
+ hostname,
164
+ port,
165
+ method: "POST",
166
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
167
+ headers,
168
+ };
169
+ if (resolvedHostname !== undefined) {
170
+ contents.hostname = resolvedHostname;
171
+ }
172
+ if (body !== undefined) {
173
+ contents.body = body;
174
+ }
175
+ return new protocol_http_1.HttpRequest(contents);
176
+ };
177
+ function sharedHeaders(operation) {
178
+ return {
179
+ "content-type": "application/x-amz-json-1.1",
180
+ "x-amz-target": `AmazonBedrockKeystoneRuntimeService.${operation}`,
181
+ };
182
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
10
+ const invalid_dependency_1 = require("@smithy/invalid-dependency");
11
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
12
+ const util_retry_1 = require("@smithy/util-retry");
13
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
14
+ const smithy_client_1 = require("@smithy/smithy-client");
15
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
16
+ const getRuntimeConfig = (config) => {
17
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ return {
21
+ ...clientSharedValues,
22
+ ...config,
23
+ runtime: "browser",
24
+ defaultsMode,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
28
+ (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
29
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
30
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
31
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
32
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
33
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
34
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
35
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
37
+ };
38
+ };
39
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const core_1 = require("@aws-sdk/core");
7
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
8
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
9
+ const config_resolver_1 = require("@smithy/config-resolver");
10
+ const hash_node_1 = require("@smithy/hash-node");
11
+ const middleware_retry_1 = require("@smithy/middleware-retry");
12
+ const node_config_provider_1 = require("@smithy/node-config-provider");
13
+ const node_http_handler_1 = require("@smithy/node-http-handler");
14
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
15
+ const util_retry_1 = require("@smithy/util-retry");
16
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
17
+ const smithy_client_1 = require("@smithy/smithy-client");
18
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
19
+ const smithy_client_2 = require("@smithy/smithy-client");
20
+ const getRuntimeConfig = (config) => {
21
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
22
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
25
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
26
+ return {
27
+ ...clientSharedValues,
28
+ ...config,
29
+ runtime: "node",
30
+ defaultsMode,
31
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
32
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
33
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
34
+ (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
35
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
36
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
37
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
38
+ retryMode: config?.retryMode ??
39
+ (0, node_config_provider_1.loadConfig)({
40
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
41
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
42
+ }),
43
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
44
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
45
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
46
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
47
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS),
48
+ };
49
+ };
50
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const smithy_client_1 = require("@smithy/smithy-client");
6
+ const url_parser_1 = require("@smithy/url-parser");
7
+ const util_base64_1 = require("@smithy/util-base64");
8
+ const util_utf8_1 = require("@smithy/util-utf8");
9
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
10
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
11
+ const getRuntimeConfig = (config) => {
12
+ return {
13
+ apiVersion: "2024-06-13",
14
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
15
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
16
+ disableHostPrefix: config?.disableHostPrefix ?? false,
17
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
18
+ extensions: config?.extensions ?? [],
19
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultBedrockDataAutomationRuntimeHttpAuthSchemeProvider,
20
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
21
+ {
22
+ schemeId: "aws.auth#sigv4",
23
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
24
+ signer: new core_1.AwsSdkSigV4Signer(),
25
+ },
26
+ ],
27
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
28
+ serviceId: config?.serviceId ?? "Bedrock Data Automation Runtime",
29
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
30
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
31
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
32
+ };
33
+ };
34
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveRuntimeExtensions = void 0;
4
+ const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
+ const protocol_http_1 = require("@smithy/protocol-http");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
8
+ const asPartial = (t) => t;
9
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
10
+ const extensionConfiguration = {
11
+ ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
12
+ ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
13
+ ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
14
+ ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)),
15
+ };
16
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
17
+ return {
18
+ ...runtimeConfig,
19
+ ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
20
+ ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
21
+ ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
22
+ ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration),
23
+ };
24
+ };
25
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -0,0 +1,11 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { BedrockDataAutomationRuntimeClient, } from "./BedrockDataAutomationRuntimeClient";
3
+ import { GetDataAutomationStatusCommand, } from "./commands/GetDataAutomationStatusCommand";
4
+ import { InvokeDataAutomationAsyncCommand, } from "./commands/InvokeDataAutomationAsyncCommand";
5
+ const commands = {
6
+ GetDataAutomationStatusCommand,
7
+ InvokeDataAutomationAsyncCommand,
8
+ };
9
+ export class BedrockDataAutomationRuntime extends BedrockDataAutomationRuntimeClient {
10
+ }
11
+ createAggregatedClient(commands, BedrockDataAutomationRuntime);
@@ -0,0 +1,46 @@
1
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
5
+ import { resolveRegionConfig } from "@smithy/config-resolver";
6
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
+ import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
+ import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
10
+ import { Client as __Client, } from "@smithy/smithy-client";
11
+ import { defaultBedrockDataAutomationRuntimeHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
12
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
13
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
14
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
15
+ export { __Client };
16
+ export class BedrockDataAutomationRuntimeClient extends __Client {
17
+ constructor(...[configuration]) {
18
+ const _config_0 = __getRuntimeConfig(configuration || {});
19
+ const _config_1 = resolveClientEndpointParameters(_config_0);
20
+ const _config_2 = resolveUserAgentConfig(_config_1);
21
+ const _config_3 = resolveRetryConfig(_config_2);
22
+ const _config_4 = resolveRegionConfig(_config_3);
23
+ const _config_5 = resolveHostHeaderConfig(_config_4);
24
+ const _config_6 = resolveEndpointConfig(_config_5);
25
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
26
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
27
+ super(_config_8);
28
+ this.config = _config_8;
29
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
30
+ this.middlewareStack.use(getRetryPlugin(this.config));
31
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
32
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
33
+ this.middlewareStack.use(getLoggerPlugin(this.config));
34
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
35
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
36
+ httpAuthSchemeParametersProvider: defaultBedrockDataAutomationRuntimeHttpAuthSchemeParametersProvider,
37
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
38
+ "aws.auth#sigv4": config.credentials,
39
+ }),
40
+ }));
41
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
42
+ }
43
+ destroy() {
44
+ super.destroy();
45
+ }
46
+ }
@@ -0,0 +1,38 @@
1
+ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
+ let _credentials = runtimeConfig.credentials;
5
+ return {
6
+ setHttpAuthScheme(httpAuthScheme) {
7
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
8
+ if (index === -1) {
9
+ _httpAuthSchemes.push(httpAuthScheme);
10
+ }
11
+ else {
12
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
13
+ }
14
+ },
15
+ httpAuthSchemes() {
16
+ return _httpAuthSchemes;
17
+ },
18
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
19
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
20
+ },
21
+ httpAuthSchemeProvider() {
22
+ return _httpAuthSchemeProvider;
23
+ },
24
+ setCredentials(credentials) {
25
+ _credentials = credentials;
26
+ },
27
+ credentials() {
28
+ return _credentials;
29
+ },
30
+ };
31
+ };
32
+ export const resolveHttpAuthRuntimeConfig = (config) => {
33
+ return {
34
+ httpAuthSchemes: config.httpAuthSchemes(),
35
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
+ credentials: config.credentials(),
37
+ };
38
+ };
@@ -0,0 +1,41 @@
1
+ import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
2
+ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
3
+ export const defaultBedrockDataAutomationRuntimeHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
+ return {
5
+ operation: getSmithyContext(context).operation,
6
+ region: (await normalizeProvider(config.region)()) ||
7
+ (() => {
8
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
9
+ })(),
10
+ };
11
+ };
12
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
13
+ return {
14
+ schemeId: "aws.auth#sigv4",
15
+ signingProperties: {
16
+ name: "bedrock",
17
+ region: authParameters.region,
18
+ },
19
+ propertiesExtractor: (config, context) => ({
20
+ signingProperties: {
21
+ config,
22
+ context,
23
+ },
24
+ }),
25
+ };
26
+ }
27
+ export const defaultBedrockDataAutomationRuntimeHttpAuthSchemeProvider = (authParameters) => {
28
+ const options = [];
29
+ switch (authParameters.operation) {
30
+ default: {
31
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
32
+ }
33
+ }
34
+ return options;
35
+ };
36
+ export const resolveHttpAuthSchemeConfig = (config) => {
37
+ const config_0 = resolveAwsSdkSigV4Config(config);
38
+ return {
39
+ ...config_0,
40
+ };
41
+ };