@aws-sdk/client-bedrock-agent 3.685.0 → 3.687.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 (68) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/index.js +516 -49
  3. package/dist-es/BedrockAgent.js +2 -0
  4. package/dist-es/commands/CreatePromptCommand.js +1 -1
  5. package/dist-es/commands/CreatePromptVersionCommand.js +1 -1
  6. package/dist-es/commands/GetAgentVersionCommand.js +1 -1
  7. package/dist-es/commands/GetPromptCommand.js +1 -1
  8. package/dist-es/commands/UpdatePromptCommand.js +1 -1
  9. package/dist-es/commands/ValidateFlowDefinitionCommand.js +23 -0
  10. package/dist-es/commands/index.js +1 -0
  11. package/dist-es/models/index.js +1 -0
  12. package/dist-es/models/models_0.js +239 -41
  13. package/dist-es/models/models_1.js +69 -0
  14. package/dist-es/protocols/Aws_restJson1.js +141 -5
  15. package/dist-types/BedrockAgent.d.ts +7 -0
  16. package/dist-types/BedrockAgentClient.d.ts +3 -2
  17. package/dist-types/commands/CreateFlowCommand.d.ts +102 -2
  18. package/dist-types/commands/CreateFlowVersionCommand.d.ts +51 -1
  19. package/dist-types/commands/CreatePromptCommand.d.ts +97 -3
  20. package/dist-types/commands/CreatePromptVersionCommand.d.ts +49 -2
  21. package/dist-types/commands/DeleteAgentVersionCommand.d.ts +1 -1
  22. package/dist-types/commands/DeletePromptCommand.d.ts +1 -1
  23. package/dist-types/commands/GetAgentVersionCommand.d.ts +1 -1
  24. package/dist-types/commands/GetFlowCommand.d.ts +137 -1
  25. package/dist-types/commands/GetFlowVersionCommand.d.ts +51 -1
  26. package/dist-types/commands/GetPromptCommand.d.ts +49 -2
  27. package/dist-types/commands/ListAgentKnowledgeBasesCommand.d.ts +1 -1
  28. package/dist-types/commands/ListAgentVersionsCommand.d.ts +1 -1
  29. package/dist-types/commands/ListKnowledgeBasesCommand.d.ts +1 -1
  30. package/dist-types/commands/ListPromptsCommand.d.ts +1 -1
  31. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  32. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  33. package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
  34. package/dist-types/commands/UpdateAgentKnowledgeBaseCommand.d.ts +1 -1
  35. package/dist-types/commands/UpdateFlowCommand.d.ts +102 -2
  36. package/dist-types/commands/UpdateKnowledgeBaseCommand.d.ts +1 -1
  37. package/dist-types/commands/UpdatePromptCommand.d.ts +97 -3
  38. package/dist-types/commands/ValidateFlowDefinitionCommand.d.ts +335 -0
  39. package/dist-types/commands/index.d.ts +1 -0
  40. package/dist-types/models/index.d.ts +1 -0
  41. package/dist-types/models/models_0.d.ts +2060 -1356
  42. package/dist-types/models/models_1.d.ts +974 -0
  43. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  44. package/dist-types/ts3.4/BedrockAgent.d.ts +17 -0
  45. package/dist-types/ts3.4/BedrockAgentClient.d.ts +8 -2
  46. package/dist-types/ts3.4/commands/CreatePromptCommand.d.ts +1 -1
  47. package/dist-types/ts3.4/commands/CreatePromptVersionCommand.d.ts +1 -1
  48. package/dist-types/ts3.4/commands/DeleteAgentVersionCommand.d.ts +1 -1
  49. package/dist-types/ts3.4/commands/DeletePromptCommand.d.ts +1 -1
  50. package/dist-types/ts3.4/commands/GetAgentVersionCommand.d.ts +1 -1
  51. package/dist-types/ts3.4/commands/GetPromptCommand.d.ts +1 -1
  52. package/dist-types/ts3.4/commands/ListAgentKnowledgeBasesCommand.d.ts +1 -1
  53. package/dist-types/ts3.4/commands/ListAgentVersionsCommand.d.ts +1 -1
  54. package/dist-types/ts3.4/commands/ListKnowledgeBasesCommand.d.ts +1 -1
  55. package/dist-types/ts3.4/commands/ListPromptsCommand.d.ts +1 -1
  56. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +1 -1
  57. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
  58. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +1 -1
  59. package/dist-types/ts3.4/commands/UpdateAgentKnowledgeBaseCommand.d.ts +1 -1
  60. package/dist-types/ts3.4/commands/UpdateKnowledgeBaseCommand.d.ts +1 -1
  61. package/dist-types/ts3.4/commands/UpdatePromptCommand.d.ts +1 -1
  62. package/dist-types/ts3.4/commands/ValidateFlowDefinitionCommand.d.ts +51 -0
  63. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  64. package/dist-types/ts3.4/models/index.d.ts +1 -0
  65. package/dist-types/ts3.4/models/models_0.d.ts +1109 -229
  66. package/dist-types/ts3.4/models/models_1.d.ts +287 -0
  67. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  68. package/package.json +35 -35
