@aws-sdk/client-bedrock-agent-runtime 3.810.0 → 3.815.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 (75) hide show
  1. package/README.md +48 -0
  2. package/dist-cjs/index.js +829 -176
  3. package/dist-es/BedrockAgentRuntime.js +12 -0
  4. package/dist-es/commands/GetExecutionFlowSnapshotCommand.js +22 -0
  5. package/dist-es/commands/GetFlowExecutionCommand.js +22 -0
  6. package/dist-es/commands/GetInvocationStepCommand.js +1 -1
  7. package/dist-es/commands/ListFlowExecutionEventsCommand.js +23 -0
  8. package/dist-es/commands/ListFlowExecutionsCommand.js +22 -0
  9. package/dist-es/commands/PutInvocationStepCommand.js +1 -1
  10. package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +1 -2
  11. package/dist-es/commands/RetrieveCommand.js +1 -2
  12. package/dist-es/commands/StartFlowExecutionCommand.js +23 -0
  13. package/dist-es/commands/StopFlowExecutionCommand.js +22 -0
  14. package/dist-es/commands/index.js +6 -0
  15. package/dist-es/models/models_0.js +202 -196
  16. package/dist-es/models/models_1.js +141 -1
  17. package/dist-es/pagination/ListFlowExecutionEventsPaginator.js +4 -0
  18. package/dist-es/pagination/ListFlowExecutionsPaginator.js +4 -0
  19. package/dist-es/pagination/index.js +2 -0
  20. package/dist-es/protocols/Aws_restJson1.js +370 -2
  21. package/dist-types/BedrockAgentRuntime.d.ts +42 -0
  22. package/dist-types/BedrockAgentRuntimeClient.d.ts +8 -2
  23. package/dist-types/commands/CreateInvocationCommand.d.ts +1 -1
  24. package/dist-types/commands/CreateSessionCommand.d.ts +1 -1
  25. package/dist-types/commands/DeleteSessionCommand.d.ts +1 -1
  26. package/dist-types/commands/EndSessionCommand.d.ts +1 -1
  27. package/dist-types/commands/GetExecutionFlowSnapshotCommand.d.ts +94 -0
  28. package/dist-types/commands/GetFlowExecutionCommand.d.ts +102 -0
  29. package/dist-types/commands/GetInvocationStepCommand.d.ts +1 -1
  30. package/dist-types/commands/GetSessionCommand.d.ts +1 -1
  31. package/dist-types/commands/ListFlowExecutionEventsCommand.d.ts +164 -0
  32. package/dist-types/commands/ListFlowExecutionsCommand.d.ts +101 -0
  33. package/dist-types/commands/ListInvocationStepsCommand.d.ts +1 -1
  34. package/dist-types/commands/ListInvocationsCommand.d.ts +1 -1
  35. package/dist-types/commands/ListSessionsCommand.d.ts +1 -2
  36. package/dist-types/commands/PutInvocationStepCommand.d.ts +1 -1
  37. package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +1 -2
  38. package/dist-types/commands/RetrieveCommand.d.ts +1 -2
  39. package/dist-types/commands/StartFlowExecutionCommand.d.ts +116 -0
  40. package/dist-types/commands/StopFlowExecutionCommand.d.ts +99 -0
  41. package/dist-types/commands/index.d.ts +6 -0
  42. package/dist-types/models/models_0.d.ts +3521 -3592
  43. package/dist-types/models/models_1.d.ts +972 -1
  44. package/dist-types/pagination/ListFlowExecutionEventsPaginator.d.ts +7 -0
  45. package/dist-types/pagination/ListFlowExecutionsPaginator.d.ts +7 -0
  46. package/dist-types/pagination/index.d.ts +2 -0
  47. package/dist-types/protocols/Aws_restJson1.d.ts +54 -0
  48. package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +102 -0
  49. package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +36 -0
  50. package/dist-types/ts3.4/commands/CreateInvocationCommand.d.ts +1 -1
  51. package/dist-types/ts3.4/commands/CreateSessionCommand.d.ts +1 -1
  52. package/dist-types/ts3.4/commands/DeleteSessionCommand.d.ts +1 -1
  53. package/dist-types/ts3.4/commands/EndSessionCommand.d.ts +1 -1
  54. package/dist-types/ts3.4/commands/GetExecutionFlowSnapshotCommand.d.ts +51 -0
  55. package/dist-types/ts3.4/commands/GetFlowExecutionCommand.d.ts +50 -0
  56. package/dist-types/ts3.4/commands/GetInvocationStepCommand.d.ts +1 -1
  57. package/dist-types/ts3.4/commands/GetSessionCommand.d.ts +1 -1
  58. package/dist-types/ts3.4/commands/ListFlowExecutionEventsCommand.d.ts +51 -0
  59. package/dist-types/ts3.4/commands/ListFlowExecutionsCommand.d.ts +51 -0
  60. package/dist-types/ts3.4/commands/ListInvocationStepsCommand.d.ts +1 -1
  61. package/dist-types/ts3.4/commands/ListInvocationsCommand.d.ts +1 -1
  62. package/dist-types/ts3.4/commands/ListSessionsCommand.d.ts +1 -2
  63. package/dist-types/ts3.4/commands/PutInvocationStepCommand.d.ts +1 -1
  64. package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +4 -2
  65. package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +1 -2
  66. package/dist-types/ts3.4/commands/StartFlowExecutionCommand.d.ts +51 -0
  67. package/dist-types/ts3.4/commands/StopFlowExecutionCommand.d.ts +51 -0
  68. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  69. package/dist-types/ts3.4/models/models_0.d.ts +393 -507
  70. package/dist-types/ts3.4/models/models_1.d.ts +490 -2
  71. package/dist-types/ts3.4/pagination/ListFlowExecutionEventsPaginator.d.ts +11 -0
  72. package/dist-types/ts3.4/pagination/ListFlowExecutionsPaginator.d.ts +11 -0
  73. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  74. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +72 -0
  75. package/package.json +5 -5
