@aws-sdk/client-bedrock-agent-runtime 3.705.0 → 3.709.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 CHANGED
@@ -210,6 +210,14 @@ DeleteAgentMemory
210
210
 
211
211
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/DeleteAgentMemoryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/DeleteAgentMemoryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/DeleteAgentMemoryCommandOutput/)
212
212
 
213
+ </details>
214
+ <details>
215
+ <summary>
216
+ GenerateQuery
217
+ </summary>
218
+
219
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/GenerateQueryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/GenerateQueryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/GenerateQueryCommandOutput/)
220
+
213
221
  </details>
214
222
  <details>
215
223
  <summary>
package/dist-cjs/index.js CHANGED
@@ -96,6 +96,11 @@ __export(src_exports, {
96
96
  FunctionInvocationInputFilterSensitiveLog: () => FunctionInvocationInputFilterSensitiveLog,
97
97
  FunctionSchema: () => FunctionSchema,
98
98
  FunctionSchemaFilterSensitiveLog: () => FunctionSchemaFilterSensitiveLog,
99
+ GenerateQueryCommand: () => GenerateQueryCommand,
100
+ GenerateQueryRequestFilterSensitiveLog: () => GenerateQueryRequestFilterSensitiveLog,
101
+ GenerateQueryResponseFilterSensitiveLog: () => GenerateQueryResponseFilterSensitiveLog,
102
+ GeneratedQueryFilterSensitiveLog: () => GeneratedQueryFilterSensitiveLog,
103
+ GeneratedQueryType: () => GeneratedQueryType,
99
104
  GeneratedResponsePartFilterSensitiveLog: () => GeneratedResponsePartFilterSensitiveLog,
100
105
  GenerationConfigurationFilterSensitiveLog: () => GenerationConfigurationFilterSensitiveLog,
101
106
  GetAgentMemoryCommand: () => GetAgentMemoryCommand,
@@ -133,6 +138,7 @@ __export(src_exports, {
133
138
  InputFileFilterSensitiveLog: () => InputFileFilterSensitiveLog,
134
139
  InputPrompt: () => InputPrompt,
135
140
  InputPromptFilterSensitiveLog: () => InputPromptFilterSensitiveLog,
141
+ InputQueryType: () => InputQueryType,
136
142
  InternalServerException: () => InternalServerException,
137
143
  InvocationInputFilterSensitiveLog: () => InvocationInputFilterSensitiveLog,
138
144
  InvocationInputMember: () => InvocationInputMember,
@@ -196,6 +202,8 @@ __export(src_exports, {
196
202
  PromptState: () => PromptState,
197
203
  PromptTemplateFilterSensitiveLog: () => PromptTemplateFilterSensitiveLog,
198
204
  PromptType: () => PromptType,
205
+ QueryGenerationInputFilterSensitiveLog: () => QueryGenerationInputFilterSensitiveLog,
206
+ QueryTransformationMode: () => QueryTransformationMode,
199
207
  QueryTransformationType: () => QueryTransformationType,
200
208
  RationaleFilterSensitiveLog: () => RationaleFilterSensitiveLog,
201
209
  RawResponseFilterSensitiveLog: () => RawResponseFilterSensitiveLog,
@@ -222,7 +230,10 @@ __export(src_exports, {
222
230
  ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog,
223
231
  RetrievalFilter: () => RetrievalFilter,
224
232
  RetrievalFilterFilterSensitiveLog: () => RetrievalFilterFilterSensitiveLog,
233
+ RetrievalResultContentColumnFilterSensitiveLog: () => RetrievalResultContentColumnFilterSensitiveLog,
234
+ RetrievalResultContentColumnType: () => RetrievalResultContentColumnType,
225
235
  RetrievalResultContentFilterSensitiveLog: () => RetrievalResultContentFilterSensitiveLog,
236
+ RetrievalResultContentType: () => RetrievalResultContentType,
226
237
  RetrievalResultLocationFilterSensitiveLog: () => RetrievalResultLocationFilterSensitiveLog,
227
238
  RetrievalResultLocationType: () => RetrievalResultLocationType,
228
239
  RetrieveAndGenerateCommand: () => RetrieveAndGenerateCommand,
@@ -253,6 +264,7 @@ __export(src_exports, {
253
264
  Source: () => Source,
254
265
  TextPromptFilterSensitiveLog: () => TextPromptFilterSensitiveLog,
255
266
  TextResponsePartFilterSensitiveLog: () => TextResponsePartFilterSensitiveLog,
267
+ TextToSqlConfigurationType: () => TextToSqlConfigurationType,
256
268
  ThrottlingException: () => ThrottlingException,
257
269
  Trace: () => Trace,
258
270
  TraceFilterSensitiveLog: () => TraceFilterSensitiveLog,
@@ -766,6 +778,18 @@ var FlowResponseStream;
766
778
  return visitor._(value.$unknown[0], value.$unknown[1]);
767
779
  }, "visit");
768
780
  })(FlowResponseStream || (FlowResponseStream = {}));
781
+ var InputQueryType = {
782
+ TEXT: "TEXT"
783
+ };
784
+ var QueryTransformationMode = {
785
+ TEXT_TO_SQL: "TEXT_TO_SQL"
786
+ };
787
+ var TextToSqlConfigurationType = {
788
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE"
789
+ };
790
+ var GeneratedQueryType = {
791
+ REDSHIFT_SQL: "REDSHIFT_SQL"
792
+ };
769
793
  var ContentBlock;
770
794
  ((ContentBlock3) => {
771
795
  ContentBlock3.visit = /* @__PURE__ */ __name((value, visitor) => {
@@ -813,12 +837,27 @@ var RerankingMetadataSelectiveModeConfiguration;
813
837
  var VectorSearchRerankingConfigurationType = {
814
838
  BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL"
815
839
  };
840
+ var RetrievalResultContentColumnType = {
841
+ BLOB: "BLOB",
842
+ BOOLEAN: "BOOLEAN",
843
+ DOUBLE: "DOUBLE",
844
+ LONG: "LONG",
845
+ NULL: "NULL",
846
+ STRING: "STRING"
847
+ };
848
+ var RetrievalResultContentType = {
849
+ IMAGE: "IMAGE",
850
+ ROW: "ROW",
851
+ TEXT: "TEXT"
852
+ };
816
853
  var RetrievalResultLocationType = {
817
854
  CONFLUENCE: "CONFLUENCE",
818
855
  CUSTOM: "CUSTOM",
856
+ KENDRA: "KENDRA",
819
857
  S3: "S3",
820
858
  SALESFORCE: "SALESFORCE",
821
859
  SHAREPOINT: "SHAREPOINT",
860
+ SQL: "SQL",
822
861
  WEB: "WEB"
823
862
  };
824
863
  var Caller;
@@ -1403,6 +1442,20 @@ var InvokeFlowResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1403
1442
  ...obj,
1404
1443
  ...obj.responseStream && { responseStream: "STREAMING_CONTENT" }
1405
1444
  }), "InvokeFlowResponseFilterSensitiveLog");
1445
+ var QueryGenerationInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1446
+ ...obj
1447
+ }), "QueryGenerationInputFilterSensitiveLog");
1448
+ var GenerateQueryRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1449
+ ...obj,
1450
+ ...obj.queryGenerationInput && { queryGenerationInput: import_smithy_client.SENSITIVE_STRING }
1451
+ }), "GenerateQueryRequestFilterSensitiveLog");
1452
+ var GeneratedQueryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1453
+ ...obj
1454
+ }), "GeneratedQueryFilterSensitiveLog");
1455
+ var GenerateQueryResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1456
+ ...obj,
1457
+ ...obj.queries && { queries: import_smithy_client.SENSITIVE_STRING }
1458
+ }), "GenerateQueryResponseFilterSensitiveLog");
1406
1459
  var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
