@aws-sdk/client-bedrock-runtime 3.704.0 → 3.705.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 (41) hide show
  1. package/README.md +31 -7
  2. package/dist-cjs/index.js +464 -112
  3. package/dist-es/BedrockRuntime.js +6 -0
  4. package/dist-es/commands/GetAsyncInvokeCommand.js +23 -0
  5. package/dist-es/commands/ListAsyncInvokesCommand.js +23 -0
  6. package/dist-es/commands/StartAsyncInvokeCommand.js +23 -0
  7. package/dist-es/commands/index.js +3 -0
  8. package/dist-es/index.js +1 -0
  9. package/dist-es/models/models_0.js +152 -72
  10. package/dist-es/pagination/Interfaces.js +1 -0
  11. package/dist-es/pagination/ListAsyncInvokesPaginator.js +4 -0
  12. package/dist-es/pagination/index.js +2 -0
  13. package/dist-es/protocols/Aws_restJson1.js +190 -2
  14. package/dist-types/BedrockRuntime.d.ts +22 -0
  15. package/dist-types/BedrockRuntimeClient.d.ts +5 -2
  16. package/dist-types/commands/ApplyGuardrailCommand.d.ts +2 -0
  17. package/dist-types/commands/ConverseCommand.d.ts +43 -0
  18. package/dist-types/commands/ConverseStreamCommand.d.ts +23 -0
  19. package/dist-types/commands/GetAsyncInvokeCommand.d.ts +101 -0
  20. package/dist-types/commands/ListAsyncInvokesCommand.d.ts +112 -0
  21. package/dist-types/commands/StartAsyncInvokeCommand.d.ts +124 -0
  22. package/dist-types/commands/index.d.ts +3 -0
  23. package/dist-types/index.d.ts +1 -0
  24. package/dist-types/models/models_0.d.ts +569 -90
  25. package/dist-types/pagination/Interfaces.d.ts +8 -0
  26. package/dist-types/pagination/ListAsyncInvokesPaginator.d.ts +7 -0
  27. package/dist-types/pagination/index.d.ts +2 -0
  28. package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
  29. package/dist-types/ts3.4/BedrockRuntime.d.ts +52 -0
  30. package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +20 -2
  31. package/dist-types/ts3.4/commands/GetAsyncInvokeCommand.d.ts +50 -0
  32. package/dist-types/ts3.4/commands/ListAsyncInvokesCommand.d.ts +50 -0
  33. package/dist-types/ts3.4/commands/StartAsyncInvokeCommand.d.ts +50 -0
  34. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  35. package/dist-types/ts3.4/index.d.ts +1 -0
  36. package/dist-types/ts3.4/models/models_0.d.ts +237 -42
  37. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  38. package/dist-types/ts3.4/pagination/ListAsyncInvokesPaginator.d.ts +11 -0
  39. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  40. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
  41. package/package.json +4 -2
@@ -3,14 +3,20 @@ import { BedrockRuntimeClient } from "./BedrockRuntimeClient";
3
3
  import { ApplyGuardrailCommand, } from "./commands/ApplyGuardrailCommand";
4
4
  import { ConverseCommand } from "./commands/ConverseCommand";
5
5
  import { ConverseStreamCommand, } from "./commands/ConverseStreamCommand";
6
+ import { GetAsyncInvokeCommand, } from "./commands/GetAsyncInvokeCommand";
6
7
  import { InvokeModelCommand } from "./commands/InvokeModelCommand";
7
8
  import { InvokeModelWithResponseStreamCommand, } from "./commands/InvokeModelWithResponseStreamCommand";
9
+ import { ListAsyncInvokesCommand, } from "./commands/ListAsyncInvokesCommand";
10
+ import { StartAsyncInvokeCommand, } from "./commands/StartAsyncInvokeCommand";
8
11
  const commands = {
9
12
  ApplyGuardrailCommand,
10
13
  ConverseCommand,
11
14
  ConverseStreamCommand,
15
+ GetAsyncInvokeCommand,
12
16
  InvokeModelCommand,
13
17
  InvokeModelWithResponseStreamCommand,
18
+ ListAsyncInvokesCommand,
19
+ StartAsyncInvokeCommand,
14
20
  };