@@ -0,0 +1,116 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentRuntimeClient";
4
+ import { StartFlowExecutionRequest, StartFlowExecutionResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link StartFlowExecutionCommand}.
14
+ */
15
+ export interface StartFlowExecutionCommandInput extends StartFlowExecutionRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link StartFlowExecutionCommand}.
21
+ */
22
+ export interface StartFlowExecutionCommandOutput extends StartFlowExecutionResponse, __MetadataBearer {
23
+ }
24
+ declare const StartFlowExecutionCommand_base: {
25
+ new (input: StartFlowExecutionCommandInput): import("@smithy/smithy-client").CommandImpl<StartFlowExecutionCommandInput, StartFlowExecutionCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: StartFlowExecutionCommandInput): import("@smithy/smithy-client").CommandImpl<StartFlowExecutionCommandInput, StartFlowExecutionCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Starts an asynchronous execution of an Amazon Bedrock flow. Unlike synchronous flows that run until completion or time out after five minutes, you can run asynchronous flows for longer durations. Asynchronous flows also yield control so that your application can perform other tasks.</p> <p>This operation returns an Amazon Resource Name (ARN) that you can use to track and manage your flow's async execution.</p> <note> <p>Asynchronous flows is in preview release for Amazon Bedrock and is subject to change.</p> </note>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockAgentRuntimeClient, StartFlowExecutionCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import
35
+ * // const { BedrockAgentRuntimeClient, StartFlowExecutionCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import
36
+ * const client = new BedrockAgentRuntimeClient(config);
37
+ * const input = { // StartFlowExecutionRequest
38
+ * flowIdentifier: "STRING_VALUE", // required
39
+ * flowAliasIdentifier: "STRING_VALUE", // required
40
+ * flowExecutionName: "STRING_VALUE",
41
+ * inputs: [ // FlowInputs // required
42
+ * { // FlowInput
43
+ * nodeName: "STRING_VALUE", // required
44
+ * nodeOutputName: "STRING_VALUE",
45
+ * content: { // FlowInputContent Union: only one key present
46
+ * document: "DOCUMENT_VALUE",
47
+ * },
48
+ * nodeInputName: "STRING_VALUE",
49
+ * },
50
+ * ],
51
+ * modelPerformanceConfiguration: { // ModelPerformanceConfiguration
52
+ * performanceConfig: { // PerformanceConfiguration
53
+ * latency: "standard" || "optimized",
54
+ * },
55
+ * },
56
+ * };
57
+ * const command = new StartFlowExecutionCommand(input);
58
+ * const response = await client.send(command);
59
+ * // { // StartFlowExecutionResponse
60
+ * // executionArn: "STRING_VALUE",
61
+ * // };
62
+ *
63
+ * ```
64
+ *
65
+ * @param StartFlowExecutionCommandInput - {@link StartFlowExecutionCommandInput}
66
+ * @returns {@link StartFlowExecutionCommandOutput}
67
+ * @see {@link StartFlowExecutionCommandInput} for command's `input` shape.
68
+ * @see {@link StartFlowExecutionCommandOutput} for command's `response` shape.
69
+ * @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape.
70
+ *
71
+ * @throws {@link AccessDeniedException} (client fault)
72
+ * <p>The request is denied because of missing access permissions. Check your permissions and retry your request.</p>
73
+ *
74
+ * @throws {@link BadGatewayException} (server fault)
75
+ * <p>There was an issue with a dependency due to a server issue. Retry your request.</p>
76
+ *
77
+ * @throws {@link ConflictException} (client fault)
78
+ * <p>There was a conflict performing an operation. Resolve the conflict and retry your request.</p>
79
+ *
80
+ * @throws {@link DependencyFailedException} (client fault)
81
+ * <p>There was an issue with a dependency. Check the resource configurations and retry the request.</p>
82
+ *
83
+ * @throws {@link InternalServerException} (server fault)
84
+ * <p>An internal server error occurred. Retry your request.</p>
85
+ *
86
+ * @throws {@link ResourceNotFoundException} (client fault)
87
+ * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
88
+ *
89
+ * @throws {@link ServiceQuotaExceededException} (client fault)
90
+ * <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
91
+ *
92
+ * @throws {@link ThrottlingException} (client fault)
93
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
94
+ *
95
+ * @throws {@link ValidationException} (client fault)
96
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
97
+ *
98
+ * @throws {@link BedrockAgentRuntimeServiceException}
99
+ * <p>Base exception class for all service exceptions from BedrockAgentRuntime service.</p>
100
+ *
101
+ *
102
+ * @public
103
+ */
104
+ export declare class StartFlowExecutionCommand extends StartFlowExecutionCommand_base {
105
+ /** @internal type navigation helper, not in runtime. */
106
+ protected static __types: {
107
+ api: {
108
+ input: StartFlowExecutionRequest;
109
+ output: StartFlowExecutionResponse;
110
+ };
111
+ sdk: {
112
+ input: StartFlowExecutionCommandInput;
113
+ output: StartFlowExecutionCommandOutput;
114
+ };
115
+ };
116
+ }
@@ -0,0 +1,99 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentRuntimeClient";
4
+ import { StopFlowExecutionRequest, StopFlowExecutionResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link StopFlowExecutionCommand}.
14
+ */
15
+ export interface StopFlowExecutionCommandInput extends StopFlowExecutionRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link StopFlowExecutionCommand}.
21
+ */
22
+ export interface StopFlowExecutionCommandOutput extends StopFlowExecutionResponse, __MetadataBearer {
23
+ }
24
+ declare const StopFlowExecutionCommand_base: {
25
+ new (input: StopFlowExecutionCommandInput): import("@smithy/smithy-client").CommandImpl<StopFlowExecutionCommandInput, StopFlowExecutionCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: StopFlowExecutionCommandInput): import("@smithy/smithy-client").CommandImpl<StopFlowExecutionCommandInput, StopFlowExecutionCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Stops an Amazon Bedrock flow's asynchronous execution. This operation prevents further processing of the flow and changes the execution status to <code>Aborted</code>.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockAgentRuntimeClient, StopFlowExecutionCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import
35
+ * // const { BedrockAgentRuntimeClient, StopFlowExecutionCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import
36
+ * const client = new BedrockAgentRuntimeClient(config);
37
+ * const input = { // StopFlowExecutionRequest
38
+ * flowIdentifier: "STRING_VALUE", // required
39
+ * flowAliasIdentifier: "STRING_VALUE", // required
40
+ * executionIdentifier: "STRING_VALUE", // required
41
+ * };
42
+ * const command = new StopFlowExecutionCommand(input);
43
+ * const response = await client.send(command);
44
+ * // { // StopFlowExecutionResponse
45
+ * // executionArn: "STRING_VALUE",
46
+ * // status: "Running" || "Succeeded" || "Failed" || "TimedOut" || "Aborted", // required
47
+ * // };
48
+ *
49
+ * ```
50
+ *
51
+ * @param StopFlowExecutionCommandInput - {@link StopFlowExecutionCommandInput}
52
+ * @returns {@link StopFlowExecutionCommandOutput}
53
+ * @see {@link StopFlowExecutionCommandInput} for command's `input` shape.
54
+ * @see {@link StopFlowExecutionCommandOutput} for command's `response` shape.
55
+ * @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape.
56
+ *
57
+ * @throws {@link AccessDeniedException} (client fault)
58
+ * <p>The request is denied because of missing access permissions. Check your permissions and retry your request.</p>
59
+ *
60
+ * @throws {@link BadGatewayException} (server fault)
61
+ * <p>There was an issue with a dependency due to a server issue. Retry your request.</p>
62
+ *
63
+ * @throws {@link ConflictException} (client fault)
64
+ * <p>There was a conflict performing an operation. Resolve the conflict and retry your request.</p>
65
+ *
66
+ * @throws {@link DependencyFailedException} (client fault)
67
+ * <p>There was an issue with a dependency. Check the resource configurations and retry the request.</p>
68
+ *
69
+ * @throws {@link InternalServerException} (server fault)
70
+ * <p>An internal server error occurred. Retry your request.</p>
71
+ *
72
+ * @throws {@link ResourceNotFoundException} (client fault)
73
+ * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
74
+ *
75
+ * @throws {@link ThrottlingException} (client fault)
76
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
77
+ *
78
+ * @throws {@link ValidationException} (client fault)
79
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
80
+ *
81
+ * @throws {@link BedrockAgentRuntimeServiceException}
82
+ * <p>Base exception class for all service exceptions from BedrockAgentRuntime service.</p>
83
+ *
84
+ *
85
+ * @public
86
+ */
87
+ export declare class StopFlowExecutionCommand extends StopFlowExecutionCommand_base {
88
+ /** @internal type navigation helper, not in runtime. */
89
+ protected static __types: {
90
+ api: {
91
+ input: StopFlowExecutionRequest;
92
+ output: StopFlowExecutionResponse;
93
+ };
94
+ sdk: {
95
+ input: StopFlowExecutionCommandInput;
96
+ output: StopFlowExecutionCommandOutput;
97
+ };
98
+ };
99
+ }
@@ -5,11 +5,15 @@ export * from "./DeleteSessionCommand";
5
5
  export * from "./EndSessionCommand";