1407
1460
  if (obj.text !== void 0)
1408
1461
  return { text: obj.text };
@@ -1473,8 +1526,12 @@ var GeneratedResponsePartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1473
1526
  ...obj,
1474
1527
  ...obj.textResponsePart && { textResponsePart: import_smithy_client.SENSITIVE_STRING }
1475
1528
  }), "GeneratedResponsePartFilterSensitiveLog");
1476
- var RetrievalResultContentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1529
+ var RetrievalResultContentColumnFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1477
1530
  ...obj
1531
+ }), "RetrievalResultContentColumnFilterSensitiveLog");
1532
+ var RetrievalResultContentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1533
+ ...obj,
1534
+ ...obj.row && { row: import_smithy_client.SENSITIVE_STRING }
1478
1535
  }), "RetrievalResultContentFilterSensitiveLog");
1479
1536
  var RetrievalResultLocationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1480
1537
  ...obj
@@ -2169,6 +2226,22 @@ var se_DeleteAgentMemoryCommand = /* @__PURE__ */ __name(async (input, context)
2169
2226
  b.m("DELETE").h(headers).q(query).b(body);
2170
2227
  return b.build();
2171
2228
  }, "se_DeleteAgentMemoryCommand");
2229
+ var se_GenerateQueryCommand = /* @__PURE__ */ __name(async (input, context) => {
2230
+ const b = (0, import_core.requestBuilder)(input, context);
2231
+ const headers = {
2232
+ "content-type": "application/json"
2233
+ };
2234
+ b.bp("/generateQuery");
2235
+ let body;
2236
+ body = JSON.stringify(
2237
+ (0, import_smithy_client.take)(input, {
2238
+ queryGenerationInput: (_) => (0, import_smithy_client._json)(_),
2239
+ transformationConfiguration: (_) => (0, import_smithy_client._json)(_)
2240
+ })
2241
+ );
2242
+ b.m("POST").h(headers).b(body);
2243
+ return b.build();
2244
+ }, "se_GenerateQueryCommand");
2172
2245
  var se_GetAgentMemoryCommand = /* @__PURE__ */ __name(async (input, context) => {
2173
2246
  const b = (0, import_core.requestBuilder)(input, context);
2174
2247
  const headers = {};
@@ -2353,6 +2426,20 @@ var de_DeleteAgentMemoryCommand = /* @__PURE__ */ __name(async (output, context)
2353
2426
  await (0, import_smithy_client.collectBody)(output.body, context);
2354
2427
  return contents;
2355
2428
  }, "de_DeleteAgentMemoryCommand");
2429
+ var de_GenerateQueryCommand = /* @__PURE__ */ __name(async (output, context) => {
2430
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2431
+ return de_CommandError(output, context);
2432
+ }
2433
+ const contents = (0, import_smithy_client.map)({
2434
+ $metadata: deserializeMetadata(output)
2435
+ });
2436
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
2437
+ const doc = (0, import_smithy_client.take)(data, {
2438
+ queries: import_smithy_client._json
2439
+ });
2440
+ Object.assign(contents, doc);
2441
+ return contents;
2442
+ }, "de_GenerateQueryCommand");
2356
2443
  var de_GetAgentMemoryCommand = /* @__PURE__ */ __name(async (output, context) => {
2357
2444
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2358
2445
  return de_CommandError(output, context);
@@ -3912,6 +3999,20 @@ var _DeleteAgentMemoryCommand = class _DeleteAgentMemoryCommand extends import_s
3912
3999
  __name(_DeleteAgentMemoryCommand, "DeleteAgentMemoryCommand");
3913
4000
  var DeleteAgentMemoryCommand = _DeleteAgentMemoryCommand;
3914
4001
 
4002
+ // src/commands/GenerateQueryCommand.ts
4003
+
4004
+
4005
+
4006
+ var _GenerateQueryCommand = class _GenerateQueryCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
4007
+ return [
4008
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
4009
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
4010
+ ];
4011
+ }).s("AmazonBedrockAgentRunTimeService", "GenerateQuery", {}).n("BedrockAgentRuntimeClient", "GenerateQueryCommand").f(GenerateQueryRequestFilterSensitiveLog, GenerateQueryResponseFilterSensitiveLog).ser(se_GenerateQueryCommand).de(de_GenerateQueryCommand).build() {
4012
+ };
4013
+ __name(_GenerateQueryCommand, "GenerateQueryCommand");
4014
+ var GenerateQueryCommand = _GenerateQueryCommand;
4015
+
3915
4016
  // src/commands/GetAgentMemoryCommand.ts