@@ -0,0 +1,335 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockAgentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentClient";
4
+ import { ValidateFlowDefinitionRequest, ValidateFlowDefinitionResponse } from "../models/models_1";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ValidateFlowDefinitionCommand}.
14
+ */
15
+ export interface ValidateFlowDefinitionCommandInput extends ValidateFlowDefinitionRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ValidateFlowDefinitionCommand}.
21
+ */
22
+ export interface ValidateFlowDefinitionCommandOutput extends ValidateFlowDefinitionResponse, __MetadataBearer {
23
+ }
24
+ declare const ValidateFlowDefinitionCommand_base: {
25
+ new (input: ValidateFlowDefinitionCommandInput): import("@smithy/smithy-client").CommandImpl<ValidateFlowDefinitionCommandInput, ValidateFlowDefinitionCommandOutput, BedrockAgentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: ValidateFlowDefinitionCommandInput): import("@smithy/smithy-client").CommandImpl<ValidateFlowDefinitionCommandInput, ValidateFlowDefinitionCommandOutput, BedrockAgentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Validates the definition of a flow.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockAgentClient, ValidateFlowDefinitionCommand } from "@aws-sdk/client-bedrock-agent"; // ES Modules import
35
+ * // const { BedrockAgentClient, ValidateFlowDefinitionCommand } = require("@aws-sdk/client-bedrock-agent"); // CommonJS import
36
+ * const client = new BedrockAgentClient(config);
37
+ * const input = { // ValidateFlowDefinitionRequest
38
+ * definition: { // FlowDefinition
39
+ * nodes: [ // FlowNodes
40
+ * { // FlowNode
41
+ * name: "STRING_VALUE", // required
42
+ * type: "Input" || "Output" || "KnowledgeBase" || "Condition" || "Lex" || "Prompt" || "LambdaFunction" || "Storage" || "Agent" || "Retrieval" || "Iterator" || "Collector", // required
43
+ * configuration: { // FlowNodeConfiguration Union: only one key present
44
+ * input: {},
45
+ * output: {},
46
+ * knowledgeBase: { // KnowledgeBaseFlowNodeConfiguration
47
+ * knowledgeBaseId: "STRING_VALUE", // required
48
+ * modelId: "STRING_VALUE",
49
+ * guardrailConfiguration: { // GuardrailConfiguration
50
+ * guardrailIdentifier: "STRING_VALUE",
51
+ * guardrailVersion: "STRING_VALUE",
52
+ * },
53
+ * },
54
+ * condition: { // ConditionFlowNodeConfiguration
55
+ * conditions: [ // FlowConditions // required
56
+ * { // FlowCondition
57
+ * name: "STRING_VALUE", // required
58
+ * expression: "STRING_VALUE",
59
+ * },
60
+ * ],
61
+ * },
62
+ * lex: { // LexFlowNodeConfiguration
63
+ * botAliasArn: "STRING_VALUE", // required
64
+ * localeId: "STRING_VALUE", // required
65
+ * },
66
+ * prompt: { // PromptFlowNodeConfiguration
67
+ * sourceConfiguration: { // PromptFlowNodeSourceConfiguration Union: only one key present
68
+ * resource: { // PromptFlowNodeResourceConfiguration
69
+ * promptArn: "STRING_VALUE", // required
70
+ * },
71
+ * inline: { // PromptFlowNodeInlineConfiguration
72
+ * templateType: "TEXT" || "CHAT", // required
73
+ * templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
74
+ * text: { // TextPromptTemplateConfiguration
75
+ * text: "STRING_VALUE", // required
76
+ * inputVariables: [ // PromptInputVariablesList
77
+ * { // PromptInputVariable
78
+ * name: "STRING_VALUE",
79
+ * },
80
+ * ],
81
+ * },
82
+ * chat: { // ChatPromptTemplateConfiguration
83
+ * messages: [ // Messages // required
84
+ * { // Message
85
+ * role: "user" || "assistant", // required
86
+ * content: [ // ContentBlocks // required
87
+ * { // ContentBlock Union: only one key present
88
+ * text: "STRING_VALUE",
89
+ * },
90
+ * ],
91
+ * },
92
+ * ],
93
+ * system: [ // SystemContentBlocks
94
+ * { // SystemContentBlock Union: only one key present
95
+ * text: "STRING_VALUE",
96
+ * },
97
+ * ],
98
+ * inputVariables: [
99
+ * {
100
+ * name: "STRING_VALUE",
101
+ * },
102
+ * ],
103
+ * toolConfiguration: { // ToolConfiguration
104
+ * tools: [ // Tools // required
105
+ * { // Tool Union: only one key present
106
+ * toolSpec: { // ToolSpecification
107
+ * name: "STRING_VALUE", // required
108
+ * description: "STRING_VALUE",
109
+ * inputSchema: { // ToolInputSchema Union: only one key present
110
+ * json: "DOCUMENT_VALUE",
111
+ * },
112
+ * },
113
+ * },
114
+ * ],
115
+ * toolChoice: { // ToolChoice Union: only one key present
116
+ * auto: {},
117
+ * any: {},
118
+ * tool: { // SpecificToolChoice
119
+ * name: "STRING_VALUE", // required
120
+ * },
121
+ * },
122
+ * },
123
+ * },
124
+ * },
125
+ * modelId: "STRING_VALUE", // required
126
+ * inferenceConfiguration: { // PromptInferenceConfiguration Union: only one key present
127
+ * text: { // PromptModelInferenceConfiguration
128
+ * temperature: Number("float"),
129
+ * topP: Number("float"),
130
+ * maxTokens: Number("int"),
131
+ * stopSequences: [ // StopSequences
132
+ * "STRING_VALUE",
133
+ * ],
134
+ * },
135
+ * },
136
+ * additionalModelRequestFields: "DOCUMENT_VALUE",
137
+ * },
138
+ * },
139
+ * guardrailConfiguration: {
140
+ * guardrailIdentifier: "STRING_VALUE",
141
+ * guardrailVersion: "STRING_VALUE",
142
+ * },
143
+ * },
144
+ * lambdaFunction: { // LambdaFunctionFlowNodeConfiguration
145
+ * lambdaArn: "STRING_VALUE", // required
146
+ * },
147
+ * storage: { // StorageFlowNodeConfiguration
148
+ * serviceConfiguration: { // StorageFlowNodeServiceConfiguration Union: only one key present
149
+ * s3: { // StorageFlowNodeS3Configuration
150
+ * bucketName: "STRING_VALUE", // required
151
+ * },
152
+ * },
153
+ * },
154
+ * agent: { // AgentFlowNodeConfiguration
155
+ * agentAliasArn: "STRING_VALUE", // required
156
+ * },
157
+ * retrieval: { // RetrievalFlowNodeConfiguration
158
+ * serviceConfiguration: { // RetrievalFlowNodeServiceConfiguration Union: only one key present
159
+ * s3: { // RetrievalFlowNodeS3Configuration
160
+ * bucketName: "STRING_VALUE", // required
161
+ * },
162
+ * },
163
+ * },
164
+ * iterator: {},
165
+ * collector: {},
166
+ * },
167
+ * inputs: [ // FlowNodeInputs
168
+ * { // FlowNodeInput
169
+ * name: "STRING_VALUE", // required
170
+ * type: "String" || "Number" || "Boolean" || "Object" || "Array", // required
171
+ * expression: "STRING_VALUE", // required
172
+ * },
173
+ * ],
174
+ * outputs: [ // FlowNodeOutputs
175
+ * { // FlowNodeOutput
176
+ * name: "STRING_VALUE", // required
177
+ * type: "String" || "Number" || "Boolean" || "Object" || "Array", // required
178
+ * },
179
+ * ],
180
+ * },
181
+ * ],
182
+ * connections: [ // FlowConnections
183
+ * { // FlowConnection
184
+ * type: "Data" || "Conditional", // required
185
+ * name: "STRING_VALUE", // required
186
+ * source: "STRING_VALUE", // required
187
+ * target: "STRING_VALUE", // required
188
+ * configuration: { // FlowConnectionConfiguration Union: only one key present
189
+ * data: { // FlowDataConnectionConfiguration
190
+ * sourceOutput: "STRING_VALUE", // required
191
+ * targetInput: "STRING_VALUE", // required
192
+ * },
193
+ * conditional: { // FlowConditionalConnectionConfiguration
194
+ * condition: "STRING_VALUE", // required
195
+ * },
196
+ * },
197
+ * },
198
+ * ],
199
+ * },
200
+ * };
201
+ * const command = new ValidateFlowDefinitionCommand(input);
202
+ * const response = await client.send(command);
203
+ * // { // ValidateFlowDefinitionResponse
204
+ * // validations: [ // FlowValidations // required
205
+ * // { // FlowValidation
206
+ * // message: "STRING_VALUE", // required
207
+ * // severity: "Warning" || "Error", // required
208
+ * // details: { // FlowValidationDetails Union: only one key present
209
+ * // cyclicConnection: { // CyclicConnectionFlowValidationDetails
210
+ * // connection: "STRING_VALUE", // required
211
+ * // },
212
+ * // duplicateConnections: { // DuplicateConnectionsFlowValidationDetails
213
+ * // source: "STRING_VALUE", // required
214
+ * // target: "STRING_VALUE", // required
215
+ * // },
216
+ * // duplicateConditionExpression: { // DuplicateConditionExpressionFlowValidationDetails
217
+ * // node: "STRING_VALUE", // required
218
+ * // expression: "STRING_VALUE", // required
219
+ * // },
220
+ * // unreachableNode: { // UnreachableNodeFlowValidationDetails
221
+ * // node: "STRING_VALUE", // required
222
+ * // },
223
+ * // unknownConnectionSource: { // UnknownConnectionSourceFlowValidationDetails
224
+ * // connection: "STRING_VALUE", // required
225
+ * // },
226
+ * // unknownConnectionSourceOutput: { // UnknownConnectionSourceOutputFlowValidationDetails
227
+ * // connection: "STRING_VALUE", // required
228
+ * // },
229
+ * // unknownConnectionTarget: { // UnknownConnectionTargetFlowValidationDetails
230
+ * // connection: "STRING_VALUE", // required
231
+ * // },
232
+ * // unknownConnectionTargetInput: { // UnknownConnectionTargetInputFlowValidationDetails
233
+ * // connection: "STRING_VALUE", // required
234
+ * // },
235
+ * // unknownConnectionCondition: { // UnknownConnectionConditionFlowValidationDetails
236
+ * // connection: "STRING_VALUE", // required
237
+ * // },
238
+ * // malformedConditionExpression: { // MalformedConditionExpressionFlowValidationDetails
239
+ * // node: "STRING_VALUE", // required
240
+ * // condition: "STRING_VALUE", // required
241
+ * // cause: "STRING_VALUE", // required
242
+ * // },
243
+ * // malformedNodeInputExpression: { // MalformedNodeInputExpressionFlowValidationDetails
244
+ * // node: "STRING_VALUE", // required
245
+ * // input: "STRING_VALUE", // required
246
+ * // cause: "STRING_VALUE", // required
247
+ * // },
248
+ * // mismatchedNodeInputType: { // MismatchedNodeInputTypeFlowValidationDetails
249
+ * // node: "STRING_VALUE", // required
250
+ * // input: "STRING_VALUE", // required
251
+ * // expectedType: "String" || "Number" || "Boolean" || "Object" || "Array", // required
252
+ * // },
253
+ * // mismatchedNodeOutputType: { // MismatchedNodeOutputTypeFlowValidationDetails
254
+ * // node: "STRING_VALUE", // required
255
+ * // output: "STRING_VALUE", // required
256
+ * // expectedType: "String" || "Number" || "Boolean" || "Object" || "Array", // required
257
+ * // },
258
+ * // incompatibleConnectionDataType: { // IncompatibleConnectionDataTypeFlowValidationDetails
259
+ * // connection: "STRING_VALUE", // required
260
+ * // },
261
+ * // missingConnectionConfiguration: { // MissingConnectionConfigurationFlowValidationDetails
262
+ * // connection: "STRING_VALUE", // required
263
+ * // },
264
+ * // missingDefaultCondition: { // MissingDefaultConditionFlowValidationDetails
265
+ * // node: "STRING_VALUE", // required
266
+ * // },
267
+ * // missingEndingNodes: {},
268
+ * // missingNodeConfiguration: { // MissingNodeConfigurationFlowValidationDetails
269
+ * // node: "STRING_VALUE", // required
270
+ * // },
271
+ * // missingNodeInput: { // MissingNodeInputFlowValidationDetails
272
+ * // node: "STRING_VALUE", // required
273
+ * // input: "STRING_VALUE", // required
274
+ * // },
275
+ * // missingNodeOutput: { // MissingNodeOutputFlowValidationDetails
276
+ * // node: "STRING_VALUE", // required
277
+ * // output: "STRING_VALUE", // required
278
+ * // },
279
+ * // missingStartingNodes: {},
280
+ * // multipleNodeInputConnections: { // MultipleNodeInputConnectionsFlowValidationDetails
281
+ * // node: "STRING_VALUE", // required
282
+ * // input: "STRING_VALUE", // required
283
+ * // },
284
+ * // unfulfilledNodeInput: { // UnfulfilledNodeInputFlowValidationDetails
285
+ * // node: "STRING_VALUE", // required
286
+ * // input: "STRING_VALUE", // required
287
+ * // },
288
+ * // unsatisfiedConnectionConditions: { // UnsatisfiedConnectionConditionsFlowValidationDetails
289
+ * // connection: "STRING_VALUE", // required
290
+ * // },
291
+ * // unspecified: {},
292
+ * // },
293
+ * // type: "CyclicConnection" || "DuplicateConnections" || "DuplicateConditionExpression" || "UnreachableNode" || "UnknownConnectionSource" || "UnknownConnectionSourceOutput" || "UnknownConnectionTarget" || "UnknownConnectionTargetInput" || "UnknownConnectionCondition" || "MalformedConditionExpression" || "MalformedNodeInputExpression" || "MismatchedNodeInputType" || "MismatchedNodeOutputType" || "IncompatibleConnectionDataType" || "MissingConnectionConfiguration" || "MissingDefaultCondition" || "MissingEndingNodes" || "MissingNodeConfiguration" || "MissingNodeInput" || "MissingNodeOutput" || "MissingStartingNodes" || "MultipleNodeInputConnections" || "UnfulfilledNodeInput" || "UnsatisfiedConnectionConditions" || "Unspecified",
294
+ * // },
295
+ * // ],
296
+ * // };
297
+ *
298
+ * ```
299
+ *
300
+ * @param ValidateFlowDefinitionCommandInput - {@link ValidateFlowDefinitionCommandInput}
301
+ * @returns {@link ValidateFlowDefinitionCommandOutput}
302
+ * @see {@link ValidateFlowDefinitionCommandInput} for command's `input` shape.
303
+ * @see {@link ValidateFlowDefinitionCommandOutput} for command's `response` shape.
304
+ * @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
305
+ *
306
+ * @throws {@link AccessDeniedException} (client fault)
307
+ * <p>The request is denied because of missing access permissions.</p>
308
+ *
309
+ * @throws {@link InternalServerException} (server fault)
310
+ * <p>An internal server error occurred. Retry your request.</p>
311
+ *
312
+ * @throws {@link ThrottlingException} (client fault)
313
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
314
+ *
315
+ * @throws {@link ValidationException} (client fault)
316
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
317
+ *
318
+ * @throws {@link BedrockAgentServiceException}
319
+ * <p>Base exception class for all service exceptions from BedrockAgent service.</p>
320
+ *
321
+ * @public
322
+ */
323
+ export declare class ValidateFlowDefinitionCommand extends ValidateFlowDefinitionCommand_base {
324
+ /** @internal type navigation helper, not in runtime. */
325
+ protected static __types: {
326
+ api: {
327
+ input: ValidateFlowDefinitionRequest;
328
+ output: ValidateFlowDefinitionResponse;
329
+ };
330
+ sdk: {
331
+ input: ValidateFlowDefinitionCommandInput;
332
+ output: ValidateFlowDefinitionCommandOutput;
333
+ };
334
+ };
335
+ }
@@ -60,3 +60,4 @@ export * from "./UpdateFlowAliasCommand";
60
60
  export * from "./UpdateFlowCommand";
61
61
  export * from "./UpdateKnowledgeBaseCommand";
62
62
  export * from "./UpdatePromptCommand";
63
+ export * from "./ValidateFlowDefinitionCommand";
@@ -1 +1,2 @@
1
1
  export * from "./models_0";
2
+ export * from "./models_1";