6
6
  export * from "./GenerateQueryCommand";
7
7
  export * from "./GetAgentMemoryCommand";
8
+ export * from "./GetExecutionFlowSnapshotCommand";
9
+ export * from "./GetFlowExecutionCommand";
8
10
  export * from "./GetInvocationStepCommand";
9
11
  export * from "./GetSessionCommand";
10
12
  export * from "./InvokeAgentCommand";
11
13
  export * from "./InvokeFlowCommand";
12
14
  export * from "./InvokeInlineAgentCommand";
15
+ export * from "./ListFlowExecutionEventsCommand";
16
+ export * from "./ListFlowExecutionsCommand";
13
17
  export * from "./ListInvocationStepsCommand";
14
18
  export * from "./ListInvocationsCommand";
15
19
  export * from "./ListSessionsCommand";
@@ -20,6 +24,8 @@ export * from "./RerankCommand";
20
24
  export * from "./RetrieveAndGenerateCommand";
21
25
  export * from "./RetrieveAndGenerateStreamCommand";
22
26
  export * from "./RetrieveCommand";
27
+ export * from "./StartFlowExecutionCommand";
28
+ export * from "./StopFlowExecutionCommand";
23
29
  export * from "./TagResourceCommand";
24
30
  export * from "./UntagResourceCommand";
25
31
  export * from "./UpdateSessionCommand";