15
21
  export class BedrockRuntime extends BedrockRuntimeClient {
16
22
  }
@@ -0,0 +1,23 @@
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 { GetAsyncInvokeResponseFilterSensitiveLog, } from "../models/models_0";
6
+ import { de_GetAsyncInvokeCommand, se_GetAsyncInvokeCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class GetAsyncInvokeCommand extends $Command
9
+ .classBuilder()
10
+ .ep(commonParams)
11
+ .m(function (Command, cs, config, o) {
12
+ return [
13
+ getSerdePlugin(config, this.serialize, this.deserialize),
14
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
15
+ ];
16
+ })
17
+ .s("AmazonBedrockFrontendService", "GetAsyncInvoke", {})
18
+ .n("BedrockRuntimeClient", "GetAsyncInvokeCommand")
19
+ .f(void 0, GetAsyncInvokeResponseFilterSensitiveLog)
20
+ .ser(se_GetAsyncInvokeCommand)
21
+ .de(de_GetAsyncInvokeCommand)
22
+ .build() {
23
+ }
@@ -0,0 +1,23 @@
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 { ListAsyncInvokesResponseFilterSensitiveLog, } from "../models/models_0";
6
+ import { de_ListAsyncInvokesCommand, se_ListAsyncInvokesCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class ListAsyncInvokesCommand extends $Command
9
+ .classBuilder()
10
+ .ep(commonParams)
11
+ .m(function (Command, cs, config, o) {
12
+ return [
13
+ getSerdePlugin(config, this.serialize, this.deserialize),
14
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
15
+ ];
16
+ })
17
+ .s("AmazonBedrockFrontendService", "ListAsyncInvokes", {})
18
+ .n("BedrockRuntimeClient", "ListAsyncInvokesCommand")
19
+ .f(void 0, ListAsyncInvokesResponseFilterSensitiveLog)
20
+ .ser(se_ListAsyncInvokesCommand)
21
+ .de(de_ListAsyncInvokesCommand)
22
+ .build() {
23
+ }
@@ -0,0 +1,23 @@
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 { StartAsyncInvokeRequestFilterSensitiveLog, } from "../models/models_0";
6
+ import { de_StartAsyncInvokeCommand, se_StartAsyncInvokeCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class StartAsyncInvokeCommand extends $Command
9
+ .classBuilder()
10
+ .ep(commonParams)
11
+ .m(function (Command, cs, config, o) {
12
+ return [
13
+ getSerdePlugin(config, this.serialize, this.deserialize),
14
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
15
+ ];
16
+ })
17
+ .s("AmazonBedrockFrontendService", "StartAsyncInvoke", {})
18
+ .n("BedrockRuntimeClient", "StartAsyncInvokeCommand")
19
+ .f(StartAsyncInvokeRequestFilterSensitiveLog, void 0)
20
+ .ser(se_StartAsyncInvokeCommand)
21
+ .de(de_StartAsyncInvokeCommand)
22
+ .build() {
23
+ }
@@ -1,5 +1,8 @@
1
1
  export * from "./ApplyGuardrailCommand";
2
2
  export * from "./ConverseCommand";
3
3
  export * from "./ConverseStreamCommand";
4
+ export * from "./GetAsyncInvokeCommand";
4
5
  export * from "./InvokeModelCommand";
5
6
  export * from "./InvokeModelWithResponseStreamCommand";
7
+ export * from "./ListAsyncInvokesCommand";
8
+ export * from "./StartAsyncInvokeCommand";
package/dist-es/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./BedrockRuntimeClient";
2
2
  export * from "./BedrockRuntime";
3
3
  export * from "./commands";
4
+ export * from "./pagination";
4
5
  export * from "./models";
5
6
  export { BedrockRuntimeServiceException } from "./models/BedrockRuntimeServiceException";
@@ -12,6 +12,110 @@ export class AccessDeniedException extends __BaseException {
12
12
  Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
13
  }
14
14
  }
15
+ export var AsyncInvokeOutputDataConfig;
16
+ (function (AsyncInvokeOutputDataConfig) {
17
+ AsyncInvokeOutputDataConfig.visit = (value, visitor) => {
18
+ if (value.s3OutputDataConfig !== undefined)
19
+ return visitor.s3OutputDataConfig(value.s3OutputDataConfig);
20
+ return visitor._(value.$unknown[0], value.$unknown[1]);
21
+ };
22
+ })(AsyncInvokeOutputDataConfig || (AsyncInvokeOutputDataConfig = {}));
23
+ export const AsyncInvokeStatus = {
24
+ COMPLETED: "Completed",
25
+ FAILED: "Failed",
26
+ IN_PROGRESS: "InProgress",
27
+ };
28
+ export class InternalServerException extends __BaseException {
29
+ constructor(opts) {
30
+ super({
31
+ name: "InternalServerException",
32
+ $fault: "server",
33
+ ...opts,
34
+ });
35
+ this.name = "InternalServerException";
36
+ this.$fault = "server";
37
+ Object.setPrototypeOf(this, InternalServerException.prototype);
38
+ }
39
+ }
40
+ export class ThrottlingException extends __BaseException {
41
+ constructor(opts) {
42
+ super({
43
+ name: "ThrottlingException",
44
+ $fault: "client",
45
+ ...opts,
46
+ });
47
+ this.name = "ThrottlingException";
48
+ this.$fault = "client";
49
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
50
+ }
51
+ }
52
+ export class ValidationException extends __BaseException {
53
+ constructor(opts) {
54
+ super({
55
+ name: "ValidationException",
56
+ $fault: "client",
57
+ ...opts,
58
+ });
59
+ this.name = "ValidationException";
60
+ this.$fault = "client";
61
+ Object.setPrototypeOf(this, ValidationException.prototype);
62
+ }
63
+ }
64
+ export const SortAsyncInvocationBy = {
65
+ SUBMISSION_TIME: "SubmissionTime",
66
+ };
67
+ export const SortOrder = {
68
+ ASCENDING: "Ascending",
69
+ DESCENDING: "Descending",
70
+ };
71
+ export class ConflictException extends __BaseException {
72
+ constructor(opts) {
73
+ super({
74
+ name: "ConflictException",
75
+ $fault: "client",
76
+ ...opts,
77
+ });
78
+ this.name = "ConflictException";
79
+ this.$fault = "client";
80
+ Object.setPrototypeOf(this, ConflictException.prototype);
81
+ }
82
+ }
83
+ export class ResourceNotFoundException extends __BaseException {
84
+ constructor(opts) {
85
+ super({
86
+ name: "ResourceNotFoundException",
87
+ $fault: "client",
88
+ ...opts,
89
+ });
90
+ this.name = "ResourceNotFoundException";
91
+ this.$fault = "client";
92
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
93
+ }
94
+ }
95
+ export class ServiceQuotaExceededException extends __BaseException {
96
+ constructor(opts) {
97
+ super({
98
+ name: "ServiceQuotaExceededException",
99
+ $fault: "client",
100
+ ...opts,
101
+ });
102
+ this.name = "ServiceQuotaExceededException";
103
+ this.$fault = "client";
104
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
105
+ }
106
+ }
107
+ export class ServiceUnavailableException extends __BaseException {
108
+ constructor(opts) {
109
+ super({
110
+ name: "ServiceUnavailableException",
111
+ $fault: "server",
112
+ ...opts,
113
+ });
114
+ this.name = "ServiceUnavailableException";
115
+ this.$fault = "server";
116
+ Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
117
+ }
118
+ }
15
119
  export const GuardrailContentQualifier = {
16
120
  GROUNDING_SOURCE: "grounding_source",
17
121
  GUARD_CONTENT: "guard_content",
@@ -113,66 +217,6 @@ export const GuardrailWordPolicyAction = {
113
217
  export const GuardrailManagedWordType = {
114
218
  PROFANITY: "PROFANITY",
115
219
  };
116
- export class InternalServerException extends __BaseException {
117
- constructor(opts) {
118
- super({
119
- name: "InternalServerException",
120
- $fault: "server",
121
- ...opts,
122
- });
123
- this.name = "InternalServerException";
124
- this.$fault = "server";
125
- Object.setPrototypeOf(this, InternalServerException.prototype);
126
- }
127
- }
128
- export class ResourceNotFoundException extends __BaseException {
129
- constructor(opts) {
130
- super({
131
- name: "ResourceNotFoundException",
132
- $fault: "client",
133
- ...opts,
134
- });
135
- this.name = "ResourceNotFoundException";
136
- this.$fault = "client";
137
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
138
- }
139
- }
140
- export class ServiceQuotaExceededException extends __BaseException {
141
- constructor(opts) {
142
- super({
143
- name: "ServiceQuotaExceededException",
144
- $fault: "client",
145
- ...opts,
146
- });
147
- this.name = "ServiceQuotaExceededException";
148
- this.$fault = "client";
149
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
150
- }
151
- }
152
- export class ThrottlingException extends __BaseException {
153
- constructor(opts) {
154
- super({
155
- name: "ThrottlingException",
156
- $fault: "client",
157
- ...opts,
158
- });
159
- this.name = "ThrottlingException";
160
- this.$fault = "client";
161
- Object.setPrototypeOf(this, ThrottlingException.prototype);
162
- }
163
- }
164
- export class ValidationException extends __BaseException {
165
- constructor(opts) {
166
- super({
167
- name: "ValidationException",
168
- $fault: "client",
169
- ...opts,
170
- });
171
- this.name = "ValidationException";
172
- this.$fault = "client";
173
- Object.setPrototypeOf(this, ValidationException.prototype);
174
- }
175
- }
176
220
  export const GuardrailTrace = {
177
221
  DISABLED: "disabled",
178
222
  ENABLED: "enabled",
@@ -223,6 +267,27 @@ export var ImageSource;
223
267
  return visitor._(value.$unknown[0], value.$unknown[1]);
224
268
  };
225
269
  })(ImageSource || (ImageSource = {}));
270
+ export const VideoFormat = {
271
+ FLV: "flv",
272
+ MKV: "mkv",
273
+ MOV: "mov",
274
+ MP4: "mp4",
275
+ MPEG: "mpeg",
276
+ MPG: "mpg",
277
+ THREE_GP: "three_gp",
278
+ WEBM: "webm",
279
+ WMV: "wmv",
280
+ };
281
+ export var VideoSource;
282
+ (function (VideoSource) {
283
+ VideoSource.visit = (value, visitor) => {
284
+ if (value.bytes !== undefined)
285
+ return visitor.bytes(value.bytes);
286
+ if (value.s3Location !== undefined)
287
+ return visitor.s3Location(value.s3Location);
288
+ return visitor._(value.$unknown[0], value.$unknown[1]);
289
+ };
290
+ })(VideoSource || (VideoSource = {}));
226
291
  export var ToolResultContentBlock;
227
292
  (function (ToolResultContentBlock) {
228
293
  ToolResultContentBlock.visit = (value, visitor) => {
@@ -234,6 +299,8 @@ export var ToolResultContentBlock;
234
299
  return visitor.image(value.image);
235
300
  if (value.document !== undefined)
236
301
  return visitor.document(value.document);
302
+ if (value.video !== undefined)
303
+ return visitor.video(value.video);
237
304
  return visitor._(value.$unknown[0], value.$unknown[1]);
238
305
  };
239
306
  })(ToolResultContentBlock || (ToolResultContentBlock = {}));
@@ -250,6 +317,8 @@ export var ContentBlock;
250
317
  return visitor.image(value.image);
251
318
  if (value.document !== undefined)
252
319
  return visitor.document(value.document);
320
+ if (value.video !== undefined)
321
+ return visitor.video(value.video);
253
322
  if (value.toolUse !== undefined)
254
323
  return visitor.toolUse(value.toolUse);
255
324
  if (value.toolResult !== undefined)
@@ -368,18 +437,6 @@ export class ModelTimeoutException extends __BaseException {
368
437
  Object.setPrototypeOf(this, ModelTimeoutException.prototype);
369
438
  }
370
439
  }
371
- export class ServiceUnavailableException extends __BaseException {
372
- constructor(opts) {
373
- super({
374
- name: "ServiceUnavailableException",
375
- $fault: "server",
376
- ...opts,
377
- });
378
- this.name = "ServiceUnavailableException";
379
- this.$fault = "server";
380
- Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
381
- }
382
- }
383
440
  export const GuardrailStreamProcessingMode = {
384
441
  ASYNC: "async",
385
442
  SYNC: "sync",
@@ -468,12 +525,34 @@ export var ResponseStream;
468
525
  return visitor._(value.$unknown[0], value.$unknown[1]);
469
526
  };
470
527
  })(ResponseStream || (ResponseStream = {}));