3916
4017
 
3917
4018
 
@@ -4076,6 +4177,7 @@ var RetrieveCommand = _RetrieveCommand;
4076
4177
  // src/BedrockAgentRuntime.ts
4077
4178
  var commands = {
4078
4179
  DeleteAgentMemoryCommand,
4180
+ GenerateQueryCommand,
4079
4181
  GetAgentMemoryCommand,
4080
4182
  InvokeAgentCommand,
4081
4183
  InvokeFlowCommand,
@@ -4112,6 +4214,7 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
4112
4214
  BedrockAgentRuntime,
4113
4215
  $Command,
4114
4216
  DeleteAgentMemoryCommand,
4217
+ GenerateQueryCommand,
4115
4218
  GetAgentMemoryCommand,
4116
4219
  InvokeAgentCommand,
4117
4220
  InvokeFlowCommand,
@@ -4155,6 +4258,10 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
4155
4258
  ThrottlingException,
4156
4259
  ValidationException,
4157
4260
  FlowResponseStream,
4261
+ InputQueryType,
4262
+ QueryTransformationMode,
4263
+ TextToSqlConfigurationType,
4264
+ GeneratedQueryType,
4158
4265
  ContentBlock,
4159
4266
  ConversationRole,
4160
4267
  FileSourceType,
@@ -4164,6 +4271,8 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
4164
4271
  RerankingMetadataSelectionMode,
4165
4272
  RerankingMetadataSelectiveModeConfiguration,
4166
4273
  VectorSearchRerankingConfigurationType,
4274
+ RetrievalResultContentColumnType,
4275
+ RetrievalResultContentType,
4167
4276
  RetrievalResultLocationType,
4168
4277
  Caller,
4169
4278
  GuardrailAction,
@@ -4237,6 +4346,10 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
4237
4346
  FlowTraceEventFilterSensitiveLog,
4238
4347
  FlowResponseStreamFilterSensitiveLog,
4239
4348
  InvokeFlowResponseFilterSensitiveLog,
4349
+ QueryGenerationInputFilterSensitiveLog,
4350
+ GenerateQueryRequestFilterSensitiveLog,
4351
+ GeneratedQueryFilterSensitiveLog,
4352
+ GenerateQueryResponseFilterSensitiveLog,
4240
4353
  ContentBlockFilterSensitiveLog,
4241
4354
  MessageFilterSensitiveLog,
4242
4355
  ConversationHistoryFilterSensitiveLog,
@@ -4251,6 +4364,7 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
4251
4364
  VectorSearchRerankingConfigurationFilterSensitiveLog,
4252
4365
  TextResponsePartFilterSensitiveLog,
4253
4366
  GeneratedResponsePartFilterSensitiveLog,
4367
+ RetrievalResultContentColumnFilterSensitiveLog,
4254
4368
  RetrievalResultContentFilterSensitiveLog,
4255
4369
  RetrievalResultLocationFilterSensitiveLog,
4256
4370
  RetrievedReferenceFilterSensitiveLog,
@@ -1,6 +1,7 @@
1
1
  import { createAggregatedClient } from "@smithy/smithy-client";
2
2
  import { BedrockAgentRuntimeClient } from "./BedrockAgentRuntimeClient";
3
3
  import { DeleteAgentMemoryCommand, } from "./commands/DeleteAgentMemoryCommand";
4
+ import { GenerateQueryCommand, } from "./commands/GenerateQueryCommand";
4
5
  import { GetAgentMemoryCommand, } from "./commands/GetAgentMemoryCommand";
5
6
  import { InvokeAgentCommand } from "./commands/InvokeAgentCommand";
6
7
  import { InvokeFlowCommand } from "./commands/InvokeFlowCommand";
@@ -12,6 +13,7 @@ import { RetrieveAndGenerateStreamCommand, } from "./commands/RetrieveAndGenerat
12
13
  import { RetrieveCommand } from "./commands/RetrieveCommand";
13
14
  const commands = {
14
15
  DeleteAgentMemoryCommand,
16
+ GenerateQueryCommand,
15
17
  GetAgentMemoryCommand,
16
18
  InvokeAgentCommand,
17
19
  InvokeFlowCommand,
@@ -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 { GenerateQueryRequestFilterSensitiveLog, GenerateQueryResponseFilterSensitiveLog, } from "../models/models_0";
6
+ import { de_GenerateQueryCommand, se_GenerateQueryCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class GenerateQueryCommand 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("AmazonBedrockAgentRunTimeService", "GenerateQuery", {})
18
+ .n("BedrockAgentRuntimeClient", "GenerateQueryCommand")
19
+ .f(GenerateQueryRequestFilterSensitiveLog, GenerateQueryResponseFilterSensitiveLog)
20
+ .ser(se_GenerateQueryCommand)
21
+ .de(de_GenerateQueryCommand)
22
+ .build() {
23
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "./DeleteAgentMemoryCommand";
2
+ export * from "./GenerateQueryCommand";
2
3
  export * from "./GetAgentMemoryCommand";
3
4
  export * from "./InvokeAgentCommand";
4
5
  export * from "./InvokeFlowCommand";
@@ -283,6 +283,18 @@ export var FlowResponseStream;
283
283
  return visitor._(value.$unknown[0], value.$unknown[1]);
284
284
  };
285
285
  })(FlowResponseStream || (FlowResponseStream = {}));
286
+ export const InputQueryType = {
287
+ TEXT: "TEXT",
288
+ };
289
+ export const QueryTransformationMode = {
290
+ TEXT_TO_SQL: "TEXT_TO_SQL",
291
+ };
292
+ export const TextToSqlConfigurationType = {
293
+ KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
294
+ };
295
+ export const GeneratedQueryType = {
296
+ REDSHIFT_SQL: "REDSHIFT_SQL",
297
+ };
286
298
  export var ContentBlock;
287
299
  (function (ContentBlock) {
288
300
  ContentBlock.visit = (value, visitor) => {
@@ -330,12 +342,27 @@ export var RerankingMetadataSelectiveModeConfiguration;
330
342
  export const VectorSearchRerankingConfigurationType = {
331
343
  BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL",
332
344
  };
345
+ export const RetrievalResultContentColumnType = {
346
+ BLOB: "BLOB",
347
+ BOOLEAN: "BOOLEAN",
348
+ DOUBLE: "DOUBLE",
349
+ LONG: "LONG",
350
+ NULL: "NULL",
351
+ STRING: "STRING",
352
+ };
353
+ export const RetrievalResultContentType = {
354
+ IMAGE: "IMAGE",
355
+ ROW: "ROW",
356
+ TEXT: "TEXT",
357
+ };
333
358
  export const RetrievalResultLocationType = {
334
359
  CONFLUENCE: "CONFLUENCE",
335
360
  CUSTOM: "CUSTOM",
361
+ KENDRA: "KENDRA",
336
362
  S3: "S3",
337
363
  SALESFORCE: "SALESFORCE",
338
364
  SHAREPOINT: "SHAREPOINT",
365
+ SQL: "SQL",
339
366
  WEB: "WEB",
340
367
  };
341
368
  export var Caller;
@@ -918,6 +945,20 @@ export const InvokeFlowResponseFilterSensitiveLog = (obj) => ({
918
945
  ...obj,
919
946
  ...(obj.responseStream && { responseStream: "STREAMING_CONTENT" }),
920
947
  });
948
+ export const QueryGenerationInputFilterSensitiveLog = (obj) => ({
949
+ ...obj,
950
+ });
951
+ export const GenerateQueryRequestFilterSensitiveLog = (obj) => ({
952
+ ...obj,
953
+ ...(obj.queryGenerationInput && { queryGenerationInput: SENSITIVE_STRING }),
954
+ });
955
+ export const GeneratedQueryFilterSensitiveLog = (obj) => ({
956
+ ...obj,
957
+ });
958
+ export const GenerateQueryResponseFilterSensitiveLog = (obj) => ({
959
+ ...obj,
960
+ ...(obj.queries && { queries: SENSITIVE_STRING }),
961
+ });
921
962
  export const ContentBlockFilterSensitiveLog = (obj) => {
922
963
  if (obj.text !== undefined)
923
964
  return { text: obj.text };
@@ -984,8 +1025,12 @@ export const GeneratedResponsePartFilterSensitiveLog = (obj) => ({
984
1025
  ...obj,
985
1026
  ...(obj.textResponsePart && { textResponsePart: SENSITIVE_STRING }),
986
1027
  });
1028
+ export const RetrievalResultContentColumnFilterSensitiveLog = (obj) => ({
1029
+ ...obj,
1030
+ });
987
1031
  export const RetrievalResultContentFilterSensitiveLog = (obj) => ({
988
1032
  ...obj,
1033
+ ...(obj.row && { row: SENSITIVE_STRING }),
989
1034
  });
990
1035
  export const RetrievalResultLocationFilterSensitiveLog = (obj) => ({
991
1036
  ...obj,
@@ -16,6 +16,20 @@ export const se_DeleteAgentMemoryCommand = async (input, context) => {
16
16
  b.m("DELETE").h(headers).q(query).b(body);
17
17
  return b.build();
18
18
  };
19
+ export const se_GenerateQueryCommand = async (input, context) => {
20
+ const b = rb(input, context);
21
+ const headers = {
22
+ "content-type": "application/json",
23
+ };
24
+ b.bp("/generateQuery");
25
+ let body;
26
+ body = JSON.stringify(take(input, {
27
+ queryGenerationInput: (_) => _json(_),
28
+ transformationConfiguration: (_) => _json(_),
29
+ }));
30
+ b.m("POST").h(headers).b(body);
31
+ return b.build();
32
+ };
19
33
  export const se_GetAgentMemoryCommand = async (input, context) => {
20
34
  const b = rb(input, context);
21
35
  const headers = {};
@@ -184,6 +198,20 @@ export const de_DeleteAgentMemoryCommand = async (output, context) => {
184
198
  await collectBody(output.body, context);
185
199
  return contents;
186
200
  };
201
+ export const de_GenerateQueryCommand = async (output, context) => {
202
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
203
+ return de_CommandError(output, context);
204
+ }
205
+ const contents = map({
206
+ $metadata: deserializeMetadata(output),
207
+ });
208
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
209
+ const doc = take(data, {
210
+ queries: _json,
211
+ });
212
+ Object.assign(contents, doc);
213
+ return contents;
214
+ };
187
215
  export const de_GetAgentMemoryCommand = async (output, context) => {
188
216
  if (output.statusCode !== 200 && output.statusCode >= 300) {
189
217
  return de_CommandError(output, context);
@@ -1,6 +1,7 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
2
  import { BedrockAgentRuntimeClient } from "./BedrockAgentRuntimeClient";
3
3
  import { DeleteAgentMemoryCommandInput, DeleteAgentMemoryCommandOutput } from "./commands/DeleteAgentMemoryCommand";
4
+ import { GenerateQueryCommandInput, GenerateQueryCommandOutput } from "./commands/GenerateQueryCommand";
4
5
  import { GetAgentMemoryCommandInput, GetAgentMemoryCommandOutput } from "./commands/GetAgentMemoryCommand";
5
6
  import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
6
7
  import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
@@ -17,6 +18,12 @@ export interface BedrockAgentRuntime {
17
18
  deleteAgentMemory(args: DeleteAgentMemoryCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAgentMemoryCommandOutput>;
18
19
  deleteAgentMemory(args: DeleteAgentMemoryCommandInput, cb: (err: any, data?: DeleteAgentMemoryCommandOutput) => void): void;
19
20
  deleteAgentMemory(args: DeleteAgentMemoryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteAgentMemoryCommandOutput) => void): void;
21
+ /**
22
+ * @see {@link GenerateQueryCommand}
23
+ */
24
+ generateQuery(args: GenerateQueryCommandInput, options?: __HttpHandlerOptions): Promise<GenerateQueryCommandOutput>;
25
+ generateQuery(args: GenerateQueryCommandInput, cb: (err: any, data?: GenerateQueryCommandOutput) => void): void;
26
+ generateQuery(args: GenerateQueryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateQueryCommandOutput) => void): void;
20
27
  /**
21
28
  * @see {@link GetAgentMemoryCommand}
22
29
  */
@@ -9,6 +9,7 @@ import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration
9
9
  import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, EventStreamSerdeProvider as __EventStreamSerdeProvider, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
10
10
  import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
11
11
  import { DeleteAgentMemoryCommandInput, DeleteAgentMemoryCommandOutput } from "./commands/DeleteAgentMemoryCommand";
12
+ import { GenerateQueryCommandInput, GenerateQueryCommandOutput } from "./commands/GenerateQueryCommand";
12
13
  import { GetAgentMemoryCommandInput, GetAgentMemoryCommandOutput } from "./commands/GetAgentMemoryCommand";
13
14
  import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
14
15
  import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
@@ -24,11 +25,11 @@ export { __Client };
24
25
  /**
25
26
  * @public
26
27
  */
27
- export type ServiceInputTypes = DeleteAgentMemoryCommandInput | GetAgentMemoryCommandInput | InvokeAgentCommandInput | InvokeFlowCommandInput | InvokeInlineAgentCommandInput | OptimizePromptCommandInput | RerankCommandInput | RetrieveAndGenerateCommandInput | RetrieveAndGenerateStreamCommandInput | RetrieveCommandInput;
28
+ export type ServiceInputTypes = DeleteAgentMemoryCommandInput | GenerateQueryCommandInput | GetAgentMemoryCommandInput | InvokeAgentCommandInput | InvokeFlowCommandInput | InvokeInlineAgentCommandInput | OptimizePromptCommandInput | RerankCommandInput | RetrieveAndGenerateCommandInput | RetrieveAndGenerateStreamCommandInput | RetrieveCommandInput;
28
29
  /**
29
30
  * @public
30
31
  */
31
- export type ServiceOutputTypes = DeleteAgentMemoryCommandOutput | GetAgentMemoryCommandOutput | InvokeAgentCommandOutput | InvokeFlowCommandOutput | InvokeInlineAgentCommandOutput | OptimizePromptCommandOutput | RerankCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveAndGenerateStreamCommandOutput | RetrieveCommandOutput;
32
+ export type ServiceOutputTypes = DeleteAgentMemoryCommandOutput | GenerateQueryCommandOutput | GetAgentMemoryCommandOutput | InvokeAgentCommandOutput | InvokeFlowCommandOutput | InvokeInlineAgentCommandOutput | OptimizePromptCommandOutput | RerankCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveAndGenerateStreamCommandOutput | RetrieveCommandOutput;
32
33
  /**
33
34
  * @public
34
35
  */
@@ -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
+ }