@stacksjs/ts-cloud 0.2.3 → 0.2.5
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/dist/aws/acm.d.ts +215 -0
- package/dist/aws/application-autoscaling.d.ts +345 -0
- package/dist/aws/bedrock.d.ts +2672 -0
- package/dist/aws/client.d.ts +181 -0
- package/dist/aws/cloudformation.d.ts +187 -0
- package/dist/aws/cloudfront.d.ts +416 -0
- package/dist/aws/cloudwatch-logs.d.ts +70 -0
- package/dist/aws/comprehend.d.ts +616 -0
- package/dist/aws/connect.d.ts +533 -0
- package/dist/aws/deploy-imap.d.ts +26 -0
- package/dist/aws/dynamodb.d.ts +270 -0
- package/dist/aws/ec2.d.ts +545 -0
- package/dist/aws/ecr.d.ts +240 -0
- package/dist/aws/ecs.d.ts +267 -0
- package/dist/aws/efs.d.ts +36 -0
- package/dist/aws/elasticache.d.ts +112 -0
- package/dist/aws/elbv2.d.ts +389 -0
- package/dist/aws/email.d.ts +260 -0
- package/dist/aws/eventbridge.d.ts +197 -0
- package/dist/aws/iam.d.ts +1013 -0
- package/dist/aws/imap-server.d.ts +298 -0
- package/dist/aws/index.d.ts +53 -0
- package/dist/aws/kendra.d.ts +831 -0
- package/dist/aws/lambda.d.ts +319 -0
- package/dist/aws/opensearch.d.ts +121 -0
- package/dist/aws/personalize.d.ts +586 -0
- package/dist/aws/polly.d.ts +243 -0
- package/dist/aws/rds.d.ts +346 -0
- package/dist/aws/rekognition.d.ts +691 -0
- package/dist/aws/route53-domains.d.ts +161 -0
- package/dist/aws/route53.d.ts +330 -0
- package/dist/aws/s3.d.ts +535 -0
- package/dist/aws/scheduler.d.ts +224 -0
- package/dist/aws/secrets-manager.d.ts +267 -0
- package/dist/aws/ses.d.ts +441 -0
- package/dist/aws/setup-phone.d.ts +1 -0
- package/dist/aws/setup-sms.d.ts +116 -0
- package/dist/aws/sms.d.ts +477 -0
- package/dist/aws/smtp-server.d.ts +108 -0
- package/dist/aws/sns.d.ts +224 -0
- package/dist/aws/sqs.d.ts +107 -0
- package/dist/aws/ssm.d.ts +311 -0
- package/dist/aws/sts.d.ts +21 -0
- package/dist/aws/support.d.ts +139 -0
- package/dist/aws/test-imap.d.ts +15 -0
- package/dist/aws/textract.d.ts +477 -0
- package/dist/aws/transcribe.d.ts +79 -0
- package/dist/aws/translate.d.ts +424 -0
- package/dist/aws/voice.d.ts +361 -0
- package/dist/bin/cli.js +4500 -809
- package/dist/config.d.ts +5 -0
- package/dist/deploy/index.d.ts +6 -0
- package/dist/deploy/static-site-external-dns.d.ts +70 -0
- package/dist/deploy/static-site.d.ts +110 -0
- package/dist/dns/cloudflare.d.ts +74 -0
- package/dist/dns/godaddy.d.ts +63 -0
- package/dist/dns/index.d.ts +67 -0
- package/dist/dns/porkbun.d.ts +43 -0
- package/dist/dns/route53-adapter.d.ts +67 -0
- package/dist/dns/types.d.ts +100 -0
- package/dist/dns/validator.d.ts +105 -0
- package/dist/generators/index.d.ts +4 -0
- package/dist/generators/infrastructure.d.ts +115 -0
- package/dist/index.d.ts +9 -165
- package/dist/index.js +24067 -6430
- package/dist/push/apns.d.ts +140 -0
- package/dist/push/fcm.d.ts +205 -0
- package/dist/push/index.d.ts +44 -0
- package/dist/security/pre-deploy-scanner.d.ts +97 -0
- package/dist/ssl/acme-client.d.ts +133 -0
- package/dist/ssl/index.d.ts +6 -0
- package/dist/ssl/letsencrypt.d.ts +96 -0
- package/dist/utils/cli.d.ts +121 -0
- package/dist/validation/index.d.ts +4 -0
- package/dist/validation/template.d.ts +27 -0
- package/package.json +6 -6
|
@@ -0,0 +1,2672 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AWS Bedrock Client
|
|
3
|
+
* Direct API calls for Bedrock AI model invocations and management
|
|
4
|
+
* No external SDK dependencies - implements AWS Signature V4 directly
|
|
5
|
+
*/
|
|
6
|
+
export interface BedrockMessage {
|
|
7
|
+
role: 'user' | 'assistant';
|
|
8
|
+
content: string | BedrockContentBlock[];
|
|
9
|
+
}
|
|
10
|
+
export type BedrockContentBlock = {
|
|
11
|
+
type: 'text';
|
|
12
|
+
text: string;
|
|
13
|
+
} | {
|
|
14
|
+
type: 'image';
|
|
15
|
+
source: BedrockImageSource;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'document';
|
|
18
|
+
source: BedrockDocumentSource;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'tool_use';
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
input: Record<string, unknown>;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'tool_result';
|
|
26
|
+
tool_use_id: string;
|
|
27
|
+
content: string | BedrockContentBlock[];
|
|
28
|
+
};
|
|
29
|
+
export interface BedrockImageSource {
|
|
30
|
+
type: 'base64';
|
|
31
|
+
media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
|
|
32
|
+
data: string;
|
|
33
|
+
}
|
|
34
|
+
export interface BedrockDocumentSource {
|
|
35
|
+
type: 'base64';
|
|
36
|
+
media_type: 'application/pdf';
|
|
37
|
+
data: string;
|
|
38
|
+
}
|
|
39
|
+
export interface BedrockToolDefinition {
|
|
40
|
+
name: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
input_schema: {
|
|
43
|
+
type: 'object';
|
|
44
|
+
properties: Record<string, unknown>;
|
|
45
|
+
required?: string[];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface BedrockResponse {
|
|
49
|
+
id: string;
|
|
50
|
+
type: string;
|
|
51
|
+
role: string;
|
|
52
|
+
content: Array<{
|
|
53
|
+
type: 'text';
|
|
54
|
+
text: string;
|
|
55
|
+
} | {
|
|
56
|
+
type: 'tool_use';
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
input: Record<string, unknown>;
|
|
60
|
+
}>;
|
|
61
|
+
model: string;
|
|
62
|
+
stop_reason: 'end_turn' | 'tool_use' | 'max_tokens' | 'stop_sequence';
|
|
63
|
+
usage: {
|
|
64
|
+
input_tokens: number;
|
|
65
|
+
output_tokens: number;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface InvokeModelCommandInput {
|
|
69
|
+
modelId: string;
|
|
70
|
+
body: string | Uint8Array | Record<string, unknown>;
|
|
71
|
+
contentType?: string;
|
|
72
|
+
accept?: string;
|
|
73
|
+
trace?: 'ENABLED' | 'DISABLED';
|
|
74
|
+
guardrailIdentifier?: string;
|
|
75
|
+
guardrailVersion?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface InvokeModelCommandOutput {
|
|
78
|
+
body: Uint8Array;
|
|
79
|
+
contentType: string;
|
|
80
|
+
}
|
|
81
|
+
export interface InvokeModelWithResponseStreamCommandInput {
|
|
82
|
+
modelId: string;
|
|
83
|
+
body: string | Uint8Array | Record<string, unknown>;
|
|
84
|
+
contentType?: string;
|
|
85
|
+
accept?: string;
|
|
86
|
+
trace?: 'ENABLED' | 'DISABLED';
|
|
87
|
+
guardrailIdentifier?: string;
|
|
88
|
+
guardrailVersion?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface InvokeModelWithResponseStreamCommandOutput {
|
|
91
|
+
body: AsyncIterable<BedrockStreamChunk>;
|
|
92
|
+
contentType: string;
|
|
93
|
+
}
|
|
94
|
+
export interface BedrockStreamChunk {
|
|
95
|
+
chunk?: {
|
|
96
|
+
bytes: Uint8Array;
|
|
97
|
+
};
|
|
98
|
+
internalServerException?: {
|
|
99
|
+
message: string;
|
|
100
|
+
};
|
|
101
|
+
modelStreamErrorException?: {
|
|
102
|
+
message: string;
|
|
103
|
+
originalStatusCode?: number;
|
|
104
|
+
originalMessage?: string;
|
|
105
|
+
};
|
|
106
|
+
modelTimeoutException?: {
|
|
107
|
+
message: string;
|
|
108
|
+
};
|
|
109
|
+
throttlingException?: {
|
|
110
|
+
message: string;
|
|
111
|
+
};
|
|
112
|
+
validationException?: {
|
|
113
|
+
message: string;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export interface ConverseCommandInput {
|
|
117
|
+
modelId: string;
|
|
118
|
+
messages: BedrockMessage[];
|
|
119
|
+
system?: Array<{
|
|
120
|
+
text: string;
|
|
121
|
+
}>;
|
|
122
|
+
inferenceConfig?: {
|
|
123
|
+
maxTokens?: number;
|
|
124
|
+
temperature?: number;
|
|
125
|
+
topP?: number;
|
|
126
|
+
stopSequences?: string[];
|
|
127
|
+
};
|
|
128
|
+
toolConfig?: {
|
|
129
|
+
tools: Array<{
|
|
130
|
+
toolSpec: BedrockToolDefinition;
|
|
131
|
+
}>;
|
|
132
|
+
toolChoice?: {
|
|
133
|
+
auto: Record<string, never>;
|
|
134
|
+
} | {
|
|
135
|
+
any: Record<string, never>;
|
|
136
|
+
} | {
|
|
137
|
+
tool: {
|
|
138
|
+
name: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
guardrailConfig?: {
|
|
143
|
+
guardrailIdentifier: string;
|
|
144
|
+
guardrailVersion: string;
|
|
145
|
+
trace?: 'enabled' | 'disabled';
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export interface ConverseCommandOutput {
|
|
149
|
+
output: {
|
|
150
|
+
message?: BedrockMessage;
|
|
151
|
+
};
|
|
152
|
+
stopReason: 'end_turn' | 'tool_use' | 'max_tokens' | 'stop_sequence' | 'guardrail_intervened' | 'content_filtered';
|
|
153
|
+
usage: {
|
|
154
|
+
inputTokens: number;
|
|
155
|
+
outputTokens: number;
|
|
156
|
+
totalTokens: number;
|
|
157
|
+
};
|
|
158
|
+
metrics?: {
|
|
159
|
+
latencyMs: number;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
export interface CreateModelCustomizationJobCommandInput {
|
|
163
|
+
jobName: string;
|
|
164
|
+
customModelName: string;
|
|
165
|
+
roleArn: string;
|
|
166
|
+
baseModelIdentifier: string;
|
|
167
|
+
trainingDataConfig: {
|
|
168
|
+
s3Uri: string;
|
|
169
|
+
};
|
|
170
|
+
validationDataConfig?: {
|
|
171
|
+
validators: Array<{
|
|
172
|
+
s3Uri: string;
|
|
173
|
+
}>;
|
|
174
|
+
};
|
|
175
|
+
outputDataConfig: {
|
|
176
|
+
s3Uri: string;
|
|
177
|
+
};
|
|
178
|
+
hyperParameters?: Record<string, string>;
|
|
179
|
+
vpcConfig?: {
|
|
180
|
+
subnetIds: string[];
|
|
181
|
+
securityGroupIds: string[];
|
|
182
|
+
};
|
|
183
|
+
customModelKmsKeyId?: string;
|
|
184
|
+
customModelTags?: Array<{
|
|
185
|
+
key: string;
|
|
186
|
+
value: string;
|
|
187
|
+
}>;
|
|
188
|
+
customizationType?: 'FINE_TUNING' | 'CONTINUED_PRE_TRAINING';
|
|
189
|
+
}
|
|
190
|
+
export interface CreateModelCustomizationJobCommandOutput {
|
|
191
|
+
jobArn: string;
|
|
192
|
+
}
|
|
193
|
+
export interface GetModelCustomizationJobCommandInput {
|
|
194
|
+
jobIdentifier: string;
|
|
195
|
+
}
|
|
196
|
+
export interface GetModelCustomizationJobCommandOutput {
|
|
197
|
+
jobArn: string;
|
|
198
|
+
jobName: string;
|
|
199
|
+
outputModelName: string;
|
|
200
|
+
outputModelArn?: string;
|
|
201
|
+
clientRequestToken?: string;
|
|
202
|
+
roleArn: string;
|
|
203
|
+
status: 'InProgress' | 'Completed' | 'Failed' | 'Stopping' | 'Stopped';
|
|
204
|
+
failureMessage?: string;
|
|
205
|
+
creationTime: string;
|
|
206
|
+
lastModifiedTime?: string;
|
|
207
|
+
endTime?: string;
|
|
208
|
+
baseModelArn: string;
|
|
209
|
+
hyperParameters?: Record<string, string>;
|
|
210
|
+
trainingDataConfig: {
|
|
211
|
+
s3Uri: string;
|
|
212
|
+
};
|
|
213
|
+
validationDataConfig?: {
|
|
214
|
+
validators: Array<{
|
|
215
|
+
s3Uri: string;
|
|
216
|
+
}>;
|
|
217
|
+
};
|
|
218
|
+
outputDataConfig: {
|
|
219
|
+
s3Uri: string;
|
|
220
|
+
};
|
|
221
|
+
customizationType?: 'FINE_TUNING' | 'CONTINUED_PRE_TRAINING';
|
|
222
|
+
outputModelKmsKeyArn?: string;
|
|
223
|
+
trainingMetrics?: {
|
|
224
|
+
trainingLoss?: number;
|
|
225
|
+
};
|
|
226
|
+
validationMetrics?: Array<{
|
|
227
|
+
validationLoss?: number;
|
|
228
|
+
}>;
|
|
229
|
+
vpcConfig?: {
|
|
230
|
+
subnetIds: string[];
|
|
231
|
+
securityGroupIds: string[];
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
export interface ListModelCustomizationJobsCommandInput {
|
|
235
|
+
creationTimeAfter?: string;
|
|
236
|
+
creationTimeBefore?: string;
|
|
237
|
+
statusEquals?: 'InProgress' | 'Completed' | 'Failed' | 'Stopping' | 'Stopped';
|
|
238
|
+
nameContains?: string;
|
|
239
|
+
maxResults?: number;
|
|
240
|
+
nextToken?: string;
|
|
241
|
+
sortBy?: 'CreationTime';
|
|
242
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
243
|
+
}
|
|
244
|
+
export interface ListModelCustomizationJobsCommandOutput {
|
|
245
|
+
nextToken?: string;
|
|
246
|
+
modelCustomizationJobSummaries?: Array<{
|
|
247
|
+
jobArn: string;
|
|
248
|
+
jobName: string;
|
|
249
|
+
status: 'InProgress' | 'Completed' | 'Failed' | 'Stopping' | 'Stopped';
|
|
250
|
+
lastModifiedTime?: string;
|
|
251
|
+
creationTime: string;
|
|
252
|
+
endTime?: string;
|
|
253
|
+
baseModelArn: string;
|
|
254
|
+
customModelArn?: string;
|
|
255
|
+
customModelName?: string;
|
|
256
|
+
customizationType?: 'FINE_TUNING' | 'CONTINUED_PRE_TRAINING';
|
|
257
|
+
}>;
|
|
258
|
+
}
|
|
259
|
+
export interface StopModelCustomizationJobCommandInput {
|
|
260
|
+
jobIdentifier: string;
|
|
261
|
+
}
|
|
262
|
+
export interface StopModelCustomizationJobCommandOutput {
|
|
263
|
+
}
|
|
264
|
+
export interface ListFoundationModelsCommandInput {
|
|
265
|
+
byProvider?: string;
|
|
266
|
+
byCustomizationType?: 'FINE_TUNING' | 'CONTINUED_PRE_TRAINING';
|
|
267
|
+
byOutputModality?: 'TEXT' | 'IMAGE' | 'EMBEDDING';
|
|
268
|
+
byInferenceType?: 'ON_DEMAND' | 'PROVISIONED';
|
|
269
|
+
}
|
|
270
|
+
export interface ListFoundationModelsCommandOutput {
|
|
271
|
+
modelSummaries?: FoundationModelSummary[];
|
|
272
|
+
}
|
|
273
|
+
export interface FoundationModelSummary {
|
|
274
|
+
modelArn: string;
|
|
275
|
+
modelId: string;
|
|
276
|
+
modelName: string;
|
|
277
|
+
providerName: string;
|
|
278
|
+
inputModalities: string[];
|
|
279
|
+
outputModalities: string[];
|
|
280
|
+
responseStreamingSupported: boolean;
|
|
281
|
+
customizationsSupported?: string[];
|
|
282
|
+
inferenceTypesSupported?: string[];
|
|
283
|
+
modelLifecycle?: {
|
|
284
|
+
status: 'ACTIVE' | 'LEGACY';
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
export interface GetFoundationModelCommandInput {
|
|
288
|
+
modelIdentifier: string;
|
|
289
|
+
}
|
|
290
|
+
export interface GetFoundationModelCommandOutput {
|
|
291
|
+
modelDetails: {
|
|
292
|
+
modelArn: string;
|
|
293
|
+
modelId: string;
|
|
294
|
+
modelName: string;
|
|
295
|
+
providerName: string;
|
|
296
|
+
inputModalities: string[];
|
|
297
|
+
outputModalities: string[];
|
|
298
|
+
responseStreamingSupported?: boolean;
|
|
299
|
+
customizationsSupported?: string[];
|
|
300
|
+
inferenceTypesSupported?: string[];
|
|
301
|
+
modelLifecycle?: {
|
|
302
|
+
status: 'ACTIVE' | 'LEGACY';
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
export interface ListCustomModelsCommandInput {
|
|
307
|
+
creationTimeBefore?: string;
|
|
308
|
+
creationTimeAfter?: string;
|
|
309
|
+
nameContains?: string;
|
|
310
|
+
baseModelArnEquals?: string;
|
|
311
|
+
foundationModelArnEquals?: string;
|
|
312
|
+
maxResults?: number;
|
|
313
|
+
nextToken?: string;
|
|
314
|
+
sortBy?: 'CreationTime';
|
|
315
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
316
|
+
}
|
|
317
|
+
export interface ListCustomModelsCommandOutput {
|
|
318
|
+
nextToken?: string;
|
|
319
|
+
modelSummaries?: Array<{
|
|
320
|
+
modelArn: string;
|
|
321
|
+
modelName: string;
|
|
322
|
+
creationTime: string;
|
|
323
|
+
baseModelArn: string;
|
|
324
|
+
baseModelName: string;
|
|
325
|
+
customizationType?: 'FINE_TUNING' | 'CONTINUED_PRE_TRAINING';
|
|
326
|
+
}>;
|
|
327
|
+
}
|
|
328
|
+
export interface DeleteCustomModelCommandInput {
|
|
329
|
+
modelIdentifier: string;
|
|
330
|
+
}
|
|
331
|
+
export interface DeleteCustomModelCommandOutput {
|
|
332
|
+
}
|
|
333
|
+
export interface GetCustomModelCommandInput {
|
|
334
|
+
modelIdentifier: string;
|
|
335
|
+
}
|
|
336
|
+
export interface GetCustomModelCommandOutput {
|
|
337
|
+
modelArn: string;
|
|
338
|
+
modelName: string;
|
|
339
|
+
jobName?: string;
|
|
340
|
+
jobArn?: string;
|
|
341
|
+
baseModelArn: string;
|
|
342
|
+
customizationType?: 'FINE_TUNING' | 'CONTINUED_PRE_TRAINING';
|
|
343
|
+
modelKmsKeyArn?: string;
|
|
344
|
+
hyperParameters?: Record<string, string>;
|
|
345
|
+
trainingDataConfig?: {
|
|
346
|
+
s3Uri: string;
|
|
347
|
+
};
|
|
348
|
+
validationDataConfig?: {
|
|
349
|
+
validators: Array<{
|
|
350
|
+
s3Uri: string;
|
|
351
|
+
}>;
|
|
352
|
+
};
|
|
353
|
+
outputDataConfig?: {
|
|
354
|
+
s3Uri: string;
|
|
355
|
+
};
|
|
356
|
+
trainingMetrics?: {
|
|
357
|
+
trainingLoss?: number;
|
|
358
|
+
};
|
|
359
|
+
validationMetrics?: Array<{
|
|
360
|
+
validationLoss?: number;
|
|
361
|
+
}>;
|
|
362
|
+
creationTime: string;
|
|
363
|
+
}
|
|
364
|
+
export interface CreateFoundationModelEntitlementCommandInput {
|
|
365
|
+
modelId: string;
|
|
366
|
+
}
|
|
367
|
+
export interface CreateFoundationModelEntitlementCommandOutput {
|
|
368
|
+
status: 'PENDING' | 'APPROVED' | 'DENIED';
|
|
369
|
+
modelId: string;
|
|
370
|
+
}
|
|
371
|
+
export interface ListModelInvocationJobsCommandInput {
|
|
372
|
+
submitTimeAfter?: string;
|
|
373
|
+
submitTimeBefore?: string;
|
|
374
|
+
statusEquals?: 'Submitted' | 'InProgress' | 'Completed' | 'Failed' | 'Stopping' | 'Stopped' | 'PartiallyCompleted' | 'Expired' | 'Validating' | 'Scheduled';
|
|
375
|
+
nameContains?: string;
|
|
376
|
+
maxResults?: number;
|
|
377
|
+
nextToken?: string;
|
|
378
|
+
sortBy?: 'CreationTime';
|
|
379
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
380
|
+
}
|
|
381
|
+
export interface ListModelInvocationJobsCommandOutput {
|
|
382
|
+
nextToken?: string;
|
|
383
|
+
invocationJobSummaries?: Array<{
|
|
384
|
+
jobArn: string;
|
|
385
|
+
jobName: string;
|
|
386
|
+
modelId: string;
|
|
387
|
+
clientRequestToken?: string;
|
|
388
|
+
roleArn: string;
|
|
389
|
+
status: string;
|
|
390
|
+
message?: string;
|
|
391
|
+
submitTime: string;
|
|
392
|
+
lastModifiedTime?: string;
|
|
393
|
+
endTime?: string;
|
|
394
|
+
inputDataConfig: {
|
|
395
|
+
s3InputDataConfig: {
|
|
396
|
+
s3Uri: string;
|
|
397
|
+
s3InputFormat?: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
outputDataConfig: {
|
|
401
|
+
s3OutputDataConfig: {
|
|
402
|
+
s3Uri: string;
|
|
403
|
+
s3EncryptionKeyId?: string;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
timeoutDurationInHours?: number;
|
|
407
|
+
jobExpirationTime?: string;
|
|
408
|
+
}>;
|
|
409
|
+
}
|
|
410
|
+
export interface CreateGuardrailCommandInput {
|
|
411
|
+
name: string;
|
|
412
|
+
description?: string;
|
|
413
|
+
topicPolicyConfig?: {
|
|
414
|
+
topicsConfig: Array<{
|
|
415
|
+
name: string;
|
|
416
|
+
definition: string;
|
|
417
|
+
examples?: string[];
|
|
418
|
+
type: 'DENY';
|
|
419
|
+
}>;
|
|
420
|
+
};
|
|
421
|
+
contentPolicyConfig?: {
|
|
422
|
+
filtersConfig: Array<{
|
|
423
|
+
type: 'SEXUAL' | 'VIOLENCE' | 'HATE' | 'INSULTS' | 'MISCONDUCT' | 'PROMPT_ATTACK';
|
|
424
|
+
inputStrength: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
425
|
+
outputStrength: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
426
|
+
}>;
|
|
427
|
+
};
|
|
428
|
+
wordPolicyConfig?: {
|
|
429
|
+
wordsConfig?: Array<{
|
|
430
|
+
text: string;
|
|
431
|
+
}>;
|
|
432
|
+
managedWordListsConfig?: Array<{
|
|
433
|
+
type: 'PROFANITY';
|
|
434
|
+
}>;
|
|
435
|
+
};
|
|
436
|
+
sensitiveInformationPolicyConfig?: {
|
|
437
|
+
piiEntitiesConfig?: Array<{
|
|
438
|
+
type: string;
|
|
439
|
+
action: 'BLOCK' | 'ANONYMIZE';
|
|
440
|
+
}>;
|
|
441
|
+
regexesConfig?: Array<{
|
|
442
|
+
name: string;
|
|
443
|
+
description?: string;
|
|
444
|
+
pattern: string;
|
|
445
|
+
action: 'BLOCK' | 'ANONYMIZE';
|
|
446
|
+
}>;
|
|
447
|
+
};
|
|
448
|
+
contextualGroundingPolicyConfig?: {
|
|
449
|
+
filtersConfig: Array<{
|
|
450
|
+
type: 'GROUNDING' | 'RELEVANCE';
|
|
451
|
+
threshold: number;
|
|
452
|
+
}>;
|
|
453
|
+
};
|
|
454
|
+
blockedInputMessaging: string;
|
|
455
|
+
blockedOutputsMessaging: string;
|
|
456
|
+
kmsKeyId?: string;
|
|
457
|
+
tags?: Array<{
|
|
458
|
+
key: string;
|
|
459
|
+
value: string;
|
|
460
|
+
}>;
|
|
461
|
+
clientRequestToken?: string;
|
|
462
|
+
}
|
|
463
|
+
export interface CreateGuardrailCommandOutput {
|
|
464
|
+
guardrailId: string;
|
|
465
|
+
guardrailArn: string;
|
|
466
|
+
version: string;
|
|
467
|
+
createdAt: string;
|
|
468
|
+
}
|
|
469
|
+
export interface GetGuardrailCommandInput {
|
|
470
|
+
guardrailIdentifier: string;
|
|
471
|
+
guardrailVersion?: string;
|
|
472
|
+
}
|
|
473
|
+
export interface GetGuardrailCommandOutput {
|
|
474
|
+
name: string;
|
|
475
|
+
description?: string;
|
|
476
|
+
guardrailId: string;
|
|
477
|
+
guardrailArn: string;
|
|
478
|
+
version: string;
|
|
479
|
+
status: 'CREATING' | 'UPDATING' | 'VERSIONING' | 'READY' | 'FAILED' | 'DELETING';
|
|
480
|
+
topicPolicy?: {
|
|
481
|
+
topics: Array<{
|
|
482
|
+
name: string;
|
|
483
|
+
definition: string;
|
|
484
|
+
examples?: string[];
|
|
485
|
+
type: 'DENY';
|
|
486
|
+
}>;
|
|
487
|
+
};
|
|
488
|
+
contentPolicy?: {
|
|
489
|
+
filters: Array<{
|
|
490
|
+
type: string;
|
|
491
|
+
inputStrength: string;
|
|
492
|
+
outputStrength: string;
|
|
493
|
+
}>;
|
|
494
|
+
};
|
|
495
|
+
wordPolicy?: {
|
|
496
|
+
words?: Array<{
|
|
497
|
+
text: string;
|
|
498
|
+
}>;
|
|
499
|
+
managedWordLists?: Array<{
|
|
500
|
+
type: string;
|
|
501
|
+
}>;
|
|
502
|
+
};
|
|
503
|
+
sensitiveInformationPolicy?: {
|
|
504
|
+
piiEntities?: Array<{
|
|
505
|
+
type: string;
|
|
506
|
+
action: string;
|
|
507
|
+
}>;
|
|
508
|
+
regexes?: Array<{
|
|
509
|
+
name: string;
|
|
510
|
+
description?: string;
|
|
511
|
+
pattern: string;
|
|
512
|
+
action: string;
|
|
513
|
+
}>;
|
|
514
|
+
};
|
|
515
|
+
contextualGroundingPolicy?: {
|
|
516
|
+
filters: Array<{
|
|
517
|
+
type: string;
|
|
518
|
+
threshold: number;
|
|
519
|
+
}>;
|
|
520
|
+
};
|
|
521
|
+
createdAt: string;
|
|
522
|
+
updatedAt: string;
|
|
523
|
+
statusReasons?: string[];
|
|
524
|
+
failureRecommendations?: string[];
|
|
525
|
+
blockedInputMessaging: string;
|
|
526
|
+
blockedOutputsMessaging: string;
|
|
527
|
+
kmsKeyArn?: string;
|
|
528
|
+
}
|
|
529
|
+
export interface ListGuardrailsCommandInput {
|
|
530
|
+
guardrailIdentifier?: string;
|
|
531
|
+
maxResults?: number;
|
|
532
|
+
nextToken?: string;
|
|
533
|
+
}
|
|
534
|
+
export interface ListGuardrailsCommandOutput {
|
|
535
|
+
guardrails: Array<{
|
|
536
|
+
id: string;
|
|
537
|
+
arn: string;
|
|
538
|
+
status: string;
|
|
539
|
+
name: string;
|
|
540
|
+
description?: string;
|
|
541
|
+
version: string;
|
|
542
|
+
createdAt: string;
|
|
543
|
+
updatedAt: string;
|
|
544
|
+
}>;
|
|
545
|
+
nextToken?: string;
|
|
546
|
+
}
|
|
547
|
+
export interface DeleteGuardrailCommandInput {
|
|
548
|
+
guardrailIdentifier: string;
|
|
549
|
+
guardrailVersion?: string;
|
|
550
|
+
}
|
|
551
|
+
export interface DeleteGuardrailCommandOutput {
|
|
552
|
+
}
|
|
553
|
+
export interface CreateKnowledgeBaseCommandInput {
|
|
554
|
+
clientToken?: string;
|
|
555
|
+
name: string;
|
|
556
|
+
description?: string;
|
|
557
|
+
roleArn: string;
|
|
558
|
+
knowledgeBaseConfiguration: {
|
|
559
|
+
type: 'VECTOR';
|
|
560
|
+
vectorKnowledgeBaseConfiguration?: {
|
|
561
|
+
embeddingModelArn: string;
|
|
562
|
+
embeddingModelConfiguration?: {
|
|
563
|
+
bedrockEmbeddingModelConfiguration?: {
|
|
564
|
+
dimensions?: number;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
storageConfiguration: {
|
|
570
|
+
type: 'OPENSEARCH_SERVERLESS' | 'PINECONE' | 'REDIS_ENTERPRISE_CLOUD' | 'RDS' | 'MONGO_DB_ATLAS';
|
|
571
|
+
opensearchServerlessConfiguration?: {
|
|
572
|
+
collectionArn: string;
|
|
573
|
+
vectorIndexName: string;
|
|
574
|
+
fieldMapping: {
|
|
575
|
+
vectorField: string;
|
|
576
|
+
textField: string;
|
|
577
|
+
metadataField: string;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
pineconeConfiguration?: {
|
|
581
|
+
connectionString: string;
|
|
582
|
+
credentialsSecretArn: string;
|
|
583
|
+
namespace?: string;
|
|
584
|
+
fieldMapping: {
|
|
585
|
+
textField: string;
|
|
586
|
+
metadataField: string;
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
redisEnterpriseCloudConfiguration?: {
|
|
590
|
+
endpoint: string;
|
|
591
|
+
vectorIndexName: string;
|
|
592
|
+
credentialsSecretArn: string;
|
|
593
|
+
fieldMapping: {
|
|
594
|
+
vectorField: string;
|
|
595
|
+
textField: string;
|
|
596
|
+
metadataField: string;
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
rdsConfiguration?: {
|
|
600
|
+
resourceArn: string;
|
|
601
|
+
credentialsSecretArn: string;
|
|
602
|
+
databaseName: string;
|
|
603
|
+
tableName: string;
|
|
604
|
+
fieldMapping: {
|
|
605
|
+
primaryKeyField: string;
|
|
606
|
+
vectorField: string;
|
|
607
|
+
textField: string;
|
|
608
|
+
metadataField: string;
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
mongoDbAtlasConfiguration?: {
|
|
612
|
+
endpoint: string;
|
|
613
|
+
databaseName: string;
|
|
614
|
+
collectionName: string;
|
|
615
|
+
vectorIndexName: string;
|
|
616
|
+
credentialsSecretArn: string;
|
|
617
|
+
fieldMapping: {
|
|
618
|
+
vectorField: string;
|
|
619
|
+
textField: string;
|
|
620
|
+
metadataField: string;
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
tags?: Record<string, string>;
|
|
625
|
+
}
|
|
626
|
+
export interface CreateKnowledgeBaseCommandOutput {
|
|
627
|
+
knowledgeBase: {
|
|
628
|
+
knowledgeBaseId: string;
|
|
629
|
+
name: string;
|
|
630
|
+
knowledgeBaseArn: string;
|
|
631
|
+
description?: string;
|
|
632
|
+
roleArn: string;
|
|
633
|
+
knowledgeBaseConfiguration: {
|
|
634
|
+
type: string;
|
|
635
|
+
vectorKnowledgeBaseConfiguration?: {
|
|
636
|
+
embeddingModelArn: string;
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
storageConfiguration: {
|
|
640
|
+
type: string;
|
|
641
|
+
};
|
|
642
|
+
status: 'CREATING' | 'ACTIVE' | 'DELETING' | 'UPDATING' | 'FAILED' | 'DELETE_UNSUCCESSFUL';
|
|
643
|
+
createdAt: string;
|
|
644
|
+
updatedAt: string;
|
|
645
|
+
failureReasons?: string[];
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
export interface CreateAgentCommandInput {
|
|
649
|
+
agentName: string;
|
|
650
|
+
clientToken?: string;
|
|
651
|
+
instruction?: string;
|
|
652
|
+
foundationModel?: string;
|
|
653
|
+
description?: string;
|
|
654
|
+
idleSessionTTLInSeconds?: number;
|
|
655
|
+
agentResourceRoleArn: string;
|
|
656
|
+
customerEncryptionKeyArn?: string;
|
|
657
|
+
tags?: Record<string, string>;
|
|
658
|
+
promptOverrideConfiguration?: {
|
|
659
|
+
promptConfigurations: Array<{
|
|
660
|
+
promptType: 'PRE_PROCESSING' | 'ORCHESTRATION' | 'POST_PROCESSING' | 'KNOWLEDGE_BASE_RESPONSE_GENERATION';
|
|
661
|
+
promptCreationMode: 'DEFAULT' | 'OVERRIDDEN';
|
|
662
|
+
promptState?: 'ENABLED' | 'DISABLED';
|
|
663
|
+
basePromptTemplate?: string;
|
|
664
|
+
inferenceConfiguration?: {
|
|
665
|
+
temperature?: number;
|
|
666
|
+
topP?: number;
|
|
667
|
+
topK?: number;
|
|
668
|
+
maximumLength?: number;
|
|
669
|
+
stopSequences?: string[];
|
|
670
|
+
};
|
|
671
|
+
parserMode?: 'DEFAULT' | 'OVERRIDDEN';
|
|
672
|
+
}>;
|
|
673
|
+
overrideLambda?: string;
|
|
674
|
+
};
|
|
675
|
+
guardrailConfiguration?: {
|
|
676
|
+
guardrailIdentifier?: string;
|
|
677
|
+
guardrailVersion?: string;
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
export interface CreateAgentCommandOutput {
|
|
681
|
+
agent: {
|
|
682
|
+
agentId: string;
|
|
683
|
+
agentName: string;
|
|
684
|
+
agentArn: string;
|
|
685
|
+
agentVersion: string;
|
|
686
|
+
clientToken?: string;
|
|
687
|
+
instruction?: string;
|
|
688
|
+
agentStatus: 'CREATING' | 'PREPARING' | 'PREPARED' | 'NOT_PREPARED' | 'DELETING' | 'FAILED' | 'VERSIONING' | 'UPDATING';
|
|
689
|
+
foundationModel?: string;
|
|
690
|
+
description?: string;
|
|
691
|
+
idleSessionTTLInSeconds: number;
|
|
692
|
+
agentResourceRoleArn: string;
|
|
693
|
+
customerEncryptionKeyArn?: string;
|
|
694
|
+
createdAt: string;
|
|
695
|
+
updatedAt: string;
|
|
696
|
+
preparedAt?: string;
|
|
697
|
+
failureReasons?: string[];
|
|
698
|
+
recommendedActions?: string[];
|
|
699
|
+
promptOverrideConfiguration?: {
|
|
700
|
+
promptConfigurations: Array<{
|
|
701
|
+
promptType: string;
|
|
702
|
+
promptCreationMode: string;
|
|
703
|
+
promptState?: string;
|
|
704
|
+
basePromptTemplate?: string;
|
|
705
|
+
inferenceConfiguration?: {
|
|
706
|
+
temperature?: number;
|
|
707
|
+
topP?: number;
|
|
708
|
+
topK?: number;
|
|
709
|
+
maximumLength?: number;
|
|
710
|
+
stopSequences?: string[];
|
|
711
|
+
};
|
|
712
|
+
parserMode?: string;
|
|
713
|
+
}>;
|
|
714
|
+
overrideLambda?: string;
|
|
715
|
+
};
|
|
716
|
+
guardrailConfiguration?: {
|
|
717
|
+
guardrailIdentifier?: string;
|
|
718
|
+
guardrailVersion?: string;
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
export interface InvokeAgentCommandInput {
|
|
723
|
+
agentId: string;
|
|
724
|
+
agentAliasId: string;
|
|
725
|
+
sessionId: string;
|
|
726
|
+
endSession?: boolean;
|
|
727
|
+
enableTrace?: boolean;
|
|
728
|
+
inputText?: string;
|
|
729
|
+
memoryId?: string;
|
|
730
|
+
sessionState?: {
|
|
731
|
+
sessionAttributes?: Record<string, string>;
|
|
732
|
+
promptSessionAttributes?: Record<string, string>;
|
|
733
|
+
returnControlInvocationResults?: Array<{
|
|
734
|
+
functionResult?: {
|
|
735
|
+
actionGroup: string;
|
|
736
|
+
function: string;
|
|
737
|
+
responseBody?: Record<string, {
|
|
738
|
+
body: string;
|
|
739
|
+
}>;
|
|
740
|
+
};
|
|
741
|
+
}>;
|
|
742
|
+
invocationId?: string;
|
|
743
|
+
files?: Array<{
|
|
744
|
+
name: string;
|
|
745
|
+
source: {
|
|
746
|
+
sourceType: 'S3' | 'BYTE_CONTENT';
|
|
747
|
+
s3Location?: {
|
|
748
|
+
uri: string;
|
|
749
|
+
};
|
|
750
|
+
byteContent?: {
|
|
751
|
+
mediaType: string;
|
|
752
|
+
data: Uint8Array;
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
useCase: 'CODE_INTERPRETER' | 'CHAT';
|
|
756
|
+
}>;
|
|
757
|
+
knowledgeBaseConfigurations?: Array<{
|
|
758
|
+
knowledgeBaseId: string;
|
|
759
|
+
retrievalConfiguration: {
|
|
760
|
+
vectorSearchConfiguration: {
|
|
761
|
+
numberOfResults?: number;
|
|
762
|
+
overrideSearchType?: 'HYBRID' | 'SEMANTIC';
|
|
763
|
+
filter?: Record<string, unknown>;
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
}>;
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
export interface InvokeAgentCommandOutput {
|
|
770
|
+
completion: AsyncIterable<{
|
|
771
|
+
chunk?: {
|
|
772
|
+
bytes: Uint8Array;
|
|
773
|
+
attribution?: {
|
|
774
|
+
citations: Array<{
|
|
775
|
+
generatedResponsePart?: {
|
|
776
|
+
textResponsePart?: {
|
|
777
|
+
text: string;
|
|
778
|
+
span?: {
|
|
779
|
+
start: number;
|
|
780
|
+
end: number;
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
retrievedReferences?: Array<{
|
|
785
|
+
content?: {
|
|
786
|
+
text: string;
|
|
787
|
+
};
|
|
788
|
+
location?: {
|
|
789
|
+
type: string;
|
|
790
|
+
s3Location?: {
|
|
791
|
+
uri: string;
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
metadata?: Record<string, unknown>;
|
|
795
|
+
}>;
|
|
796
|
+
}>;
|
|
797
|
+
};
|
|
798
|
+
};
|
|
799
|
+
trace?: {
|
|
800
|
+
agentId?: string;
|
|
801
|
+
agentAliasId?: string;
|
|
802
|
+
sessionId?: string;
|
|
803
|
+
agentVersion?: string;
|
|
804
|
+
trace?: Record<string, unknown>;
|
|
805
|
+
};
|
|
806
|
+
returnControl?: {
|
|
807
|
+
invocationId: string;
|
|
808
|
+
invocationInputs: Array<{
|
|
809
|
+
functionInvocationInput?: {
|
|
810
|
+
actionGroup: string;
|
|
811
|
+
function: string;
|
|
812
|
+
parameters: Array<{
|
|
813
|
+
name: string;
|
|
814
|
+
type: string;
|
|
815
|
+
value: string;
|
|
816
|
+
}>;
|
|
817
|
+
};
|
|
818
|
+
}>;
|
|
819
|
+
};
|
|
820
|
+
files?: {
|
|
821
|
+
files: Array<{
|
|
822
|
+
name: string;
|
|
823
|
+
type: string;
|
|
824
|
+
bytes: Uint8Array;
|
|
825
|
+
}>;
|
|
826
|
+
};
|
|
827
|
+
}>;
|
|
828
|
+
contentType: string;
|
|
829
|
+
sessionId: string;
|
|
830
|
+
memoryId?: string;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Bedrock Runtime client for AI model invocations
|
|
834
|
+
*/
|
|
835
|
+
export declare class BedrockRuntimeClient {
|
|
836
|
+
private client;
|
|
837
|
+
private region;
|
|
838
|
+
constructor(region?: string);
|
|
839
|
+
/**
|
|
840
|
+
* Invoke a Bedrock model (matches AWS SDK InvokeModelCommand)
|
|
841
|
+
*/
|
|
842
|
+
invokeModel(params: InvokeModelCommandInput): Promise<InvokeModelCommandOutput>;
|
|
843
|
+
/**
|
|
844
|
+
* Invoke model with streaming response (matches AWS SDK InvokeModelWithResponseStreamCommand)
|
|
845
|
+
*/
|
|
846
|
+
invokeModelWithResponseStream(params: InvokeModelWithResponseStreamCommandInput): Promise<InvokeModelWithResponseStreamCommandOutput>;
|
|
847
|
+
/**
|
|
848
|
+
* Internal method to make streaming request
|
|
849
|
+
*/
|
|
850
|
+
private makeStreamRequest;
|
|
851
|
+
/**
|
|
852
|
+
* Parse AWS event stream format
|
|
853
|
+
*/
|
|
854
|
+
private parseEventStream;
|
|
855
|
+
/**
|
|
856
|
+
* Extract JSON chunks from event stream buffer
|
|
857
|
+
*/
|
|
858
|
+
private extractJsonChunks;
|
|
859
|
+
/**
|
|
860
|
+
* Get credentials from environment
|
|
861
|
+
*/
|
|
862
|
+
private getCredentialsFromEnv;
|
|
863
|
+
/**
|
|
864
|
+
* Sign request for streaming (simplified SigV4)
|
|
865
|
+
*/
|
|
866
|
+
private signStreamRequest;
|
|
867
|
+
/**
|
|
868
|
+
* Invoke Claude model with messages API (convenience method)
|
|
869
|
+
*/
|
|
870
|
+
invokeClaudeMessages(params: {
|
|
871
|
+
modelId?: string;
|
|
872
|
+
messages: BedrockMessage[];
|
|
873
|
+
maxTokens?: number;
|
|
874
|
+
temperature?: number;
|
|
875
|
+
topP?: number;
|
|
876
|
+
topK?: number;
|
|
877
|
+
stopSequences?: string[];
|
|
878
|
+
system?: string;
|
|
879
|
+
tools?: BedrockToolDefinition[];
|
|
880
|
+
toolChoice?: {
|
|
881
|
+
type: 'auto';
|
|
882
|
+
} | {
|
|
883
|
+
type: 'any';
|
|
884
|
+
} | {
|
|
885
|
+
type: 'tool';
|
|
886
|
+
name: string;
|
|
887
|
+
};
|
|
888
|
+
}): Promise<BedrockResponse>;
|
|
889
|
+
/**
|
|
890
|
+
* Converse API - unified conversation interface for all models
|
|
891
|
+
*/
|
|
892
|
+
converse(params: ConverseCommandInput): Promise<ConverseCommandOutput>;
|
|
893
|
+
/**
|
|
894
|
+
* Generate embeddings using a Bedrock model
|
|
895
|
+
*/
|
|
896
|
+
generateEmbeddings(params: {
|
|
897
|
+
modelId?: string;
|
|
898
|
+
inputText: string | string[];
|
|
899
|
+
dimensions?: number;
|
|
900
|
+
normalize?: boolean;
|
|
901
|
+
}): Promise<{
|
|
902
|
+
embedding?: number[];
|
|
903
|
+
embeddings?: number[][];
|
|
904
|
+
}>;
|
|
905
|
+
/**
|
|
906
|
+
* Apply guardrail to content
|
|
907
|
+
*/
|
|
908
|
+
applyGuardrail(params: {
|
|
909
|
+
guardrailIdentifier: string;
|
|
910
|
+
guardrailVersion: string;
|
|
911
|
+
source: 'INPUT' | 'OUTPUT';
|
|
912
|
+
content: Array<{
|
|
913
|
+
text: {
|
|
914
|
+
text: string;
|
|
915
|
+
};
|
|
916
|
+
}>;
|
|
917
|
+
}): Promise<{
|
|
918
|
+
action: 'NONE' | 'GUARDRAIL_INTERVENED';
|
|
919
|
+
outputs: Array<{
|
|
920
|
+
text: string;
|
|
921
|
+
}>;
|
|
922
|
+
assessments: Array<{
|
|
923
|
+
topicPolicy?: {
|
|
924
|
+
topics: Array<{
|
|
925
|
+
name: string;
|
|
926
|
+
type: string;
|
|
927
|
+
action: string;
|
|
928
|
+
}>;
|
|
929
|
+
};
|
|
930
|
+
contentPolicy?: {
|
|
931
|
+
filters: Array<{
|
|
932
|
+
type: string;
|
|
933
|
+
confidence: string;
|
|
934
|
+
action: string;
|
|
935
|
+
}>;
|
|
936
|
+
};
|
|
937
|
+
wordPolicy?: {
|
|
938
|
+
customWords: Array<{
|
|
939
|
+
match: string;
|
|
940
|
+
action: string;
|
|
941
|
+
}>;
|
|
942
|
+
managedWordLists: Array<{
|
|
943
|
+
match: string;
|
|
944
|
+
type: string;
|
|
945
|
+
action: string;
|
|
946
|
+
}>;
|
|
947
|
+
};
|
|
948
|
+
sensitiveInformationPolicy?: {
|
|
949
|
+
piiEntities: Array<{
|
|
950
|
+
type: string;
|
|
951
|
+
match: string;
|
|
952
|
+
action: string;
|
|
953
|
+
}>;
|
|
954
|
+
regexes: Array<{
|
|
955
|
+
name: string;
|
|
956
|
+
match: string;
|
|
957
|
+
action: string;
|
|
958
|
+
}>;
|
|
959
|
+
};
|
|
960
|
+
}>;
|
|
961
|
+
}>;
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Bedrock client for model management (not runtime)
|
|
965
|
+
*/
|
|
966
|
+
export declare class BedrockClient {
|
|
967
|
+
private client;
|
|
968
|
+
private region;
|
|
969
|
+
constructor(region?: string);
|
|
970
|
+
/**
|
|
971
|
+
* List available foundation models
|
|
972
|
+
*/
|
|
973
|
+
listFoundationModels(params?: ListFoundationModelsCommandInput): Promise<ListFoundationModelsCommandOutput>;
|
|
974
|
+
/**
|
|
975
|
+
* Get details about a foundation model
|
|
976
|
+
*/
|
|
977
|
+
getFoundationModel(params: GetFoundationModelCommandInput): Promise<GetFoundationModelCommandOutput>;
|
|
978
|
+
/**
|
|
979
|
+
* Create a model customization job (fine-tuning)
|
|
980
|
+
*/
|
|
981
|
+
createModelCustomizationJob(params: CreateModelCustomizationJobCommandInput): Promise<CreateModelCustomizationJobCommandOutput>;
|
|
982
|
+
/**
|
|
983
|
+
* Get model customization job details
|
|
984
|
+
*/
|
|
985
|
+
getModelCustomizationJob(params: GetModelCustomizationJobCommandInput): Promise<GetModelCustomizationJobCommandOutput>;
|
|
986
|
+
/**
|
|
987
|
+
* List model customization jobs
|
|
988
|
+
*/
|
|
989
|
+
listModelCustomizationJobs(params?: ListModelCustomizationJobsCommandInput): Promise<ListModelCustomizationJobsCommandOutput>;
|
|
990
|
+
/**
|
|
991
|
+
* Stop a model customization job
|
|
992
|
+
*/
|
|
993
|
+
stopModelCustomizationJob(params: StopModelCustomizationJobCommandInput): Promise<StopModelCustomizationJobCommandOutput>;
|
|
994
|
+
/**
|
|
995
|
+
* List custom models
|
|
996
|
+
*/
|
|
997
|
+
listCustomModels(params?: ListCustomModelsCommandInput): Promise<ListCustomModelsCommandOutput>;
|
|
998
|
+
/**
|
|
999
|
+
* Get custom model details
|
|
1000
|
+
*/
|
|
1001
|
+
getCustomModel(params: GetCustomModelCommandInput): Promise<GetCustomModelCommandOutput>;
|
|
1002
|
+
/**
|
|
1003
|
+
* Delete a custom model
|
|
1004
|
+
*/
|
|
1005
|
+
deleteCustomModel(params: DeleteCustomModelCommandInput): Promise<DeleteCustomModelCommandOutput>;
|
|
1006
|
+
/**
|
|
1007
|
+
* Request access to a foundation model
|
|
1008
|
+
*/
|
|
1009
|
+
requestModelAccess(params: CreateFoundationModelEntitlementCommandInput): Promise<CreateFoundationModelEntitlementCommandOutput>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Create a guardrail
|
|
1012
|
+
*/
|
|
1013
|
+
createGuardrail(params: CreateGuardrailCommandInput): Promise<CreateGuardrailCommandOutput>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Get guardrail details
|
|
1016
|
+
*/
|
|
1017
|
+
getGuardrail(params: GetGuardrailCommandInput): Promise<GetGuardrailCommandOutput>;
|
|
1018
|
+
/**
|
|
1019
|
+
* List guardrails
|
|
1020
|
+
*/
|
|
1021
|
+
listGuardrails(params?: ListGuardrailsCommandInput): Promise<ListGuardrailsCommandOutput>;
|
|
1022
|
+
/**
|
|
1023
|
+
* Delete a guardrail
|
|
1024
|
+
*/
|
|
1025
|
+
deleteGuardrail(params: DeleteGuardrailCommandInput): Promise<DeleteGuardrailCommandOutput>;
|
|
1026
|
+
/**
|
|
1027
|
+
* List model invocation jobs (batch inference)
|
|
1028
|
+
*/
|
|
1029
|
+
listModelInvocationJobs(params?: ListModelInvocationJobsCommandInput): Promise<ListModelInvocationJobsCommandOutput>;
|
|
1030
|
+
/**
|
|
1031
|
+
* Wait for a model customization job to complete
|
|
1032
|
+
*/
|
|
1033
|
+
waitForModelCustomizationJob(jobIdentifier: string, options?: {
|
|
1034
|
+
maxWaitMs?: number;
|
|
1035
|
+
pollIntervalMs?: number;
|
|
1036
|
+
}): Promise<GetModelCustomizationJobCommandOutput>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Request access to multiple models
|
|
1039
|
+
*/
|
|
1040
|
+
requestAccessToModels(modelIds: string[]): Promise<Array<{
|
|
1041
|
+
modelId: string;
|
|
1042
|
+
status: string;
|
|
1043
|
+
error?: string;
|
|
1044
|
+
}>>;
|
|
1045
|
+
/**
|
|
1046
|
+
* List all foundation models from a specific provider
|
|
1047
|
+
*/
|
|
1048
|
+
listModelsByProvider(provider: string): Promise<FoundationModelSummary[]>;
|
|
1049
|
+
/**
|
|
1050
|
+
* List all Claude models
|
|
1051
|
+
*/
|
|
1052
|
+
listClaudeModels(): Promise<FoundationModelSummary[]>;
|
|
1053
|
+
/**
|
|
1054
|
+
* List all embedding models
|
|
1055
|
+
*/
|
|
1056
|
+
listEmbeddingModels(): Promise<FoundationModelSummary[]>;
|
|
1057
|
+
/**
|
|
1058
|
+
* Create a batch inference job
|
|
1059
|
+
*/
|
|
1060
|
+
createModelInvocationJob(params: CreateModelInvocationJobCommandInput): Promise<CreateModelInvocationJobCommandOutput>;
|
|
1061
|
+
/**
|
|
1062
|
+
* Get batch inference job details
|
|
1063
|
+
*/
|
|
1064
|
+
getModelInvocationJob(params: GetModelInvocationJobCommandInput): Promise<GetModelInvocationJobCommandOutput>;
|
|
1065
|
+
/**
|
|
1066
|
+
* Stop a batch inference job
|
|
1067
|
+
*/
|
|
1068
|
+
stopModelInvocationJob(params: StopModelInvocationJobCommandInput): Promise<StopModelInvocationJobCommandOutput>;
|
|
1069
|
+
/**
|
|
1070
|
+
* Create provisioned throughput for a model
|
|
1071
|
+
*/
|
|
1072
|
+
createProvisionedModelThroughput(params: CreateProvisionedModelThroughputCommandInput): Promise<CreateProvisionedModelThroughputCommandOutput>;
|
|
1073
|
+
/**
|
|
1074
|
+
* Get provisioned throughput details
|
|
1075
|
+
*/
|
|
1076
|
+
getProvisionedModelThroughput(params: GetProvisionedModelThroughputCommandInput): Promise<GetProvisionedModelThroughputCommandOutput>;
|
|
1077
|
+
/**
|
|
1078
|
+
* List provisioned throughputs
|
|
1079
|
+
*/
|
|
1080
|
+
listProvisionedModelThroughputs(params?: ListProvisionedModelThroughputsCommandInput): Promise<ListProvisionedModelThroughputsCommandOutput>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Update provisioned throughput
|
|
1083
|
+
*/
|
|
1084
|
+
updateProvisionedModelThroughput(params: UpdateProvisionedModelThroughputCommandInput): Promise<UpdateProvisionedModelThroughputCommandOutput>;
|
|
1085
|
+
/**
|
|
1086
|
+
* Delete provisioned throughput
|
|
1087
|
+
*/
|
|
1088
|
+
deleteProvisionedModelThroughput(params: DeleteProvisionedModelThroughputCommandInput): Promise<DeleteProvisionedModelThroughputCommandOutput>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Create a model evaluation job
|
|
1091
|
+
*/
|
|
1092
|
+
createEvaluationJob(params: CreateEvaluationJobCommandInput): Promise<CreateEvaluationJobCommandOutput>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Get evaluation job details
|
|
1095
|
+
*/
|
|
1096
|
+
getEvaluationJob(params: GetEvaluationJobCommandInput): Promise<GetEvaluationJobCommandOutput>;
|
|
1097
|
+
/**
|
|
1098
|
+
* List evaluation jobs
|
|
1099
|
+
*/
|
|
1100
|
+
listEvaluationJobs(params?: ListEvaluationJobsCommandInput): Promise<ListEvaluationJobsCommandOutput>;
|
|
1101
|
+
/**
|
|
1102
|
+
* Stop an evaluation job
|
|
1103
|
+
*/
|
|
1104
|
+
stopEvaluationJob(params: StopEvaluationJobCommandInput): Promise<StopEvaluationJobCommandOutput>;
|
|
1105
|
+
/**
|
|
1106
|
+
* Get inference profile details
|
|
1107
|
+
*/
|
|
1108
|
+
getInferenceProfile(params: GetInferenceProfileCommandInput): Promise<GetInferenceProfileCommandOutput>;
|
|
1109
|
+
/**
|
|
1110
|
+
* List inference profiles
|
|
1111
|
+
*/
|
|
1112
|
+
listInferenceProfiles(params?: ListInferenceProfilesCommandInput): Promise<ListInferenceProfilesCommandOutput>;
|
|
1113
|
+
/**
|
|
1114
|
+
* Create an inference profile
|
|
1115
|
+
*/
|
|
1116
|
+
createInferenceProfile(params: CreateInferenceProfileCommandInput): Promise<CreateInferenceProfileCommandOutput>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Delete an inference profile
|
|
1119
|
+
*/
|
|
1120
|
+
deleteInferenceProfile(params: DeleteInferenceProfileCommandInput): Promise<DeleteInferenceProfileCommandOutput>;
|
|
1121
|
+
/**
|
|
1122
|
+
* Create a model copy job
|
|
1123
|
+
*/
|
|
1124
|
+
createModelCopyJob(params: CreateModelCopyJobCommandInput): Promise<CreateModelCopyJobCommandOutput>;
|
|
1125
|
+
/**
|
|
1126
|
+
* Get model copy job details
|
|
1127
|
+
*/
|
|
1128
|
+
getModelCopyJob(params: GetModelCopyJobCommandInput): Promise<GetModelCopyJobCommandOutput>;
|
|
1129
|
+
/**
|
|
1130
|
+
* List model copy jobs
|
|
1131
|
+
*/
|
|
1132
|
+
listModelCopyJobs(params?: ListModelCopyJobsCommandInput): Promise<ListModelCopyJobsCommandOutput>;
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* Bedrock Agent Runtime client for invoking agents
|
|
1136
|
+
*/
|
|
1137
|
+
export declare class BedrockAgentRuntimeClient {
|
|
1138
|
+
private client;
|
|
1139
|
+
private region;
|
|
1140
|
+
constructor(region?: string);
|
|
1141
|
+
/**
|
|
1142
|
+
* Invoke a Bedrock agent
|
|
1143
|
+
*/
|
|
1144
|
+
invokeAgent(params: InvokeAgentCommandInput): Promise<{
|
|
1145
|
+
completion: string;
|
|
1146
|
+
sessionId: string;
|
|
1147
|
+
memoryId?: string;
|
|
1148
|
+
citations?: Array<{
|
|
1149
|
+
generatedResponsePart?: {
|
|
1150
|
+
textResponsePart?: {
|
|
1151
|
+
text: string;
|
|
1152
|
+
};
|
|
1153
|
+
};
|
|
1154
|
+
retrievedReferences?: Array<{
|
|
1155
|
+
content?: {
|
|
1156
|
+
text: string;
|
|
1157
|
+
};
|
|
1158
|
+
location?: {
|
|
1159
|
+
s3Location?: {
|
|
1160
|
+
uri: string;
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
}>;
|
|
1164
|
+
}>;
|
|
1165
|
+
}>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Retrieve from a knowledge base
|
|
1168
|
+
*/
|
|
1169
|
+
retrieve(params: {
|
|
1170
|
+
knowledgeBaseId: string;
|
|
1171
|
+
retrievalQuery: {
|
|
1172
|
+
text: string;
|
|
1173
|
+
};
|
|
1174
|
+
retrievalConfiguration?: {
|
|
1175
|
+
vectorSearchConfiguration: {
|
|
1176
|
+
numberOfResults?: number;
|
|
1177
|
+
overrideSearchType?: 'HYBRID' | 'SEMANTIC';
|
|
1178
|
+
filter?: Record<string, unknown>;
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
nextToken?: string;
|
|
1182
|
+
}): Promise<{
|
|
1183
|
+
retrievalResults: Array<{
|
|
1184
|
+
content: {
|
|
1185
|
+
text: string;
|
|
1186
|
+
};
|
|
1187
|
+
location?: {
|
|
1188
|
+
type: string;
|
|
1189
|
+
s3Location?: {
|
|
1190
|
+
uri: string;
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
score?: number;
|
|
1194
|
+
metadata?: Record<string, unknown>;
|
|
1195
|
+
}>;
|
|
1196
|
+
nextToken?: string;
|
|
1197
|
+
}>;
|
|
1198
|
+
/**
|
|
1199
|
+
* Retrieve and generate using a knowledge base
|
|
1200
|
+
*/
|
|
1201
|
+
retrieveAndGenerate(params: {
|
|
1202
|
+
input: {
|
|
1203
|
+
text: string;
|
|
1204
|
+
};
|
|
1205
|
+
retrieveAndGenerateConfiguration: {
|
|
1206
|
+
type: 'KNOWLEDGE_BASE';
|
|
1207
|
+
knowledgeBaseConfiguration: {
|
|
1208
|
+
knowledgeBaseId: string;
|
|
1209
|
+
modelArn: string;
|
|
1210
|
+
retrievalConfiguration?: {
|
|
1211
|
+
vectorSearchConfiguration: {
|
|
1212
|
+
numberOfResults?: number;
|
|
1213
|
+
overrideSearchType?: 'HYBRID' | 'SEMANTIC';
|
|
1214
|
+
filter?: Record<string, unknown>;
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
generationConfiguration?: {
|
|
1218
|
+
promptTemplate?: {
|
|
1219
|
+
textPromptTemplate: string;
|
|
1220
|
+
};
|
|
1221
|
+
inferenceConfig?: {
|
|
1222
|
+
textInferenceConfig?: {
|
|
1223
|
+
temperature?: number;
|
|
1224
|
+
topP?: number;
|
|
1225
|
+
maxTokens?: number;
|
|
1226
|
+
stopSequences?: string[];
|
|
1227
|
+
};
|
|
1228
|
+
};
|
|
1229
|
+
guardrailConfiguration?: {
|
|
1230
|
+
guardrailId: string;
|
|
1231
|
+
guardrailVersion: string;
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1235
|
+
};
|
|
1236
|
+
sessionConfiguration?: {
|
|
1237
|
+
kmsKeyArn?: string;
|
|
1238
|
+
};
|
|
1239
|
+
sessionId?: string;
|
|
1240
|
+
}): Promise<{
|
|
1241
|
+
sessionId: string;
|
|
1242
|
+
output: {
|
|
1243
|
+
text: string;
|
|
1244
|
+
};
|
|
1245
|
+
citations?: Array<{
|
|
1246
|
+
generatedResponsePart?: {
|
|
1247
|
+
textResponsePart?: {
|
|
1248
|
+
text: string;
|
|
1249
|
+
span?: {
|
|
1250
|
+
start: number;
|
|
1251
|
+
end: number;
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
};
|
|
1255
|
+
retrievedReferences?: Array<{
|
|
1256
|
+
content: {
|
|
1257
|
+
text: string;
|
|
1258
|
+
};
|
|
1259
|
+
location?: {
|
|
1260
|
+
type: string;
|
|
1261
|
+
s3Location?: {
|
|
1262
|
+
uri: string;
|
|
1263
|
+
};
|
|
1264
|
+
};
|
|
1265
|
+
metadata?: Record<string, unknown>;
|
|
1266
|
+
}>;
|
|
1267
|
+
}>;
|
|
1268
|
+
guardrailAction?: 'INTERVENED' | 'NONE';
|
|
1269
|
+
}>;
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* Bedrock Agent client for agent management
|
|
1273
|
+
*/
|
|
1274
|
+
export declare class BedrockAgentClient {
|
|
1275
|
+
private client;
|
|
1276
|
+
private region;
|
|
1277
|
+
constructor(region?: string);
|
|
1278
|
+
/**
|
|
1279
|
+
* Create an agent
|
|
1280
|
+
*/
|
|
1281
|
+
createAgent(params: CreateAgentCommandInput): Promise<CreateAgentCommandOutput>;
|
|
1282
|
+
/**
|
|
1283
|
+
* Get agent details
|
|
1284
|
+
*/
|
|
1285
|
+
getAgent(params: {
|
|
1286
|
+
agentId: string;
|
|
1287
|
+
}): Promise<{
|
|
1288
|
+
agent: CreateAgentCommandOutput['agent'];
|
|
1289
|
+
}>;
|
|
1290
|
+
/**
|
|
1291
|
+
* List agents
|
|
1292
|
+
*/
|
|
1293
|
+
listAgents(params?: {
|
|
1294
|
+
maxResults?: number;
|
|
1295
|
+
nextToken?: string;
|
|
1296
|
+
}): Promise<{
|
|
1297
|
+
agentSummaries: Array<{
|
|
1298
|
+
agentId: string;
|
|
1299
|
+
agentName: string;
|
|
1300
|
+
agentStatus: string;
|
|
1301
|
+
description?: string;
|
|
1302
|
+
updatedAt: string;
|
|
1303
|
+
latestAgentVersion: string;
|
|
1304
|
+
}>;
|
|
1305
|
+
nextToken?: string;
|
|
1306
|
+
}>;
|
|
1307
|
+
/**
|
|
1308
|
+
* Delete an agent
|
|
1309
|
+
*/
|
|
1310
|
+
deleteAgent(params: {
|
|
1311
|
+
agentId: string;
|
|
1312
|
+
skipResourceInUseCheck?: boolean;
|
|
1313
|
+
}): Promise<{
|
|
1314
|
+
agentId: string;
|
|
1315
|
+
agentStatus: string;
|
|
1316
|
+
}>;
|
|
1317
|
+
/**
|
|
1318
|
+
* Prepare an agent for invocation
|
|
1319
|
+
*/
|
|
1320
|
+
prepareAgent(params: {
|
|
1321
|
+
agentId: string;
|
|
1322
|
+
}): Promise<{
|
|
1323
|
+
agentId: string;
|
|
1324
|
+
agentStatus: string;
|
|
1325
|
+
agentVersion: string;
|
|
1326
|
+
preparedAt: string;
|
|
1327
|
+
}>;
|
|
1328
|
+
/**
|
|
1329
|
+
* Create a knowledge base
|
|
1330
|
+
*/
|
|
1331
|
+
createKnowledgeBase(params: CreateKnowledgeBaseCommandInput): Promise<CreateKnowledgeBaseCommandOutput>;
|
|
1332
|
+
/**
|
|
1333
|
+
* Get knowledge base details
|
|
1334
|
+
*/
|
|
1335
|
+
getKnowledgeBase(params: {
|
|
1336
|
+
knowledgeBaseId: string;
|
|
1337
|
+
}): Promise<{
|
|
1338
|
+
knowledgeBase: CreateKnowledgeBaseCommandOutput['knowledgeBase'];
|
|
1339
|
+
}>;
|
|
1340
|
+
/**
|
|
1341
|
+
* List knowledge bases
|
|
1342
|
+
*/
|
|
1343
|
+
listKnowledgeBases(params?: {
|
|
1344
|
+
maxResults?: number;
|
|
1345
|
+
nextToken?: string;
|
|
1346
|
+
}): Promise<{
|
|
1347
|
+
knowledgeBaseSummaries: Array<{
|
|
1348
|
+
knowledgeBaseId: string;
|
|
1349
|
+
name: string;
|
|
1350
|
+
description?: string;
|
|
1351
|
+
status: string;
|
|
1352
|
+
updatedAt: string;
|
|
1353
|
+
}>;
|
|
1354
|
+
nextToken?: string;
|
|
1355
|
+
}>;
|
|
1356
|
+
/**
|
|
1357
|
+
* Delete a knowledge base
|
|
1358
|
+
*/
|
|
1359
|
+
deleteKnowledgeBase(params: {
|
|
1360
|
+
knowledgeBaseId: string;
|
|
1361
|
+
}): Promise<{
|
|
1362
|
+
knowledgeBaseId: string;
|
|
1363
|
+
status: string;
|
|
1364
|
+
}>;
|
|
1365
|
+
/**
|
|
1366
|
+
* Create a data source for a knowledge base
|
|
1367
|
+
*/
|
|
1368
|
+
createDataSource(params: CreateDataSourceCommandInput): Promise<CreateDataSourceCommandOutput>;
|
|
1369
|
+
/**
|
|
1370
|
+
* Get data source details
|
|
1371
|
+
*/
|
|
1372
|
+
getDataSource(params: GetDataSourceCommandInput): Promise<GetDataSourceCommandOutput>;
|
|
1373
|
+
/**
|
|
1374
|
+
* List data sources for a knowledge base
|
|
1375
|
+
*/
|
|
1376
|
+
listDataSources(params: ListDataSourcesCommandInput): Promise<ListDataSourcesCommandOutput>;
|
|
1377
|
+
/**
|
|
1378
|
+
* Update a data source
|
|
1379
|
+
*/
|
|
1380
|
+
updateDataSource(params: UpdateDataSourceCommandInput): Promise<UpdateDataSourceCommandOutput>;
|
|
1381
|
+
/**
|
|
1382
|
+
* Delete a data source
|
|
1383
|
+
*/
|
|
1384
|
+
deleteDataSource(params: DeleteDataSourceCommandInput): Promise<DeleteDataSourceCommandOutput>;
|
|
1385
|
+
/**
|
|
1386
|
+
* Start an ingestion job to sync data source with knowledge base
|
|
1387
|
+
*/
|
|
1388
|
+
startIngestionJob(params: StartIngestionJobCommandInput): Promise<StartIngestionJobCommandOutput>;
|
|
1389
|
+
/**
|
|
1390
|
+
* Get ingestion job details
|
|
1391
|
+
*/
|
|
1392
|
+
getIngestionJob(params: GetIngestionJobCommandInput): Promise<GetIngestionJobCommandOutput>;
|
|
1393
|
+
/**
|
|
1394
|
+
* List ingestion jobs
|
|
1395
|
+
*/
|
|
1396
|
+
listIngestionJobs(params: ListIngestionJobsCommandInput): Promise<ListIngestionJobsCommandOutput>;
|
|
1397
|
+
/**
|
|
1398
|
+
* Create a prompt
|
|
1399
|
+
*/
|
|
1400
|
+
createPrompt(params: CreatePromptCommandInput): Promise<CreatePromptCommandOutput>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Get prompt details
|
|
1403
|
+
*/
|
|
1404
|
+
getPrompt(params: GetPromptCommandInput): Promise<GetPromptCommandOutput>;
|
|
1405
|
+
/**
|
|
1406
|
+
* List prompts
|
|
1407
|
+
*/
|
|
1408
|
+
listPrompts(params?: ListPromptsCommandInput): Promise<ListPromptsCommandOutput>;
|
|
1409
|
+
/**
|
|
1410
|
+
* Delete a prompt
|
|
1411
|
+
*/
|
|
1412
|
+
deletePrompt(params: DeletePromptCommandInput): Promise<DeletePromptCommandOutput>;
|
|
1413
|
+
/**
|
|
1414
|
+
* Create a new version of a prompt
|
|
1415
|
+
*/
|
|
1416
|
+
createPromptVersion(params: CreatePromptVersionCommandInput): Promise<CreatePromptVersionCommandOutput>;
|
|
1417
|
+
/**
|
|
1418
|
+
* Create a flow
|
|
1419
|
+
*/
|
|
1420
|
+
createFlow(params: CreateFlowCommandInput): Promise<CreateFlowCommandOutput>;
|
|
1421
|
+
/**
|
|
1422
|
+
* Get flow details
|
|
1423
|
+
*/
|
|
1424
|
+
getFlow(params: GetFlowCommandInput): Promise<GetFlowCommandOutput>;
|
|
1425
|
+
/**
|
|
1426
|
+
* List flows
|
|
1427
|
+
*/
|
|
1428
|
+
listFlows(params?: ListFlowsCommandInput): Promise<ListFlowsCommandOutput>;
|
|
1429
|
+
/**
|
|
1430
|
+
* Update a flow
|
|
1431
|
+
*/
|
|
1432
|
+
updateFlow(params: UpdateFlowCommandInput): Promise<UpdateFlowCommandOutput>;
|
|
1433
|
+
/**
|
|
1434
|
+
* Delete a flow
|
|
1435
|
+
*/
|
|
1436
|
+
deleteFlow(params: DeleteFlowCommandInput): Promise<DeleteFlowCommandOutput>;
|
|
1437
|
+
/**
|
|
1438
|
+
* Prepare a flow for execution
|
|
1439
|
+
*/
|
|
1440
|
+
prepareFlow(params: PrepareFlowCommandInput): Promise<PrepareFlowCommandOutput>;
|
|
1441
|
+
/**
|
|
1442
|
+
* Create a new version of a flow
|
|
1443
|
+
*/
|
|
1444
|
+
createFlowVersion(params: CreateFlowVersionCommandInput): Promise<CreateFlowVersionCommandOutput>;
|
|
1445
|
+
/**
|
|
1446
|
+
* Create a flow alias
|
|
1447
|
+
*/
|
|
1448
|
+
createFlowAlias(params: CreateFlowAliasCommandInput): Promise<CreateFlowAliasCommandOutput>;
|
|
1449
|
+
}
|
|
1450
|
+
export interface CreateModelInvocationJobCommandInput {
|
|
1451
|
+
jobName: string;
|
|
1452
|
+
modelId: string;
|
|
1453
|
+
roleArn: string;
|
|
1454
|
+
inputDataConfig: {
|
|
1455
|
+
s3InputDataConfig: {
|
|
1456
|
+
s3Uri: string;
|
|
1457
|
+
s3InputFormat?: 'JSONL';
|
|
1458
|
+
};
|
|
1459
|
+
};
|
|
1460
|
+
outputDataConfig: {
|
|
1461
|
+
s3OutputDataConfig: {
|
|
1462
|
+
s3Uri: string;
|
|
1463
|
+
s3EncryptionKeyId?: string;
|
|
1464
|
+
};
|
|
1465
|
+
};
|
|
1466
|
+
clientRequestToken?: string;
|
|
1467
|
+
timeoutDurationInHours?: number;
|
|
1468
|
+
tags?: Array<{
|
|
1469
|
+
key: string;
|
|
1470
|
+
value: string;
|
|
1471
|
+
}>;
|
|
1472
|
+
vpcConfig?: {
|
|
1473
|
+
subnetIds: string[];
|
|
1474
|
+
securityGroupIds: string[];
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
export interface CreateModelInvocationJobCommandOutput {
|
|
1478
|
+
jobArn: string;
|
|
1479
|
+
}
|
|
1480
|
+
export interface GetModelInvocationJobCommandInput {
|
|
1481
|
+
jobIdentifier: string;
|
|
1482
|
+
}
|
|
1483
|
+
export interface GetModelInvocationJobCommandOutput {
|
|
1484
|
+
jobArn: string;
|
|
1485
|
+
jobName: string;
|
|
1486
|
+
modelId: string;
|
|
1487
|
+
clientRequestToken?: string;
|
|
1488
|
+
roleArn: string;
|
|
1489
|
+
status: 'Submitted' | 'InProgress' | 'Completed' | 'Failed' | 'Stopping' | 'Stopped' | 'PartiallyCompleted' | 'Expired' | 'Validating' | 'Scheduled';
|
|
1490
|
+
message?: string;
|
|
1491
|
+
submitTime: string;
|
|
1492
|
+
lastModifiedTime?: string;
|
|
1493
|
+
endTime?: string;
|
|
1494
|
+
inputDataConfig: {
|
|
1495
|
+
s3InputDataConfig: {
|
|
1496
|
+
s3Uri: string;
|
|
1497
|
+
s3InputFormat?: string;
|
|
1498
|
+
};
|
|
1499
|
+
};
|
|
1500
|
+
outputDataConfig: {
|
|
1501
|
+
s3OutputDataConfig: {
|
|
1502
|
+
s3Uri: string;
|
|
1503
|
+
s3EncryptionKeyId?: string;
|
|
1504
|
+
};
|
|
1505
|
+
};
|
|
1506
|
+
vpcConfig?: {
|
|
1507
|
+
subnetIds: string[];
|
|
1508
|
+
securityGroupIds: string[];
|
|
1509
|
+
};
|
|
1510
|
+
timeoutDurationInHours?: number;
|
|
1511
|
+
jobExpirationTime?: string;
|
|
1512
|
+
}
|
|
1513
|
+
export interface StopModelInvocationJobCommandInput {
|
|
1514
|
+
jobIdentifier: string;
|
|
1515
|
+
}
|
|
1516
|
+
export interface StopModelInvocationJobCommandOutput {
|
|
1517
|
+
}
|
|
1518
|
+
export interface CreateProvisionedModelThroughputCommandInput {
|
|
1519
|
+
modelUnits: number;
|
|
1520
|
+
provisionedModelName: string;
|
|
1521
|
+
modelId: string;
|
|
1522
|
+
clientRequestToken?: string;
|
|
1523
|
+
commitmentDuration?: 'ONE_MONTH' | 'SIX_MONTHS';
|
|
1524
|
+
tags?: Array<{
|
|
1525
|
+
key: string;
|
|
1526
|
+
value: string;
|
|
1527
|
+
}>;
|
|
1528
|
+
}
|
|
1529
|
+
export interface CreateProvisionedModelThroughputCommandOutput {
|
|
1530
|
+
provisionedModelArn: string;
|
|
1531
|
+
}
|
|
1532
|
+
export interface GetProvisionedModelThroughputCommandInput {
|
|
1533
|
+
provisionedModelId: string;
|
|
1534
|
+
}
|
|
1535
|
+
export interface GetProvisionedModelThroughputCommandOutput {
|
|
1536
|
+
modelUnits: number;
|
|
1537
|
+
desiredModelUnits: number;
|
|
1538
|
+
provisionedModelName: string;
|
|
1539
|
+
provisionedModelArn: string;
|
|
1540
|
+
modelArn: string;
|
|
1541
|
+
desiredModelArn: string;
|
|
1542
|
+
foundationModelArn: string;
|
|
1543
|
+
status: 'Creating' | 'InService' | 'Updating' | 'Failed';
|
|
1544
|
+
creationTime: string;
|
|
1545
|
+
lastModifiedTime: string;
|
|
1546
|
+
failureMessage?: string;
|
|
1547
|
+
commitmentDuration?: 'ONE_MONTH' | 'SIX_MONTHS';
|
|
1548
|
+
commitmentExpirationTime?: string;
|
|
1549
|
+
}
|
|
1550
|
+
export interface ListProvisionedModelThroughputsCommandInput {
|
|
1551
|
+
creationTimeAfter?: string;
|
|
1552
|
+
creationTimeBefore?: string;
|
|
1553
|
+
statusEquals?: 'Creating' | 'InService' | 'Updating' | 'Failed';
|
|
1554
|
+
modelArnEquals?: string;
|
|
1555
|
+
nameContains?: string;
|
|
1556
|
+
maxResults?: number;
|
|
1557
|
+
nextToken?: string;
|
|
1558
|
+
sortBy?: 'CreationTime';
|
|
1559
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
1560
|
+
}
|
|
1561
|
+
export interface ListProvisionedModelThroughputsCommandOutput {
|
|
1562
|
+
nextToken?: string;
|
|
1563
|
+
provisionedModelSummaries?: Array<{
|
|
1564
|
+
provisionedModelName: string;
|
|
1565
|
+
provisionedModelArn: string;
|
|
1566
|
+
modelArn: string;
|
|
1567
|
+
desiredModelArn: string;
|
|
1568
|
+
foundationModelArn: string;
|
|
1569
|
+
modelUnits: number;
|
|
1570
|
+
desiredModelUnits: number;
|
|
1571
|
+
status: 'Creating' | 'InService' | 'Updating' | 'Failed';
|
|
1572
|
+
commitmentDuration?: 'ONE_MONTH' | 'SIX_MONTHS';
|
|
1573
|
+
commitmentExpirationTime?: string;
|
|
1574
|
+
creationTime: string;
|
|
1575
|
+
lastModifiedTime: string;
|
|
1576
|
+
}>;
|
|
1577
|
+
}
|
|
1578
|
+
export interface UpdateProvisionedModelThroughputCommandInput {
|
|
1579
|
+
provisionedModelId: string;
|
|
1580
|
+
desiredProvisionedModelName?: string;
|
|
1581
|
+
desiredModelId?: string;
|
|
1582
|
+
}
|
|
1583
|
+
export interface UpdateProvisionedModelThroughputCommandOutput {
|
|
1584
|
+
}
|
|
1585
|
+
export interface DeleteProvisionedModelThroughputCommandInput {
|
|
1586
|
+
provisionedModelId: string;
|
|
1587
|
+
}
|
|
1588
|
+
export interface DeleteProvisionedModelThroughputCommandOutput {
|
|
1589
|
+
}
|
|
1590
|
+
export interface CreateEvaluationJobCommandInput {
|
|
1591
|
+
jobName: string;
|
|
1592
|
+
jobDescription?: string;
|
|
1593
|
+
clientRequestToken?: string;
|
|
1594
|
+
roleArn: string;
|
|
1595
|
+
customerEncryptionKeyId?: string;
|
|
1596
|
+
jobTags?: Array<{
|
|
1597
|
+
key: string;
|
|
1598
|
+
value: string;
|
|
1599
|
+
}>;
|
|
1600
|
+
evaluationConfig: {
|
|
1601
|
+
automated?: {
|
|
1602
|
+
datasetMetricConfigs: Array<{
|
|
1603
|
+
taskType: 'Summarization' | 'Classification' | 'QuestionAndAnswer' | 'Generation' | 'Custom';
|
|
1604
|
+
dataset: {
|
|
1605
|
+
name: string;
|
|
1606
|
+
datasetLocation?: {
|
|
1607
|
+
s3Uri: string;
|
|
1608
|
+
};
|
|
1609
|
+
};
|
|
1610
|
+
metricNames: string[];
|
|
1611
|
+
}>;
|
|
1612
|
+
};
|
|
1613
|
+
human?: {
|
|
1614
|
+
humanWorkflowConfig: {
|
|
1615
|
+
flowDefinitionArn: string;
|
|
1616
|
+
instructions?: string;
|
|
1617
|
+
};
|
|
1618
|
+
customMetrics?: Array<{
|
|
1619
|
+
name: string;
|
|
1620
|
+
description?: string;
|
|
1621
|
+
ratingMethod: 'ThumbsUpDown' | 'IndividualLikertScale' | 'ComparisonLikertScale' | 'ComparisonChoice' | 'ComparisonRank' | 'FreeformFeedback';
|
|
1622
|
+
}>;
|
|
1623
|
+
datasetMetricConfigs: Array<{
|
|
1624
|
+
taskType: 'Summarization' | 'Classification' | 'QuestionAndAnswer' | 'Generation' | 'Custom';
|
|
1625
|
+
dataset: {
|
|
1626
|
+
name: string;
|
|
1627
|
+
datasetLocation?: {
|
|
1628
|
+
s3Uri: string;
|
|
1629
|
+
};
|
|
1630
|
+
};
|
|
1631
|
+
metricNames: string[];
|
|
1632
|
+
}>;
|
|
1633
|
+
};
|
|
1634
|
+
};
|
|
1635
|
+
inferenceConfig: {
|
|
1636
|
+
models: Array<{
|
|
1637
|
+
bedrockModel?: {
|
|
1638
|
+
modelIdentifier: string;
|
|
1639
|
+
inferenceParams: string;
|
|
1640
|
+
};
|
|
1641
|
+
}>;
|
|
1642
|
+
};
|
|
1643
|
+
outputDataConfig: {
|
|
1644
|
+
s3Uri: string;
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
export interface CreateEvaluationJobCommandOutput {
|
|
1648
|
+
jobArn: string;
|
|
1649
|
+
}
|
|
1650
|
+
export interface GetEvaluationJobCommandInput {
|
|
1651
|
+
jobIdentifier: string;
|
|
1652
|
+
}
|
|
1653
|
+
export interface GetEvaluationJobCommandOutput {
|
|
1654
|
+
jobName: string;
|
|
1655
|
+
status: 'InProgress' | 'Completed' | 'Failed' | 'Stopping' | 'Stopped';
|
|
1656
|
+
jobArn: string;
|
|
1657
|
+
jobDescription?: string;
|
|
1658
|
+
roleArn: string;
|
|
1659
|
+
customerEncryptionKeyId?: string;
|
|
1660
|
+
jobType: 'Human' | 'Automated';
|
|
1661
|
+
evaluationConfig: {
|
|
1662
|
+
automated?: {
|
|
1663
|
+
datasetMetricConfigs: Array<{
|
|
1664
|
+
taskType: string;
|
|
1665
|
+
dataset: {
|
|
1666
|
+
name: string;
|
|
1667
|
+
datasetLocation?: {
|
|
1668
|
+
s3Uri: string;
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1671
|
+
metricNames: string[];
|
|
1672
|
+
}>;
|
|
1673
|
+
};
|
|
1674
|
+
human?: {
|
|
1675
|
+
humanWorkflowConfig: {
|
|
1676
|
+
flowDefinitionArn: string;
|
|
1677
|
+
instructions?: string;
|
|
1678
|
+
};
|
|
1679
|
+
customMetrics?: Array<{
|
|
1680
|
+
name: string;
|
|
1681
|
+
description?: string;
|
|
1682
|
+
ratingMethod: string;
|
|
1683
|
+
}>;
|
|
1684
|
+
datasetMetricConfigs: Array<{
|
|
1685
|
+
taskType: string;
|
|
1686
|
+
dataset: {
|
|
1687
|
+
name: string;
|
|
1688
|
+
datasetLocation?: {
|
|
1689
|
+
s3Uri: string;
|
|
1690
|
+
};
|
|
1691
|
+
};
|
|
1692
|
+
metricNames: string[];
|
|
1693
|
+
}>;
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
inferenceConfig: {
|
|
1697
|
+
models: Array<{
|
|
1698
|
+
bedrockModel?: {
|
|
1699
|
+
modelIdentifier: string;
|
|
1700
|
+
inferenceParams: string;
|
|
1701
|
+
};
|
|
1702
|
+
}>;
|
|
1703
|
+
};
|
|
1704
|
+
outputDataConfig: {
|
|
1705
|
+
s3Uri: string;
|
|
1706
|
+
};
|
|
1707
|
+
creationTime: string;
|
|
1708
|
+
lastModifiedTime?: string;
|
|
1709
|
+
failureMessages?: string[];
|
|
1710
|
+
}
|
|
1711
|
+
export interface ListEvaluationJobsCommandInput {
|
|
1712
|
+
creationTimeAfter?: string;
|
|
1713
|
+
creationTimeBefore?: string;
|
|
1714
|
+
statusEquals?: 'InProgress' | 'Completed' | 'Failed' | 'Stopping' | 'Stopped';
|
|
1715
|
+
nameContains?: string;
|
|
1716
|
+
maxResults?: number;
|
|
1717
|
+
nextToken?: string;
|
|
1718
|
+
sortBy?: 'CreationTime';
|
|
1719
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
1720
|
+
}
|
|
1721
|
+
export interface ListEvaluationJobsCommandOutput {
|
|
1722
|
+
nextToken?: string;
|
|
1723
|
+
jobSummaries?: Array<{
|
|
1724
|
+
jobArn: string;
|
|
1725
|
+
jobName: string;
|
|
1726
|
+
status: 'InProgress' | 'Completed' | 'Failed' | 'Stopping' | 'Stopped';
|
|
1727
|
+
creationTime: string;
|
|
1728
|
+
jobType: 'Human' | 'Automated';
|
|
1729
|
+
evaluationTaskTypes: string[];
|
|
1730
|
+
modelIdentifiers: string[];
|
|
1731
|
+
}>;
|
|
1732
|
+
}
|
|
1733
|
+
export interface StopEvaluationJobCommandInput {
|
|
1734
|
+
jobIdentifier: string;
|
|
1735
|
+
}
|
|
1736
|
+
export interface StopEvaluationJobCommandOutput {
|
|
1737
|
+
}
|
|
1738
|
+
export interface GetInferenceProfileCommandInput {
|
|
1739
|
+
inferenceProfileIdentifier: string;
|
|
1740
|
+
}
|
|
1741
|
+
export interface GetInferenceProfileCommandOutput {
|
|
1742
|
+
inferenceProfileName: string;
|
|
1743
|
+
inferenceProfileArn: string;
|
|
1744
|
+
inferenceProfileId: string;
|
|
1745
|
+
description?: string;
|
|
1746
|
+
createdAt?: string;
|
|
1747
|
+
updatedAt?: string;
|
|
1748
|
+
models: Array<{
|
|
1749
|
+
modelArn: string;
|
|
1750
|
+
}>;
|
|
1751
|
+
status: 'ACTIVE';
|
|
1752
|
+
type: 'SYSTEM_DEFINED' | 'APPLICATION';
|
|
1753
|
+
}
|
|
1754
|
+
export interface ListInferenceProfilesCommandInput {
|
|
1755
|
+
maxResults?: number;
|
|
1756
|
+
nextToken?: string;
|
|
1757
|
+
typeEquals?: 'SYSTEM_DEFINED' | 'APPLICATION';
|
|
1758
|
+
}
|
|
1759
|
+
export interface ListInferenceProfilesCommandOutput {
|
|
1760
|
+
inferenceProfileSummaries?: Array<{
|
|
1761
|
+
inferenceProfileName: string;
|
|
1762
|
+
inferenceProfileArn: string;
|
|
1763
|
+
inferenceProfileId: string;
|
|
1764
|
+
description?: string;
|
|
1765
|
+
createdAt?: string;
|
|
1766
|
+
updatedAt?: string;
|
|
1767
|
+
models: Array<{
|
|
1768
|
+
modelArn: string;
|
|
1769
|
+
}>;
|
|
1770
|
+
status: 'ACTIVE';
|
|
1771
|
+
type: 'SYSTEM_DEFINED' | 'APPLICATION';
|
|
1772
|
+
}>;
|
|
1773
|
+
nextToken?: string;
|
|
1774
|
+
}
|
|
1775
|
+
export interface CreateInferenceProfileCommandInput {
|
|
1776
|
+
inferenceProfileName: string;
|
|
1777
|
+
description?: string;
|
|
1778
|
+
clientRequestToken?: string;
|
|
1779
|
+
modelSource: {
|
|
1780
|
+
copyFrom: string;
|
|
1781
|
+
};
|
|
1782
|
+
tags?: Array<{
|
|
1783
|
+
key: string;
|
|
1784
|
+
value: string;
|
|
1785
|
+
}>;
|
|
1786
|
+
}
|
|
1787
|
+
export interface CreateInferenceProfileCommandOutput {
|
|
1788
|
+
inferenceProfileArn: string;
|
|
1789
|
+
status?: 'ACTIVE';
|
|
1790
|
+
}
|
|
1791
|
+
export interface DeleteInferenceProfileCommandInput {
|
|
1792
|
+
inferenceProfileIdentifier: string;
|
|
1793
|
+
}
|
|
1794
|
+
export interface DeleteInferenceProfileCommandOutput {
|
|
1795
|
+
}
|
|
1796
|
+
export interface CreatePromptCommandInput {
|
|
1797
|
+
name: string;
|
|
1798
|
+
description?: string;
|
|
1799
|
+
customerEncryptionKeyArn?: string;
|
|
1800
|
+
defaultVariant?: string;
|
|
1801
|
+
variants?: Array<{
|
|
1802
|
+
name: string;
|
|
1803
|
+
modelId?: string;
|
|
1804
|
+
templateType: 'TEXT';
|
|
1805
|
+
templateConfiguration: {
|
|
1806
|
+
text: {
|
|
1807
|
+
text: string;
|
|
1808
|
+
inputVariables?: Array<{
|
|
1809
|
+
name: string;
|
|
1810
|
+
}>;
|
|
1811
|
+
};
|
|
1812
|
+
};
|
|
1813
|
+
inferenceConfiguration?: {
|
|
1814
|
+
text?: {
|
|
1815
|
+
temperature?: number;
|
|
1816
|
+
topP?: number;
|
|
1817
|
+
maxTokens?: number;
|
|
1818
|
+
stopSequences?: string[];
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
}>;
|
|
1822
|
+
clientToken?: string;
|
|
1823
|
+
tags?: Record<string, string>;
|
|
1824
|
+
}
|
|
1825
|
+
export interface CreatePromptCommandOutput {
|
|
1826
|
+
name: string;
|
|
1827
|
+
description?: string;
|
|
1828
|
+
customerEncryptionKeyArn?: string;
|
|
1829
|
+
defaultVariant?: string;
|
|
1830
|
+
variants?: Array<{
|
|
1831
|
+
name: string;
|
|
1832
|
+
modelId?: string;
|
|
1833
|
+
templateType: string;
|
|
1834
|
+
templateConfiguration: {
|
|
1835
|
+
text?: {
|
|
1836
|
+
text: string;
|
|
1837
|
+
inputVariables?: Array<{
|
|
1838
|
+
name: string;
|
|
1839
|
+
}>;
|
|
1840
|
+
};
|
|
1841
|
+
};
|
|
1842
|
+
inferenceConfiguration?: {
|
|
1843
|
+
text?: {
|
|
1844
|
+
temperature?: number;
|
|
1845
|
+
topP?: number;
|
|
1846
|
+
maxTokens?: number;
|
|
1847
|
+
stopSequences?: string[];
|
|
1848
|
+
};
|
|
1849
|
+
};
|
|
1850
|
+
}>;
|
|
1851
|
+
id: string;
|
|
1852
|
+
arn: string;
|
|
1853
|
+
version: string;
|
|
1854
|
+
createdAt: string;
|
|
1855
|
+
updatedAt: string;
|
|
1856
|
+
}
|
|
1857
|
+
export interface GetPromptCommandInput {
|
|
1858
|
+
promptIdentifier: string;
|
|
1859
|
+
promptVersion?: string;
|
|
1860
|
+
}
|
|
1861
|
+
export interface GetPromptCommandOutput {
|
|
1862
|
+
name: string;
|
|
1863
|
+
description?: string;
|
|
1864
|
+
customerEncryptionKeyArn?: string;
|
|
1865
|
+
defaultVariant?: string;
|
|
1866
|
+
variants?: Array<{
|
|
1867
|
+
name: string;
|
|
1868
|
+
modelId?: string;
|
|
1869
|
+
templateType: string;
|
|
1870
|
+
templateConfiguration: {
|
|
1871
|
+
text?: {
|
|
1872
|
+
text: string;
|
|
1873
|
+
inputVariables?: Array<{
|
|
1874
|
+
name: string;
|
|
1875
|
+
}>;
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
inferenceConfiguration?: {
|
|
1879
|
+
text?: {
|
|
1880
|
+
temperature?: number;
|
|
1881
|
+
topP?: number;
|
|
1882
|
+
maxTokens?: number;
|
|
1883
|
+
stopSequences?: string[];
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
}>;
|
|
1887
|
+
id: string;
|
|
1888
|
+
arn: string;
|
|
1889
|
+
version: string;
|
|
1890
|
+
createdAt: string;
|
|
1891
|
+
updatedAt: string;
|
|
1892
|
+
}
|
|
1893
|
+
export interface ListPromptsCommandInput {
|
|
1894
|
+
promptIdentifier?: string;
|
|
1895
|
+
maxResults?: number;
|
|
1896
|
+
nextToken?: string;
|
|
1897
|
+
}
|
|
1898
|
+
export interface ListPromptsCommandOutput {
|
|
1899
|
+
promptSummaries: Array<{
|
|
1900
|
+
name: string;
|
|
1901
|
+
description?: string;
|
|
1902
|
+
id: string;
|
|
1903
|
+
arn: string;
|
|
1904
|
+
version: string;
|
|
1905
|
+
createdAt: string;
|
|
1906
|
+
updatedAt: string;
|
|
1907
|
+
}>;
|
|
1908
|
+
nextToken?: string;
|
|
1909
|
+
}
|
|
1910
|
+
export interface DeletePromptCommandInput {
|
|
1911
|
+
promptIdentifier: string;
|
|
1912
|
+
promptVersion?: string;
|
|
1913
|
+
}
|
|
1914
|
+
export interface DeletePromptCommandOutput {
|
|
1915
|
+
id: string;
|
|
1916
|
+
version?: string;
|
|
1917
|
+
}
|
|
1918
|
+
export interface CreatePromptVersionCommandInput {
|
|
1919
|
+
promptIdentifier: string;
|
|
1920
|
+
description?: string;
|
|
1921
|
+
clientToken?: string;
|
|
1922
|
+
tags?: Record<string, string>;
|
|
1923
|
+
}
|
|
1924
|
+
export interface CreatePromptVersionCommandOutput {
|
|
1925
|
+
name: string;
|
|
1926
|
+
description?: string;
|
|
1927
|
+
customerEncryptionKeyArn?: string;
|
|
1928
|
+
defaultVariant?: string;
|
|
1929
|
+
variants?: Array<{
|
|
1930
|
+
name: string;
|
|
1931
|
+
modelId?: string;
|
|
1932
|
+
templateType: string;
|
|
1933
|
+
templateConfiguration: {
|
|
1934
|
+
text?: {
|
|
1935
|
+
text: string;
|
|
1936
|
+
inputVariables?: Array<{
|
|
1937
|
+
name: string;
|
|
1938
|
+
}>;
|
|
1939
|
+
};
|
|
1940
|
+
};
|
|
1941
|
+
inferenceConfiguration?: {
|
|
1942
|
+
text?: {
|
|
1943
|
+
temperature?: number;
|
|
1944
|
+
topP?: number;
|
|
1945
|
+
maxTokens?: number;
|
|
1946
|
+
stopSequences?: string[];
|
|
1947
|
+
};
|
|
1948
|
+
};
|
|
1949
|
+
}>;
|
|
1950
|
+
id: string;
|
|
1951
|
+
arn: string;
|
|
1952
|
+
version: string;
|
|
1953
|
+
createdAt: string;
|
|
1954
|
+
updatedAt: string;
|
|
1955
|
+
}
|
|
1956
|
+
export interface FlowNodeConfiguration {
|
|
1957
|
+
input?: Record<string, never>;
|
|
1958
|
+
output?: Record<string, never>;
|
|
1959
|
+
knowledgeBase?: {
|
|
1960
|
+
knowledgeBaseId: string;
|
|
1961
|
+
modelId?: string;
|
|
1962
|
+
};
|
|
1963
|
+
condition?: {
|
|
1964
|
+
conditions: Array<{
|
|
1965
|
+
name: string;
|
|
1966
|
+
expression: string;
|
|
1967
|
+
}>;
|
|
1968
|
+
};
|
|
1969
|
+
lex?: {
|
|
1970
|
+
botAliasArn: string;
|
|
1971
|
+
localeId: string;
|
|
1972
|
+
};
|
|
1973
|
+
prompt?: {
|
|
1974
|
+
sourceConfiguration: {
|
|
1975
|
+
resource?: {
|
|
1976
|
+
promptArn: string;
|
|
1977
|
+
};
|
|
1978
|
+
inline?: {
|
|
1979
|
+
modelId: string;
|
|
1980
|
+
templateType: 'TEXT';
|
|
1981
|
+
templateConfiguration: {
|
|
1982
|
+
text: {
|
|
1983
|
+
text: string;
|
|
1984
|
+
inputVariables?: Array<{
|
|
1985
|
+
name: string;
|
|
1986
|
+
}>;
|
|
1987
|
+
};
|
|
1988
|
+
};
|
|
1989
|
+
inferenceConfiguration?: {
|
|
1990
|
+
text?: {
|
|
1991
|
+
temperature?: number;
|
|
1992
|
+
topP?: number;
|
|
1993
|
+
maxTokens?: number;
|
|
1994
|
+
stopSequences?: string[];
|
|
1995
|
+
};
|
|
1996
|
+
};
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
};
|
|
2000
|
+
lambdaFunction?: {
|
|
2001
|
+
lambdaArn: string;
|
|
2002
|
+
};
|
|
2003
|
+
agent?: {
|
|
2004
|
+
agentAliasArn: string;
|
|
2005
|
+
};
|
|
2006
|
+
storage?: {
|
|
2007
|
+
serviceConfiguration: {
|
|
2008
|
+
s3?: {
|
|
2009
|
+
bucketName: string;
|
|
2010
|
+
};
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
retrieval?: {
|
|
2014
|
+
serviceConfiguration: {
|
|
2015
|
+
s3?: {
|
|
2016
|
+
bucketName: string;
|
|
2017
|
+
};
|
|
2018
|
+
};
|
|
2019
|
+
};
|
|
2020
|
+
iterator?: Record<string, never>;
|
|
2021
|
+
collector?: Record<string, never>;
|
|
2022
|
+
}
|
|
2023
|
+
export interface FlowNode {
|
|
2024
|
+
name: string;
|
|
2025
|
+
type: 'Input' | 'Output' | 'KnowledgeBase' | 'Condition' | 'Lex' | 'Prompt' | 'LambdaFunction' | 'Agent' | 'Storage' | 'Retrieval' | 'Iterator' | 'Collector';
|
|
2026
|
+
configuration?: FlowNodeConfiguration;
|
|
2027
|
+
inputs?: Array<{
|
|
2028
|
+
name: string;
|
|
2029
|
+
type: 'String' | 'Number' | 'Boolean' | 'Object' | 'Array';
|
|
2030
|
+
expression: string;
|
|
2031
|
+
}>;
|
|
2032
|
+
outputs?: Array<{
|
|
2033
|
+
name: string;
|
|
2034
|
+
type: 'String' | 'Number' | 'Boolean' | 'Object' | 'Array';
|
|
2035
|
+
}>;
|
|
2036
|
+
}
|
|
2037
|
+
export interface FlowConnection {
|
|
2038
|
+
name: string;
|
|
2039
|
+
source: string;
|
|
2040
|
+
target: string;
|
|
2041
|
+
type: 'Data' | 'Conditional';
|
|
2042
|
+
configuration?: {
|
|
2043
|
+
data?: {
|
|
2044
|
+
sourceOutput: string;
|
|
2045
|
+
targetInput: string;
|
|
2046
|
+
};
|
|
2047
|
+
conditional?: {
|
|
2048
|
+
condition: string;
|
|
2049
|
+
};
|
|
2050
|
+
};
|
|
2051
|
+
}
|
|
2052
|
+
export interface CreateFlowCommandInput {
|
|
2053
|
+
name: string;
|
|
2054
|
+
description?: string;
|
|
2055
|
+
executionRoleArn: string;
|
|
2056
|
+
customerEncryptionKeyArn?: string;
|
|
2057
|
+
definition?: {
|
|
2058
|
+
nodes?: FlowNode[];
|
|
2059
|
+
connections?: FlowConnection[];
|
|
2060
|
+
};
|
|
2061
|
+
clientToken?: string;
|
|
2062
|
+
tags?: Record<string, string>;
|
|
2063
|
+
}
|
|
2064
|
+
export interface CreateFlowCommandOutput {
|
|
2065
|
+
name: string;
|
|
2066
|
+
description?: string;
|
|
2067
|
+
executionRoleArn: string;
|
|
2068
|
+
customerEncryptionKeyArn?: string;
|
|
2069
|
+
id: string;
|
|
2070
|
+
arn: string;
|
|
2071
|
+
status: 'NotPrepared' | 'Preparing' | 'Prepared' | 'Failed';
|
|
2072
|
+
createdAt: string;
|
|
2073
|
+
updatedAt: string;
|
|
2074
|
+
version: string;
|
|
2075
|
+
definition?: {
|
|
2076
|
+
nodes?: FlowNode[];
|
|
2077
|
+
connections?: FlowConnection[];
|
|
2078
|
+
};
|
|
2079
|
+
}
|
|
2080
|
+
export interface GetFlowCommandInput {
|
|
2081
|
+
flowIdentifier: string;
|
|
2082
|
+
}
|
|
2083
|
+
export interface GetFlowCommandOutput {
|
|
2084
|
+
name: string;
|
|
2085
|
+
description?: string;
|
|
2086
|
+
executionRoleArn: string;
|
|
2087
|
+
customerEncryptionKeyArn?: string;
|
|
2088
|
+
id: string;
|
|
2089
|
+
arn: string;
|
|
2090
|
+
status: 'NotPrepared' | 'Preparing' | 'Prepared' | 'Failed';
|
|
2091
|
+
createdAt: string;
|
|
2092
|
+
updatedAt: string;
|
|
2093
|
+
version: string;
|
|
2094
|
+
definition?: {
|
|
2095
|
+
nodes?: FlowNode[];
|
|
2096
|
+
connections?: FlowConnection[];
|
|
2097
|
+
};
|
|
2098
|
+
validations?: Array<{
|
|
2099
|
+
message: string;
|
|
2100
|
+
severity: 'Warning' | 'Error';
|
|
2101
|
+
}>;
|
|
2102
|
+
}
|
|
2103
|
+
export interface ListFlowsCommandInput {
|
|
2104
|
+
maxResults?: number;
|
|
2105
|
+
nextToken?: string;
|
|
2106
|
+
}
|
|
2107
|
+
export interface ListFlowsCommandOutput {
|
|
2108
|
+
flowSummaries: Array<{
|
|
2109
|
+
name: string;
|
|
2110
|
+
description?: string;
|
|
2111
|
+
id: string;
|
|
2112
|
+
arn: string;
|
|
2113
|
+
status: 'NotPrepared' | 'Preparing' | 'Prepared' | 'Failed';
|
|
2114
|
+
createdAt: string;
|
|
2115
|
+
updatedAt: string;
|
|
2116
|
+
version: string;
|
|
2117
|
+
}>;
|
|
2118
|
+
nextToken?: string;
|
|
2119
|
+
}
|
|
2120
|
+
export interface UpdateFlowCommandInput {
|
|
2121
|
+
flowIdentifier: string;
|
|
2122
|
+
name: string;
|
|
2123
|
+
description?: string;
|
|
2124
|
+
executionRoleArn: string;
|
|
2125
|
+
customerEncryptionKeyArn?: string;
|
|
2126
|
+
definition?: {
|
|
2127
|
+
nodes?: FlowNode[];
|
|
2128
|
+
connections?: FlowConnection[];
|
|
2129
|
+
};
|
|
2130
|
+
}
|
|
2131
|
+
export interface UpdateFlowCommandOutput {
|
|
2132
|
+
name: string;
|
|
2133
|
+
description?: string;
|
|
2134
|
+
executionRoleArn: string;
|
|
2135
|
+
customerEncryptionKeyArn?: string;
|
|
2136
|
+
id: string;
|
|
2137
|
+
arn: string;
|
|
2138
|
+
status: 'NotPrepared' | 'Preparing' | 'Prepared' | 'Failed';
|
|
2139
|
+
createdAt: string;
|
|
2140
|
+
updatedAt: string;
|
|
2141
|
+
version: string;
|
|
2142
|
+
definition?: {
|
|
2143
|
+
nodes?: FlowNode[];
|
|
2144
|
+
connections?: FlowConnection[];
|
|
2145
|
+
};
|
|
2146
|
+
}
|
|
2147
|
+
export interface DeleteFlowCommandInput {
|
|
2148
|
+
flowIdentifier: string;
|
|
2149
|
+
skipResourceInUseCheck?: boolean;
|
|
2150
|
+
}
|
|
2151
|
+
export interface DeleteFlowCommandOutput {
|
|
2152
|
+
id: string;
|
|
2153
|
+
}
|
|
2154
|
+
export interface PrepareFlowCommandInput {
|
|
2155
|
+
flowIdentifier: string;
|
|
2156
|
+
}
|
|
2157
|
+
export interface PrepareFlowCommandOutput {
|
|
2158
|
+
id: string;
|
|
2159
|
+
status: 'NotPrepared' | 'Preparing' | 'Prepared' | 'Failed';
|
|
2160
|
+
}
|
|
2161
|
+
export interface CreateFlowVersionCommandInput {
|
|
2162
|
+
flowIdentifier: string;
|
|
2163
|
+
description?: string;
|
|
2164
|
+
clientToken?: string;
|
|
2165
|
+
}
|
|
2166
|
+
export interface CreateFlowVersionCommandOutput {
|
|
2167
|
+
name: string;
|
|
2168
|
+
description?: string;
|
|
2169
|
+
executionRoleArn: string;
|
|
2170
|
+
customerEncryptionKeyArn?: string;
|
|
2171
|
+
id: string;
|
|
2172
|
+
arn: string;
|
|
2173
|
+
status: 'NotPrepared' | 'Preparing' | 'Prepared' | 'Failed';
|
|
2174
|
+
createdAt: string;
|
|
2175
|
+
version: string;
|
|
2176
|
+
definition?: {
|
|
2177
|
+
nodes?: FlowNode[];
|
|
2178
|
+
connections?: FlowConnection[];
|
|
2179
|
+
};
|
|
2180
|
+
}
|
|
2181
|
+
export interface CreateFlowAliasCommandInput {
|
|
2182
|
+
flowIdentifier: string;
|
|
2183
|
+
name: string;
|
|
2184
|
+
description?: string;
|
|
2185
|
+
routingConfiguration: Array<{
|
|
2186
|
+
flowVersion: string;
|
|
2187
|
+
}>;
|
|
2188
|
+
clientToken?: string;
|
|
2189
|
+
tags?: Record<string, string>;
|
|
2190
|
+
}
|
|
2191
|
+
export interface CreateFlowAliasCommandOutput {
|
|
2192
|
+
name: string;
|
|
2193
|
+
description?: string;
|
|
2194
|
+
routingConfiguration: Array<{
|
|
2195
|
+
flowVersion: string;
|
|
2196
|
+
}>;
|
|
2197
|
+
flowId: string;
|
|
2198
|
+
id: string;
|
|
2199
|
+
arn: string;
|
|
2200
|
+
createdAt: string;
|
|
2201
|
+
updatedAt: string;
|
|
2202
|
+
}
|
|
2203
|
+
export interface InvokeFlowCommandInput {
|
|
2204
|
+
flowIdentifier: string;
|
|
2205
|
+
flowAliasIdentifier: string;
|
|
2206
|
+
inputs: Array<{
|
|
2207
|
+
nodeName: string;
|
|
2208
|
+
nodeOutputName: string;
|
|
2209
|
+
content: {
|
|
2210
|
+
document?: unknown;
|
|
2211
|
+
};
|
|
2212
|
+
}>;
|
|
2213
|
+
}
|
|
2214
|
+
export interface InvokeFlowCommandOutput {
|
|
2215
|
+
responseStream: AsyncIterable<{
|
|
2216
|
+
flowOutputEvent?: {
|
|
2217
|
+
nodeName: string;
|
|
2218
|
+
nodeType: string;
|
|
2219
|
+
content: {
|
|
2220
|
+
document?: unknown;
|
|
2221
|
+
};
|
|
2222
|
+
};
|
|
2223
|
+
flowCompletionEvent?: {
|
|
2224
|
+
completionReason: 'SUCCESS';
|
|
2225
|
+
};
|
|
2226
|
+
}>;
|
|
2227
|
+
}
|
|
2228
|
+
export interface S3DataSourceConfiguration {
|
|
2229
|
+
bucketArn: string;
|
|
2230
|
+
inclusionPrefixes?: string[];
|
|
2231
|
+
bucketOwnerAccountId?: string;
|
|
2232
|
+
}
|
|
2233
|
+
export interface ConfluenceDataSourceConfiguration {
|
|
2234
|
+
sourceConfiguration: {
|
|
2235
|
+
hostUrl: string;
|
|
2236
|
+
hostType: 'SAAS';
|
|
2237
|
+
authType: 'BASIC' | 'OAUTH2_CLIENT_CREDENTIALS';
|
|
2238
|
+
credentialsSecretArn: string;
|
|
2239
|
+
};
|
|
2240
|
+
crawlerConfiguration?: {
|
|
2241
|
+
filterConfiguration?: {
|
|
2242
|
+
type: 'PATTERN';
|
|
2243
|
+
patternObjectFilter?: {
|
|
2244
|
+
filters: Array<{
|
|
2245
|
+
objectType: 'Attachment' | 'Blog' | 'Comment' | 'Page' | 'Space';
|
|
2246
|
+
inclusionFilters?: string[];
|
|
2247
|
+
exclusionFilters?: string[];
|
|
2248
|
+
}>;
|
|
2249
|
+
};
|
|
2250
|
+
};
|
|
2251
|
+
};
|
|
2252
|
+
}
|
|
2253
|
+
export interface SalesforceDataSourceConfiguration {
|
|
2254
|
+
sourceConfiguration: {
|
|
2255
|
+
hostUrl: string;
|
|
2256
|
+
authType: 'OAUTH2_CLIENT_CREDENTIALS';
|
|
2257
|
+
credentialsSecretArn: string;
|
|
2258
|
+
};
|
|
2259
|
+
crawlerConfiguration?: {
|
|
2260
|
+
filterConfiguration?: {
|
|
2261
|
+
type: 'PATTERN';
|
|
2262
|
+
patternObjectFilter?: {
|
|
2263
|
+
filters: Array<{
|
|
2264
|
+
objectType: 'Account' | 'Case' | 'Campaign' | 'Contact' | 'Contract' | 'Document' | 'Lead' | 'Opportunity' | 'Partner' | 'PricebookEntry' | 'Product2' | 'Solution' | 'Task';
|
|
2265
|
+
inclusionFilters?: string[];
|
|
2266
|
+
exclusionFilters?: string[];
|
|
2267
|
+
}>;
|
|
2268
|
+
};
|
|
2269
|
+
};
|
|
2270
|
+
};
|
|
2271
|
+
}
|
|
2272
|
+
export interface SharePointDataSourceConfiguration {
|
|
2273
|
+
sourceConfiguration: {
|
|
2274
|
+
siteUrls: string[];
|
|
2275
|
+
hostType: 'ONLINE';
|
|
2276
|
+
authType: 'OAUTH2_CLIENT_CREDENTIALS';
|
|
2277
|
+
credentialsSecretArn: string;
|
|
2278
|
+
tenantId?: string;
|
|
2279
|
+
domain: string;
|
|
2280
|
+
};
|
|
2281
|
+
crawlerConfiguration?: {
|
|
2282
|
+
filterConfiguration?: {
|
|
2283
|
+
type: 'PATTERN';
|
|
2284
|
+
patternObjectFilter?: {
|
|
2285
|
+
filters: Array<{
|
|
2286
|
+
objectType: 'Page' | 'File' | 'Event' | 'Attachment';
|
|
2287
|
+
inclusionFilters?: string[];
|
|
2288
|
+
exclusionFilters?: string[];
|
|
2289
|
+
}>;
|
|
2290
|
+
};
|
|
2291
|
+
};
|
|
2292
|
+
};
|
|
2293
|
+
}
|
|
2294
|
+
export interface WebDataSourceConfiguration {
|
|
2295
|
+
sourceConfiguration: {
|
|
2296
|
+
urlConfiguration: {
|
|
2297
|
+
seedUrls: Array<{
|
|
2298
|
+
url: string;
|
|
2299
|
+
}>;
|
|
2300
|
+
};
|
|
2301
|
+
};
|
|
2302
|
+
crawlerConfiguration?: {
|
|
2303
|
+
crawlerLimits?: {
|
|
2304
|
+
rateLimit?: number;
|
|
2305
|
+
};
|
|
2306
|
+
inclusionFilters?: string[];
|
|
2307
|
+
exclusionFilters?: string[];
|
|
2308
|
+
scope?: 'HOST_ONLY' | 'SUBDOMAINS';
|
|
2309
|
+
};
|
|
2310
|
+
}
|
|
2311
|
+
export interface CreateDataSourceCommandInput {
|
|
2312
|
+
knowledgeBaseId: string;
|
|
2313
|
+
clientToken?: string;
|
|
2314
|
+
name: string;
|
|
2315
|
+
description?: string;
|
|
2316
|
+
dataSourceConfiguration: {
|
|
2317
|
+
type: 'S3' | 'CONFLUENCE' | 'SALESFORCE' | 'SHAREPOINT' | 'WEB';
|
|
2318
|
+
s3Configuration?: S3DataSourceConfiguration;
|
|
2319
|
+
confluenceConfiguration?: ConfluenceDataSourceConfiguration;
|
|
2320
|
+
salesforceConfiguration?: SalesforceDataSourceConfiguration;
|
|
2321
|
+
sharePointConfiguration?: SharePointDataSourceConfiguration;
|
|
2322
|
+
webConfiguration?: WebDataSourceConfiguration;
|
|
2323
|
+
};
|
|
2324
|
+
dataDeletionPolicy?: 'RETAIN' | 'DELETE';
|
|
2325
|
+
serverSideEncryptionConfiguration?: {
|
|
2326
|
+
kmsKeyArn?: string;
|
|
2327
|
+
};
|
|
2328
|
+
vectorIngestionConfiguration?: {
|
|
2329
|
+
chunkingConfiguration?: {
|
|
2330
|
+
chunkingStrategy: 'FIXED_SIZE' | 'NONE' | 'HIERARCHICAL' | 'SEMANTIC';
|
|
2331
|
+
fixedSizeChunkingConfiguration?: {
|
|
2332
|
+
maxTokens: number;
|
|
2333
|
+
overlapPercentage: number;
|
|
2334
|
+
};
|
|
2335
|
+
hierarchicalChunkingConfiguration?: {
|
|
2336
|
+
levelConfigurations: Array<{
|
|
2337
|
+
maxTokens: number;
|
|
2338
|
+
}>;
|
|
2339
|
+
overlapTokens: number;
|
|
2340
|
+
};
|
|
2341
|
+
semanticChunkingConfiguration?: {
|
|
2342
|
+
maxTokens: number;
|
|
2343
|
+
bufferSize: number;
|
|
2344
|
+
breakpointPercentileThreshold: number;
|
|
2345
|
+
};
|
|
2346
|
+
};
|
|
2347
|
+
parsingConfiguration?: {
|
|
2348
|
+
parsingStrategy: 'BEDROCK_FOUNDATION_MODEL';
|
|
2349
|
+
bedrockFoundationModelConfiguration?: {
|
|
2350
|
+
modelArn: string;
|
|
2351
|
+
parsingPrompt?: {
|
|
2352
|
+
parsingPromptText: string;
|
|
2353
|
+
};
|
|
2354
|
+
};
|
|
2355
|
+
};
|
|
2356
|
+
customTransformationConfiguration?: {
|
|
2357
|
+
intermediateStorage: {
|
|
2358
|
+
s3Location: {
|
|
2359
|
+
uri: string;
|
|
2360
|
+
};
|
|
2361
|
+
};
|
|
2362
|
+
transformations: Array<{
|
|
2363
|
+
stepToApply: 'POST_CHUNKING';
|
|
2364
|
+
transformationFunction: {
|
|
2365
|
+
transformationLambdaConfiguration: {
|
|
2366
|
+
lambdaArn: string;
|
|
2367
|
+
};
|
|
2368
|
+
};
|
|
2369
|
+
}>;
|
|
2370
|
+
};
|
|
2371
|
+
};
|
|
2372
|
+
}
|
|
2373
|
+
export interface CreateDataSourceCommandOutput {
|
|
2374
|
+
dataSource: {
|
|
2375
|
+
knowledgeBaseId: string;
|
|
2376
|
+
dataSourceId: string;
|
|
2377
|
+
name: string;
|
|
2378
|
+
description?: string;
|
|
2379
|
+
status: 'AVAILABLE' | 'DELETING' | 'DELETE_UNSUCCESSFUL';
|
|
2380
|
+
dataSourceConfiguration: {
|
|
2381
|
+
type: string;
|
|
2382
|
+
s3Configuration?: S3DataSourceConfiguration;
|
|
2383
|
+
};
|
|
2384
|
+
dataDeletionPolicy?: string;
|
|
2385
|
+
serverSideEncryptionConfiguration?: {
|
|
2386
|
+
kmsKeyArn?: string;
|
|
2387
|
+
};
|
|
2388
|
+
vectorIngestionConfiguration?: {
|
|
2389
|
+
chunkingConfiguration?: {
|
|
2390
|
+
chunkingStrategy: string;
|
|
2391
|
+
};
|
|
2392
|
+
};
|
|
2393
|
+
createdAt: string;
|
|
2394
|
+
updatedAt: string;
|
|
2395
|
+
failureReasons?: string[];
|
|
2396
|
+
};
|
|
2397
|
+
}
|
|
2398
|
+
export interface GetDataSourceCommandInput {
|
|
2399
|
+
knowledgeBaseId: string;
|
|
2400
|
+
dataSourceId: string;
|
|
2401
|
+
}
|
|
2402
|
+
export interface GetDataSourceCommandOutput {
|
|
2403
|
+
dataSource: {
|
|
2404
|
+
knowledgeBaseId: string;
|
|
2405
|
+
dataSourceId: string;
|
|
2406
|
+
name: string;
|
|
2407
|
+
description?: string;
|
|
2408
|
+
status: 'AVAILABLE' | 'DELETING' | 'DELETE_UNSUCCESSFUL';
|
|
2409
|
+
dataSourceConfiguration: {
|
|
2410
|
+
type: string;
|
|
2411
|
+
s3Configuration?: S3DataSourceConfiguration;
|
|
2412
|
+
};
|
|
2413
|
+
dataDeletionPolicy?: string;
|
|
2414
|
+
serverSideEncryptionConfiguration?: {
|
|
2415
|
+
kmsKeyArn?: string;
|
|
2416
|
+
};
|
|
2417
|
+
vectorIngestionConfiguration?: {
|
|
2418
|
+
chunkingConfiguration?: {
|
|
2419
|
+
chunkingStrategy: string;
|
|
2420
|
+
};
|
|
2421
|
+
};
|
|
2422
|
+
createdAt: string;
|
|
2423
|
+
updatedAt: string;
|
|
2424
|
+
failureReasons?: string[];
|
|
2425
|
+
};
|
|
2426
|
+
}
|
|
2427
|
+
export interface ListDataSourcesCommandInput {
|
|
2428
|
+
knowledgeBaseId: string;
|
|
2429
|
+
maxResults?: number;
|
|
2430
|
+
nextToken?: string;
|
|
2431
|
+
}
|
|
2432
|
+
export interface ListDataSourcesCommandOutput {
|
|
2433
|
+
dataSourceSummaries: Array<{
|
|
2434
|
+
knowledgeBaseId: string;
|
|
2435
|
+
dataSourceId: string;
|
|
2436
|
+
name: string;
|
|
2437
|
+
description?: string;
|
|
2438
|
+
status: 'AVAILABLE' | 'DELETING' | 'DELETE_UNSUCCESSFUL';
|
|
2439
|
+
updatedAt: string;
|
|
2440
|
+
}>;
|
|
2441
|
+
nextToken?: string;
|
|
2442
|
+
}
|
|
2443
|
+
export interface UpdateDataSourceCommandInput {
|
|
2444
|
+
knowledgeBaseId: string;
|
|
2445
|
+
dataSourceId: string;
|
|
2446
|
+
name: string;
|
|
2447
|
+
description?: string;
|
|
2448
|
+
dataSourceConfiguration: {
|
|
2449
|
+
type: 'S3' | 'CONFLUENCE' | 'SALESFORCE' | 'SHAREPOINT' | 'WEB';
|
|
2450
|
+
s3Configuration?: S3DataSourceConfiguration;
|
|
2451
|
+
confluenceConfiguration?: ConfluenceDataSourceConfiguration;
|
|
2452
|
+
salesforceConfiguration?: SalesforceDataSourceConfiguration;
|
|
2453
|
+
sharePointConfiguration?: SharePointDataSourceConfiguration;
|
|
2454
|
+
webConfiguration?: WebDataSourceConfiguration;
|
|
2455
|
+
};
|
|
2456
|
+
dataDeletionPolicy?: 'RETAIN' | 'DELETE';
|
|
2457
|
+
serverSideEncryptionConfiguration?: {
|
|
2458
|
+
kmsKeyArn?: string;
|
|
2459
|
+
};
|
|
2460
|
+
vectorIngestionConfiguration?: {
|
|
2461
|
+
chunkingConfiguration?: {
|
|
2462
|
+
chunkingStrategy: 'FIXED_SIZE' | 'NONE' | 'HIERARCHICAL' | 'SEMANTIC';
|
|
2463
|
+
fixedSizeChunkingConfiguration?: {
|
|
2464
|
+
maxTokens: number;
|
|
2465
|
+
overlapPercentage: number;
|
|
2466
|
+
};
|
|
2467
|
+
};
|
|
2468
|
+
};
|
|
2469
|
+
}
|
|
2470
|
+
export interface UpdateDataSourceCommandOutput {
|
|
2471
|
+
dataSource: {
|
|
2472
|
+
knowledgeBaseId: string;
|
|
2473
|
+
dataSourceId: string;
|
|
2474
|
+
name: string;
|
|
2475
|
+
description?: string;
|
|
2476
|
+
status: 'AVAILABLE' | 'DELETING' | 'DELETE_UNSUCCESSFUL';
|
|
2477
|
+
dataSourceConfiguration: {
|
|
2478
|
+
type: string;
|
|
2479
|
+
s3Configuration?: S3DataSourceConfiguration;
|
|
2480
|
+
};
|
|
2481
|
+
dataDeletionPolicy?: string;
|
|
2482
|
+
serverSideEncryptionConfiguration?: {
|
|
2483
|
+
kmsKeyArn?: string;
|
|
2484
|
+
};
|
|
2485
|
+
vectorIngestionConfiguration?: {
|
|
2486
|
+
chunkingConfiguration?: {
|
|
2487
|
+
chunkingStrategy: string;
|
|
2488
|
+
};
|
|
2489
|
+
};
|
|
2490
|
+
createdAt: string;
|
|
2491
|
+
updatedAt: string;
|
|
2492
|
+
failureReasons?: string[];
|
|
2493
|
+
};
|
|
2494
|
+
}
|
|
2495
|
+
export interface DeleteDataSourceCommandInput {
|
|
2496
|
+
knowledgeBaseId: string;
|
|
2497
|
+
dataSourceId: string;
|
|
2498
|
+
}
|
|
2499
|
+
export interface DeleteDataSourceCommandOutput {
|
|
2500
|
+
knowledgeBaseId: string;
|
|
2501
|
+
dataSourceId: string;
|
|
2502
|
+
status: string;
|
|
2503
|
+
}
|
|
2504
|
+
export interface StartIngestionJobCommandInput {
|
|
2505
|
+
knowledgeBaseId: string;
|
|
2506
|
+
dataSourceId: string;
|
|
2507
|
+
clientToken?: string;
|
|
2508
|
+
description?: string;
|
|
2509
|
+
}
|
|
2510
|
+
export interface StartIngestionJobCommandOutput {
|
|
2511
|
+
ingestionJob: {
|
|
2512
|
+
knowledgeBaseId: string;
|
|
2513
|
+
dataSourceId: string;
|
|
2514
|
+
ingestionJobId: string;
|
|
2515
|
+
description?: string;
|
|
2516
|
+
status: 'STARTING' | 'IN_PROGRESS' | 'COMPLETE' | 'FAILED' | 'STOPPING' | 'STOPPED';
|
|
2517
|
+
statistics?: {
|
|
2518
|
+
numberOfDocumentsScanned?: number;
|
|
2519
|
+
numberOfNewDocumentsIndexed?: number;
|
|
2520
|
+
numberOfModifiedDocumentsIndexed?: number;
|
|
2521
|
+
numberOfDocumentsDeleted?: number;
|
|
2522
|
+
numberOfDocumentsFailed?: number;
|
|
2523
|
+
};
|
|
2524
|
+
failureReasons?: string[];
|
|
2525
|
+
startedAt: string;
|
|
2526
|
+
updatedAt: string;
|
|
2527
|
+
};
|
|
2528
|
+
}
|
|
2529
|
+
export interface GetIngestionJobCommandInput {
|
|
2530
|
+
knowledgeBaseId: string;
|
|
2531
|
+
dataSourceId: string;
|
|
2532
|
+
ingestionJobId: string;
|
|
2533
|
+
}
|
|
2534
|
+
export interface GetIngestionJobCommandOutput {
|
|
2535
|
+
ingestionJob: {
|
|
2536
|
+
knowledgeBaseId: string;
|
|
2537
|
+
dataSourceId: string;
|
|
2538
|
+
ingestionJobId: string;
|
|
2539
|
+
description?: string;
|
|
2540
|
+
status: 'STARTING' | 'IN_PROGRESS' | 'COMPLETE' | 'FAILED' | 'STOPPING' | 'STOPPED';
|
|
2541
|
+
statistics?: {
|
|
2542
|
+
numberOfDocumentsScanned?: number;
|
|
2543
|
+
numberOfNewDocumentsIndexed?: number;
|
|
2544
|
+
numberOfModifiedDocumentsIndexed?: number;
|
|
2545
|
+
numberOfDocumentsDeleted?: number;
|
|
2546
|
+
numberOfDocumentsFailed?: number;
|
|
2547
|
+
};
|
|
2548
|
+
failureReasons?: string[];
|
|
2549
|
+
startedAt: string;
|
|
2550
|
+
updatedAt: string;
|
|
2551
|
+
};
|
|
2552
|
+
}
|
|
2553
|
+
export interface ListIngestionJobsCommandInput {
|
|
2554
|
+
knowledgeBaseId: string;
|
|
2555
|
+
dataSourceId: string;
|
|
2556
|
+
filters?: Array<{
|
|
2557
|
+
attribute: 'STATUS';
|
|
2558
|
+
operator: 'EQ';
|
|
2559
|
+
values: string[];
|
|
2560
|
+
}>;
|
|
2561
|
+
sortBy?: {
|
|
2562
|
+
attribute: 'STARTED_AT' | 'STATUS';
|
|
2563
|
+
order: 'ASCENDING' | 'DESCENDING';
|
|
2564
|
+
};
|
|
2565
|
+
maxResults?: number;
|
|
2566
|
+
nextToken?: string;
|
|
2567
|
+
}
|
|
2568
|
+
export interface ListIngestionJobsCommandOutput {
|
|
2569
|
+
ingestionJobSummaries: Array<{
|
|
2570
|
+
knowledgeBaseId: string;
|
|
2571
|
+
dataSourceId: string;
|
|
2572
|
+
ingestionJobId: string;
|
|
2573
|
+
description?: string;
|
|
2574
|
+
status: 'STARTING' | 'IN_PROGRESS' | 'COMPLETE' | 'FAILED' | 'STOPPING' | 'STOPPED';
|
|
2575
|
+
startedAt: string;
|
|
2576
|
+
updatedAt: string;
|
|
2577
|
+
statistics?: {
|
|
2578
|
+
numberOfDocumentsScanned?: number;
|
|
2579
|
+
numberOfNewDocumentsIndexed?: number;
|
|
2580
|
+
numberOfModifiedDocumentsIndexed?: number;
|
|
2581
|
+
numberOfDocumentsDeleted?: number;
|
|
2582
|
+
numberOfDocumentsFailed?: number;
|
|
2583
|
+
};
|
|
2584
|
+
}>;
|
|
2585
|
+
nextToken?: string;
|
|
2586
|
+
}
|
|
2587
|
+
export interface CreateModelCopyJobCommandInput {
|
|
2588
|
+
sourceModelArn: string;
|
|
2589
|
+
targetModelName: string;
|
|
2590
|
+
modelKmsKeyId?: string;
|
|
2591
|
+
targetModelTags?: Array<{
|
|
2592
|
+
key: string;
|
|
2593
|
+
value: string;
|
|
2594
|
+
}>;
|
|
2595
|
+
clientRequestToken?: string;
|
|
2596
|
+
}
|
|
2597
|
+
export interface CreateModelCopyJobCommandOutput {
|
|
2598
|
+
jobArn: string;
|
|
2599
|
+
}
|
|
2600
|
+
export interface GetModelCopyJobCommandInput {
|
|
2601
|
+
jobArn: string;
|
|
2602
|
+
}
|
|
2603
|
+
export interface GetModelCopyJobCommandOutput {
|
|
2604
|
+
jobArn: string;
|
|
2605
|
+
status: 'InProgress' | 'Completed' | 'Failed';
|
|
2606
|
+
creationTime: string;
|
|
2607
|
+
targetModelArn?: string;
|
|
2608
|
+
targetModelName: string;
|
|
2609
|
+
sourceAccountId: string;
|
|
2610
|
+
sourceModelArn: string;
|
|
2611
|
+
targetModelKmsKeyArn?: string;
|
|
2612
|
+
targetModelTags?: Array<{
|
|
2613
|
+
key: string;
|
|
2614
|
+
value: string;
|
|
2615
|
+
}>;
|
|
2616
|
+
failureMessage?: string;
|
|
2617
|
+
}
|
|
2618
|
+
export interface ListModelCopyJobsCommandInput {
|
|
2619
|
+
creationTimeAfter?: string;
|
|
2620
|
+
creationTimeBefore?: string;
|
|
2621
|
+
statusEquals?: 'InProgress' | 'Completed' | 'Failed';
|
|
2622
|
+
sourceAccountEquals?: string;
|
|
2623
|
+
sourceModelArnEquals?: string;
|
|
2624
|
+
targetModelNameContains?: string;
|
|
2625
|
+
maxResults?: number;
|
|
2626
|
+
nextToken?: string;
|
|
2627
|
+
sortBy?: 'CreationTime';
|
|
2628
|
+
sortOrder?: 'Ascending' | 'Descending';
|
|
2629
|
+
}
|
|
2630
|
+
export interface ListModelCopyJobsCommandOutput {
|
|
2631
|
+
nextToken?: string;
|
|
2632
|
+
modelCopyJobSummaries?: Array<{
|
|
2633
|
+
jobArn: string;
|
|
2634
|
+
status: 'InProgress' | 'Completed' | 'Failed';
|
|
2635
|
+
creationTime: string;
|
|
2636
|
+
targetModelArn?: string;
|
|
2637
|
+
targetModelName: string;
|
|
2638
|
+
sourceAccountId: string;
|
|
2639
|
+
sourceModelArn: string;
|
|
2640
|
+
targetModelKmsKeyArn?: string;
|
|
2641
|
+
failureMessage?: string;
|
|
2642
|
+
}>;
|
|
2643
|
+
}
|
|
2644
|
+
/**
|
|
2645
|
+
* Request access to multiple Bedrock models
|
|
2646
|
+
* Convenience function matching the pattern from the user's example
|
|
2647
|
+
*/
|
|
2648
|
+
export declare function requestModelAccess(models: string[], region?: string): Promise<Array<{
|
|
2649
|
+
modelId: string;
|
|
2650
|
+
status: string;
|
|
2651
|
+
error?: string;
|
|
2652
|
+
}>>;
|
|
2653
|
+
/**
|
|
2654
|
+
* List all available Claude models in the region
|
|
2655
|
+
*/
|
|
2656
|
+
export declare function listClaudeModels(region?: string): Promise<FoundationModelSummary[]>;
|
|
2657
|
+
/**
|
|
2658
|
+
* Create a simple text completion using Claude
|
|
2659
|
+
*/
|
|
2660
|
+
export declare function completeWithClaude(prompt: string, options?: {
|
|
2661
|
+
modelId?: string;
|
|
2662
|
+
maxTokens?: number;
|
|
2663
|
+
temperature?: number;
|
|
2664
|
+
region?: string;
|
|
2665
|
+
}): Promise<string>;
|
|
2666
|
+
/**
|
|
2667
|
+
* Generate embeddings for text
|
|
2668
|
+
*/
|
|
2669
|
+
export declare function generateEmbeddings(text: string | string[], options?: {
|
|
2670
|
+
modelId?: string;
|
|
2671
|
+
region?: string;
|
|
2672
|
+
}): Promise<number[] | number[][]>;
|