@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,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_GetDataAutomationStatusCommand, se_GetDataAutomationStatusCommand } from "../protocols/Aws_json1_1";
6
+ export { $Command };
7
+ export class GetDataAutomationStatusCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("AmazonBedrockKeystoneRuntimeService", "GetDataAutomationStatus", {})
17
+ .n("BedrockDataAutomationRuntimeClient", "GetDataAutomationStatusCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_GetDataAutomationStatusCommand)
20
+ .de(de_GetDataAutomationStatusCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_InvokeDataAutomationAsyncCommand, se_InvokeDataAutomationAsyncCommand } from "../protocols/Aws_json1_1";
6
+ export { $Command };
7
+ export class InvokeDataAutomationAsyncCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("AmazonBedrockKeystoneRuntimeService", "InvokeDataAutomationAsync", {})
17
+ .n("BedrockDataAutomationRuntimeClient", "InvokeDataAutomationAsyncCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_InvokeDataAutomationAsyncCommand)
20
+ .de(de_InvokeDataAutomationAsyncCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./GetDataAutomationStatusCommand";
2
+ export * from "./InvokeDataAutomationAsyncCommand";
@@ -0,0 +1,14 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return {
3
+ ...options,
4
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
5
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
6
+ defaultSigningName: "bedrock",
7
+ };
8
+ };
9
+ export const commonParams = {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
@@ -0,0 +1,14 @@
1
+ import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
+ import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
3
+ import { ruleSet } from "./ruleset";
4
+ const cache = new EndpointCache({
5
+ size: 50,
6
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
7
+ });
8
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
9
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
10
+ endpointParams: endpointParams,
11
+ logger: context.logger,
12
+ }));
13
+ };
14
+ customEndpointFunctions.aws = awsEndpointFunctions;
@@ -0,0 +1,4 @@
1
+ const s = "required", t = "fn", u = "argv", v = "ref";
2
+ 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" }];
3
+ 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 }] };
4
+ export const ruleSet = _data;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from "./BedrockDataAutomationRuntimeClient";
2
+ export * from "./BedrockDataAutomationRuntime";
3
+ export * from "./commands";
4
+ export * from "./models";
5
+ export { BedrockDataAutomationRuntimeServiceException } from "./models/BedrockDataAutomationRuntimeServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class BedrockDataAutomationRuntimeServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, BedrockDataAutomationRuntimeServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,88 @@
1
+ import { BedrockDataAutomationRuntimeServiceException as __BaseException } from "./BedrockDataAutomationRuntimeServiceException";
2
+ export class AccessDeniedException extends __BaseException {
3
+ constructor(opts) {
4
+ super({
5
+ name: "AccessDeniedException",
6
+ $fault: "client",
7
+ ...opts,
8
+ });
9
+ this.name = "AccessDeniedException";
10
+ this.$fault = "client";
11
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
12
+ }
13
+ }
14
+ export const AutomationJobStatus = {
15
+ CLIENT_ERROR: "ClientError",
16
+ CREATED: "Created",
17
+ IN_PROGRESS: "InProgress",
18
+ SERVICE_ERROR: "ServiceError",
19
+ SUCCESS: "Success",
20
+ };
21
+ export class InternalServerException extends __BaseException {
22
+ constructor(opts) {
23
+ super({
24
+ name: "InternalServerException",
25
+ $fault: "server",
26
+ ...opts,
27
+ });
28
+ this.name = "InternalServerException";
29
+ this.$fault = "server";
30
+ Object.setPrototypeOf(this, InternalServerException.prototype);
31
+ }
32
+ }
33
+ export class ResourceNotFoundException extends __BaseException {
34
+ constructor(opts) {
35
+ super({
36
+ name: "ResourceNotFoundException",
37
+ $fault: "client",
38
+ ...opts,
39
+ });
40
+ this.name = "ResourceNotFoundException";
41
+ this.$fault = "client";
42
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
43
+ }
44
+ }
45
+ export class ThrottlingException extends __BaseException {
46
+ constructor(opts) {
47
+ super({
48
+ name: "ThrottlingException",
49
+ $fault: "client",
50
+ ...opts,
51
+ });
52
+ this.name = "ThrottlingException";
53
+ this.$fault = "client";
54
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
55
+ }
56
+ }
57
+ export class ValidationException extends __BaseException {
58
+ constructor(opts) {
59
+ super({
60
+ name: "ValidationException",
61
+ $fault: "client",
62
+ ...opts,
63
+ });
64
+ this.name = "ValidationException";
65
+ this.$fault = "client";
66
+ Object.setPrototypeOf(this, ValidationException.prototype);
67
+ }
68
+ }
69
+ export const BlueprintStage = {
70
+ DEVELOPMENT: "DEVELOPMENT",
71
+ LIVE: "LIVE",
72
+ };
73
+ export const DataAutomationStage = {
74
+ DEVELOPMENT: "DEVELOPMENT",
75
+ LIVE: "LIVE",
76
+ };
77
+ export class ServiceQuotaExceededException extends __BaseException {
78
+ constructor(opts) {
79
+ super({
80
+ name: "ServiceQuotaExceededException",
81
+ $fault: "client",
82
+ ...opts,
83
+ });
84
+ this.name = "ServiceQuotaExceededException";
85
+ this.$fault = "client";
86
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
87
+ }
88
+ }
@@ -0,0 +1,175 @@
1
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
+ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, take, withBaseException, } from "@smithy/smithy-client";
4
+ import { v4 as generateIdempotencyToken } from "uuid";
5
+ import { BedrockDataAutomationRuntimeServiceException as __BaseException } from "../models/BedrockDataAutomationRuntimeServiceException";
6
+ import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
+ export const se_GetDataAutomationStatusCommand = async (input, context) => {
8
+ const headers = sharedHeaders("GetDataAutomationStatus");
9
+ let body;
10
+ body = JSON.stringify(_json(input));
11
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
12
+ };
13
+ export const se_InvokeDataAutomationAsyncCommand = async (input, context) => {
14
+ const headers = sharedHeaders("InvokeDataAutomationAsync");
15
+ let body;
16
+ body = JSON.stringify(se_InvokeDataAutomationAsyncRequest(input, context));
17
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
+ };
19
+ export const de_GetDataAutomationStatusCommand = async (output, context) => {
20
+ if (output.statusCode >= 300) {
21
+ return de_CommandError(output, context);
22
+ }
23
+ const data = await parseBody(output.body, context);
24
+ let contents = {};
25
+ contents = _json(data);
26
+ const response = {
27
+ $metadata: deserializeMetadata(output),
28
+ ...contents,
29
+ };
30
+ return response;
31
+ };
32
+ export const de_InvokeDataAutomationAsyncCommand = async (output, context) => {
33
+ if (output.statusCode >= 300) {
34
+ return de_CommandError(output, context);
35
+ }
36
+ const data = await parseBody(output.body, context);
37
+ let contents = {};
38
+ contents = _json(data);
39
+ const response = {
40
+ $metadata: deserializeMetadata(output),
41
+ ...contents,
42
+ };
43
+ return response;
44
+ };
45
+ const de_CommandError = async (output, context) => {
46
+ const parsedOutput = {
47
+ ...output,
48
+ body: await parseErrorBody(output.body, context),
49
+ };
50
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
51
+ switch (errorCode) {
52
+ case "AccessDeniedException":
53
+ case "com.amazonaws.bedrockdataautomationruntime#AccessDeniedException":
54
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
55
+ case "InternalServerException":
56
+ case "com.amazonaws.bedrockdataautomationruntime#InternalServerException":
57
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
58
+ case "ResourceNotFoundException":
59
+ case "com.amazonaws.bedrockdataautomationruntime#ResourceNotFoundException":
60
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
61
+ case "ThrottlingException":
62
+ case "com.amazonaws.bedrockdataautomationruntime#ThrottlingException":
63
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
64
+ case "ValidationException":
65
+ case "com.amazonaws.bedrockdataautomationruntime#ValidationException":
66
+ throw await de_ValidationExceptionRes(parsedOutput, context);
67
+ case "ServiceQuotaExceededException":
68
+ case "com.amazonaws.bedrockdataautomationruntime#ServiceQuotaExceededException":
69
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
70
+ default:
71
+ const parsedBody = parsedOutput.body;
72
+ return throwDefaultError({
73
+ output,
74
+ parsedBody,
75
+ errorCode,
76
+ });
77
+ }
78
+ };
79
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
80
+ const body = parsedOutput.body;
81
+ const deserialized = _json(body);
82
+ const exception = new AccessDeniedException({
83
+ $metadata: deserializeMetadata(parsedOutput),
84
+ ...deserialized,
85
+ });
86
+ return __decorateServiceException(exception, body);
87
+ };
88
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
89
+ const body = parsedOutput.body;
90
+ const deserialized = _json(body);
91
+ const exception = new InternalServerException({
92
+ $metadata: deserializeMetadata(parsedOutput),
93
+ ...deserialized,
94
+ });
95
+ return __decorateServiceException(exception, body);
96
+ };
97
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
98
+ const body = parsedOutput.body;
99
+ const deserialized = _json(body);
100
+ const exception = new ResourceNotFoundException({
101
+ $metadata: deserializeMetadata(parsedOutput),
102
+ ...deserialized,
103
+ });
104
+ return __decorateServiceException(exception, body);
105
+ };
106
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
107
+ const body = parsedOutput.body;
108
+ const deserialized = _json(body);
109
+ const exception = new ServiceQuotaExceededException({
110
+ $metadata: deserializeMetadata(parsedOutput),
111
+ ...deserialized,
112
+ });
113
+ return __decorateServiceException(exception, body);
114
+ };
115
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
116
+ const body = parsedOutput.body;
117
+ const deserialized = _json(body);
118
+ const exception = new ThrottlingException({
119
+ $metadata: deserializeMetadata(parsedOutput),
120
+ ...deserialized,
121
+ });
122
+ return __decorateServiceException(exception, body);
123
+ };
124
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
125
+ const body = parsedOutput.body;
126
+ const deserialized = _json(body);
127
+ const exception = new ValidationException({
128
+ $metadata: deserializeMetadata(parsedOutput),
129
+ ...deserialized,
130
+ });
131
+ return __decorateServiceException(exception, body);
132
+ };
133
+ const se_InvokeDataAutomationAsyncRequest = (input, context) => {
134
+ return take(input, {
135
+ blueprints: _json,
136
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
137
+ dataAutomationConfiguration: _json,
138
+ encryptionConfiguration: _json,
139
+ inputConfiguration: _json,
140
+ notificationConfiguration: _json,
141
+ outputConfiguration: _json,
142
+ });
143
+ };
144
+ const deserializeMetadata = (output) => ({
145
+ httpStatusCode: output.statusCode,
146
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
147
+ extendedRequestId: output.headers["x-amz-id-2"],
148
+ cfId: output.headers["x-amz-cf-id"],
149
+ });
150
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
151
+ const throwDefaultError = withBaseException(__BaseException);
152
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
153
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const contents = {
155
+ protocol,
156
+ hostname,
157
+ port,
158
+ method: "POST",
159
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
160
+ headers,
161
+ };
162
+ if (resolvedHostname !== undefined) {
163
+ contents.hostname = resolvedHostname;
164
+ }
165
+ if (body !== undefined) {
166
+ contents.body = body;
167
+ }
168
+ return new __HttpRequest(contents);
169
+ };
170
+ function sharedHeaders(operation) {
171
+ return {
172
+ "content-type": "application/x-amz-json-1.1",
173
+ "x-amz-target": `AmazonBedrockKeystoneRuntimeService.${operation}`,
174
+ };
175
+ }
@@ -0,0 +1,34 @@
1
+ import packageInfo from "../package.json";
2
+ import { Sha256 } from "@aws-crypto/sha256-browser";
3
+ import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
6
+ import { invalidProvider } from "@smithy/invalid-dependency";
7
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
8
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
9
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
10
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
11
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
12
+ export const getRuntimeConfig = (config) => {
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ return {
17
+ ...clientSharedValues,
18
+ ...config,
19
+ runtime: "browser",
20
+ defaultsMode,
21
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
24
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
26
+ region: config?.region ?? invalidProvider("Region is missing"),
27
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
28
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
29
+ sha256: config?.sha256 ?? Sha256,
30
+ streamCollector: config?.streamCollector ?? streamCollector,
31
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
32
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
33
+ };
34
+ };
@@ -0,0 +1,45 @@
1
+ import packageInfo from "../package.json";
2
+ import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
3
+ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
4
+ import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
5
+ import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
6
+ import { Hash } from "@smithy/hash-node";
7
+ import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
8
+ import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
10
+ import { calculateBodyLength } from "@smithy/util-body-length-node";
11
+ import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
12
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
15
+ import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
16
+ export const getRuntimeConfig = (config) => {
17
+ emitWarningIfUnsupportedVersion(process.version);
18
+ const defaultsMode = resolveDefaultsModeConfig(config);
19
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
20
+ const clientSharedValues = getSharedRuntimeConfig(config);
21
+ awsCheckVersion(process.version);
22
+ return {
23
+ ...clientSharedValues,
24
+ ...config,
25
+ runtime: "node",
26
+ defaultsMode,
27
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
30
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
32
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
33
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
34
+ retryMode: config?.retryMode ??
35
+ loadNodeConfig({
36
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
37
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
38
+ }),
39
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
40
+ streamCollector: config?.streamCollector ?? streamCollector,
41
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
42
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
43
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
44
+ };
45
+ };
@@ -0,0 +1,11 @@
1
+ import { Sha256 } from "@aws-crypto/sha256-js";
2
+ import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
+ export const getRuntimeConfig = (config) => {
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
5
+ return {
6
+ ...browserDefaults,
7
+ ...config,
8
+ runtime: "react-native",
9
+ sha256: config?.sha256 ?? Sha256,
10
+ };
11
+ };
@@ -0,0 +1,30 @@
1
+ import { AwsSdkSigV4Signer } from "@aws-sdk/core";
2
+ import { NoOpLogger } from "@smithy/smithy-client";
3
+ import { parseUrl } from "@smithy/url-parser";
4
+ import { fromBase64, toBase64 } from "@smithy/util-base64";
5
+ import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
6
+ import { defaultBedrockDataAutomationRuntimeHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
7
+ import { defaultEndpointResolver } from "./endpoint/endpointResolver";
8
+ export const getRuntimeConfig = (config) => {
9
+ return {
10
+ apiVersion: "2024-06-13",
11
+ base64Decoder: config?.base64Decoder ?? fromBase64,
12
+ base64Encoder: config?.base64Encoder ?? toBase64,
13
+ disableHostPrefix: config?.disableHostPrefix ?? false,
14
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
15
+ extensions: config?.extensions ?? [],
16
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultBedrockDataAutomationRuntimeHttpAuthSchemeProvider,
17
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
18
+ {
19
+ schemeId: "aws.auth#sigv4",
20
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
21
+ signer: new AwsSdkSigV4Signer(),
22
+ },
23
+ ],
24
+ logger: config?.logger ?? new NoOpLogger(),
25
+ serviceId: config?.serviceId ?? "Bedrock Data Automation Runtime",
26
+ urlParser: config?.urlParser ?? parseUrl,
27
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
28
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
29
+ };
30
+ };
@@ -0,0 +1,21 @@
1
+ import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
2
+ import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
3
+ import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
4
+ import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
5
+ const asPartial = (t) => t;
6
+ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
7
+ const extensionConfiguration = {
8
+ ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
9
+ ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
10
+ ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
11
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
12
+ };
13
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
14
+ return {
15
+ ...runtimeConfig,
16
+ ...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
17
+ ...resolveDefaultRuntimeConfig(extensionConfiguration),
18
+ ...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
19
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration),
20
+ };
21
+ };
@@ -0,0 +1,24 @@
1
+ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
+ import { BedrockDataAutomationRuntimeClient } from "./BedrockDataAutomationRuntimeClient";
3
+ import { GetDataAutomationStatusCommandInput, GetDataAutomationStatusCommandOutput } from "./commands/GetDataAutomationStatusCommand";
4
+ import { InvokeDataAutomationAsyncCommandInput, InvokeDataAutomationAsyncCommandOutput } from "./commands/InvokeDataAutomationAsyncCommand";
5
+ export interface BedrockDataAutomationRuntime {
6
+ /**
7
+ * @see {@link GetDataAutomationStatusCommand}
8
+ */
9
+ getDataAutomationStatus(args: GetDataAutomationStatusCommandInput, options?: __HttpHandlerOptions): Promise<GetDataAutomationStatusCommandOutput>;
10
+ getDataAutomationStatus(args: GetDataAutomationStatusCommandInput, cb: (err: any, data?: GetDataAutomationStatusCommandOutput) => void): void;
11
+ getDataAutomationStatus(args: GetDataAutomationStatusCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDataAutomationStatusCommandOutput) => void): void;
12
+ /**
13
+ * @see {@link InvokeDataAutomationAsyncCommand}
14
+ */
15
+ invokeDataAutomationAsync(args: InvokeDataAutomationAsyncCommandInput, options?: __HttpHandlerOptions): Promise<InvokeDataAutomationAsyncCommandOutput>;
16
+ invokeDataAutomationAsync(args: InvokeDataAutomationAsyncCommandInput, cb: (err: any, data?: InvokeDataAutomationAsyncCommandOutput) => void): void;
17
+ invokeDataAutomationAsync(args: InvokeDataAutomationAsyncCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeDataAutomationAsyncCommandOutput) => void): void;
18
+ }
19
+ /**
20
+ * Amazon Bedrock Keystone Runtime
21
+ * @public
22
+ */
23
+ export declare class BedrockDataAutomationRuntime extends BedrockDataAutomationRuntimeClient implements BedrockDataAutomationRuntime {
24
+ }