@aws-sdk/client-bedrock-agent-runtime 3.703.0 → 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.
- package/README.md +8 -0
- package/dist-cjs/index.js +380 -68
- package/dist-es/BedrockAgentRuntime.js +2 -0
- package/dist-es/commands/GenerateQueryCommand.js +23 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +216 -54
- package/dist-es/protocols/Aws_restJson1.js +74 -3
- package/dist-types/BedrockAgentRuntime.d.ts +7 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +3 -2
- package/dist-types/commands/GenerateQueryCommand.d.ts +115 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +400 -24
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +380 -23
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +17 -2
- package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +17 -2
- package/dist-types/commands/RetrieveCommand.d.ts +17 -2
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1189 -489
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +17 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/GenerateQueryCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +418 -123
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
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 { GenerateQueryRequest, GenerateQueryResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link GenerateQueryCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GenerateQueryCommandInput extends GenerateQueryRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GenerateQueryCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GenerateQueryCommandOutput extends GenerateQueryResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GenerateQueryCommand_base: {
|
|
25
|
+
new (input: GenerateQueryCommandInput): import("@smithy/smithy-client").CommandImpl<GenerateQueryCommandInput, GenerateQueryCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: GenerateQueryCommandInput): import("@smithy/smithy-client").CommandImpl<GenerateQueryCommandInput, GenerateQueryCommandOutput, BedrockAgentRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Generates an SQL query from a natural language query. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-generate-query.html">Generate a query for structured data</a> in the Amazon Bedrock User Guide.</p>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { BedrockAgentRuntimeClient, GenerateQueryCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import
|
|
35
|
+
* // const { BedrockAgentRuntimeClient, GenerateQueryCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import
|
|
36
|
+
* const client = new BedrockAgentRuntimeClient(config);
|
|
37
|
+
* const input = { // GenerateQueryRequest
|
|
38
|
+
* queryGenerationInput: { // QueryGenerationInput
|
|
39
|
+
* type: "TEXT", // required
|
|
40
|
+
* text: "STRING_VALUE", // required
|
|
41
|
+
* },
|
|
42
|
+
* transformationConfiguration: { // TransformationConfiguration
|
|
43
|
+
* mode: "TEXT_TO_SQL", // required
|
|
44
|
+
* textToSqlConfiguration: { // TextToSqlConfiguration
|
|
45
|
+
* type: "KNOWLEDGE_BASE", // required
|
|
46
|
+
* knowledgeBaseConfiguration: { // TextToSqlKnowledgeBaseConfiguration
|
|
47
|
+
* knowledgeBaseArn: "STRING_VALUE", // required
|
|
48
|
+
* },
|
|
49
|
+
* },
|
|
50
|
+
* },
|
|
51
|
+
* };
|
|
52
|
+
* const command = new GenerateQueryCommand(input);
|
|
53
|
+
* const response = await client.send(command);
|
|
54
|
+
* // { // GenerateQueryResponse
|
|
55
|
+
* // queries: [ // GeneratedQueries
|
|
56
|
+
* // { // GeneratedQuery
|
|
57
|
+
* // type: "REDSHIFT_SQL",
|
|
58
|
+
* // sql: "STRING_VALUE",
|
|
59
|
+
* // },
|
|
60
|
+
* // ],
|
|
61
|
+
* // };
|
|
62
|
+
*
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @param GenerateQueryCommandInput - {@link GenerateQueryCommandInput}
|
|
66
|
+
* @returns {@link GenerateQueryCommandOutput}
|
|
67
|
+
* @see {@link GenerateQueryCommandInput} for command's `input` shape.
|
|
68
|
+
* @see {@link GenerateQueryCommandOutput} 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
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
export declare class GenerateQueryCommand extends GenerateQueryCommand_base {
|
|
104
|
+
/** @internal type navigation helper, not in runtime. */
|
|
105
|
+
protected static __types: {
|
|
106
|
+
api: {
|
|
107
|
+
input: GenerateQueryRequest;
|
|
108
|
+
output: GenerateQueryResponse;
|
|
109
|
+
};
|
|
110
|
+
sdk: {
|
|
111
|
+
input: GenerateQueryCommandInput;
|
|
112
|
+
output: GenerateQueryCommandOutput;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
}
|