528
+ export const GetAsyncInvokeResponseFilterSensitiveLog = (obj) => ({
529
+ ...obj,
530
+ ...(obj.failureMessage && { failureMessage: SENSITIVE_STRING }),
531
+ ...(obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }),
532
+ });
533
+ export const AsyncInvokeSummaryFilterSensitiveLog = (obj) => ({
534
+ ...obj,
535
+ ...(obj.failureMessage && { failureMessage: SENSITIVE_STRING }),
536
+ ...(obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }),
537
+ });
538
+ export const ListAsyncInvokesResponseFilterSensitiveLog = (obj) => ({
539
+ ...obj,
540
+ ...(obj.asyncInvokeSummaries && {
541
+ asyncInvokeSummaries: obj.asyncInvokeSummaries.map((item) => AsyncInvokeSummaryFilterSensitiveLog(item)),
542
+ }),
543
+ });
544
+ export const StartAsyncInvokeRequestFilterSensitiveLog = (obj) => ({
545
+ ...obj,
546
+ ...(obj.modelInput && { modelInput: SENSITIVE_STRING }),
547
+ ...(obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }),
548
+ });
471
549
  export const ConverseRequestFilterSensitiveLog = (obj) => ({
472
550
  ...obj,
473
551
  ...(obj.messages && { messages: obj.messages.map((item) => item) }),
474
552
  ...(obj.system && { system: obj.system.map((item) => item) }),
475
553
  ...(obj.toolConfig && { toolConfig: obj.toolConfig }),
476
554
  ...(obj.promptVariables && { promptVariables: SENSITIVE_STRING }),
555
+ ...(obj.requestMetadata && { requestMetadata: SENSITIVE_STRING }),
477
556
  });
478
557
  export const ConverseStreamRequestFilterSensitiveLog = (obj) => ({
479
558
  ...obj,
@@ -481,6 +560,7 @@ export const ConverseStreamRequestFilterSensitiveLog = (obj) => ({
481
560
  ...(obj.system && { system: obj.system.map((item) => item) }),
482
561
  ...(obj.toolConfig && { toolConfig: obj.toolConfig }),
483
562
  ...(obj.promptVariables && { promptVariables: SENSITIVE_STRING }),
563
+ ...(obj.requestMetadata && { requestMetadata: SENSITIVE_STRING }),
484
564
  });
485
565
  export const ConverseStreamOutputFilterSensitiveLog = (obj) => {
486
566
  if (obj.messageStart !== undefined)
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { BedrockRuntimeClient } from "../BedrockRuntimeClient";
3
+ import { ListAsyncInvokesCommand, } from "../commands/ListAsyncInvokesCommand";
4
+ export const paginateListAsyncInvokes = createPaginator(BedrockRuntimeClient, ListAsyncInvokesCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,2 @@
1
+ export * from "./Interfaces";
2
+ export * from "./ListAsyncInvokesPaginator";