@aws-sdk/client-bedrock 3.758.0 → 3.772.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ import { CreateModelCopyJobCommand, } from "./commands/CreateModelCopyJobCommand
10
10
  import { CreateModelCustomizationJobCommand, } from "./commands/CreateModelCustomizationJobCommand";
11
11
  import { CreateModelImportJobCommand, } from "./commands/CreateModelImportJobCommand";
12
12
  import { CreateModelInvocationJobCommand, } from "./commands/CreateModelInvocationJobCommand";
13
+ import { CreatePromptRouterCommand, } from "./commands/CreatePromptRouterCommand";
13
14
  import { CreateProvisionedModelThroughputCommand, } from "./commands/CreateProvisionedModelThroughputCommand";
14
15
  import { DeleteCustomModelCommand, } from "./commands/DeleteCustomModelCommand";
15
16
  import { DeleteGuardrailCommand, } from "./commands/DeleteGuardrailCommand";
@@ -17,6 +18,7 @@ import { DeleteImportedModelCommand, } from "./commands/DeleteImportedModelComma
17
18
  import { DeleteInferenceProfileCommand, } from "./commands/DeleteInferenceProfileCommand";
18
19
  import { DeleteMarketplaceModelEndpointCommand, } from "./commands/DeleteMarketplaceModelEndpointCommand";
19
20
  import { DeleteModelInvocationLoggingConfigurationCommand, } from "./commands/DeleteModelInvocationLoggingConfigurationCommand";
21
+ import { DeletePromptRouterCommand, } from "./commands/DeletePromptRouterCommand";
20
22
  import { DeleteProvisionedModelThroughputCommand, } from "./commands/DeleteProvisionedModelThroughputCommand";
21
23
  import { DeregisterMarketplaceModelEndpointCommand, } from "./commands/DeregisterMarketplaceModelEndpointCommand";
22
24
  import { GetCustomModelCommand, } from "./commands/GetCustomModelCommand";
@@ -68,6 +70,7 @@ const commands = {
68
70
  CreateModelCustomizationJobCommand,
69
71
  CreateModelImportJobCommand,
70
72
  CreateModelInvocationJobCommand,
73
+ CreatePromptRouterCommand,
71
74
  CreateProvisionedModelThroughputCommand,
72
75
  DeleteCustomModelCommand,
73
76
  DeleteGuardrailCommand,
@@ -75,6 +78,7 @@ const commands = {
75
78
  DeleteInferenceProfileCommand,
76
79
  DeleteMarketplaceModelEndpointCommand,
77
80
  DeleteModelInvocationLoggingConfigurationCommand,
81
+ DeletePromptRouterCommand,
78
82
  DeleteProvisionedModelThroughputCommand,
79
83
  DeregisterMarketplaceModelEndpointCommand,
80
84
  GetCustomModelCommand,
@@ -0,0 +1,23 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { CreatePromptRouterRequestFilterSensitiveLog, } from "../models/models_0";
6
+ import { de_CreatePromptRouterCommand, se_CreatePromptRouterCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class CreatePromptRouterCommand extends $Command
9
+ .classBuilder()
10
+ .ep(commonParams)
11
+ .m(function (Command, cs, config, o) {
12
+ return [
13
+ getSerdePlugin(config, this.serialize, this.deserialize),
14
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
15
+ ];
16
+ })
17
+ .s("AmazonBedrockControlPlaneService", "CreatePromptRouter", {})
18
+ .n("BedrockClient", "CreatePromptRouterCommand")
19
+ .f(CreatePromptRouterRequestFilterSensitiveLog, void 0)
20
+ .ser(se_CreatePromptRouterCommand)
21
+ .de(de_CreatePromptRouterCommand)
22
+ .build() {
23
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_DeletePromptRouterCommand, se_DeletePromptRouterCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DeletePromptRouterCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("AmazonBedrockControlPlaneService", "DeletePromptRouter", {})
17
+ .n("BedrockClient", "DeletePromptRouterCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_DeletePromptRouterCommand)
20
+ .de(de_DeletePromptRouterCommand)
21
+ .build() {
22
+ }
@@ -8,6 +8,7 @@ export * from "./CreateModelCopyJobCommand";
8
8
  export * from "./CreateModelCustomizationJobCommand";
9
9
  export * from "./CreateModelImportJobCommand";
10
10
  export * from "./CreateModelInvocationJobCommand";
11
+ export * from "./CreatePromptRouterCommand";
11
12
  export * from "./CreateProvisionedModelThroughputCommand";
12
13
  export * from "./DeleteCustomModelCommand";
13
14
  export * from "./DeleteGuardrailCommand";
@@ -15,6 +16,7 @@ export * from "./DeleteImportedModelCommand";
15
16
  export * from "./DeleteInferenceProfileCommand";
16
17
  export * from "./DeleteMarketplaceModelEndpointCommand";
17
18
  export * from "./DeleteModelInvocationLoggingConfigurationCommand";
19
+ export * from "./DeletePromptRouterCommand";
18
20
  export * from "./DeleteProvisionedModelThroughputCommand";
19
21
  export * from "./DeregisterMarketplaceModelEndpointCommand";
20
22
  export * from "./GetCustomModelCommand";
@@ -162,6 +162,8 @@ export var EvaluationModelConfig;
162
162
  EvaluationModelConfig.visit = (value, visitor) => {
163
163
  if (value.bedrockModel !== undefined)
164
164
  return visitor.bedrockModel(value.bedrockModel);
165
+ if (value.precomputedInferenceSource !== undefined)
166
+ return visitor.precomputedInferenceSource(value.precomputedInferenceSource);
165
167
  return visitor._(value.$unknown[0], value.$unknown[1]);
166
168
  };
167
169
  })(EvaluationModelConfig || (EvaluationModelConfig = {}));
@@ -180,6 +182,16 @@ export const RetrieveAndGenerateType = {
180
182
  EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
181
183
  KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
182
184
  };
185
+ export var EvaluationPrecomputedRagSourceConfig;
186
+ (function (EvaluationPrecomputedRagSourceConfig) {
187
+ EvaluationPrecomputedRagSourceConfig.visit = (value, visitor) => {
188
+ if (value.retrieveSourceConfig !== undefined)
189
+ return visitor.retrieveSourceConfig(value.retrieveSourceConfig);
190
+ if (value.retrieveAndGenerateSourceConfig !== undefined)
191
+ return visitor.retrieveAndGenerateSourceConfig(value.retrieveAndGenerateSourceConfig);
192
+ return visitor._(value.$unknown[0], value.$unknown[1]);
193
+ };
194
+ })(EvaluationPrecomputedRagSourceConfig || (EvaluationPrecomputedRagSourceConfig = {}));
183
195
  export const EvaluationJobType = {
184
196
  AUTOMATED: "Automated",
185
197
  HUMAN: "Human",
@@ -479,6 +491,8 @@ export var RAGConfig;
479
491
  RAGConfig.visit = (value, visitor) => {
480
492
  if (value.knowledgeBaseConfig !== undefined)
481
493
  return visitor.knowledgeBaseConfig(value.knowledgeBaseConfig);
494
+ if (value.precomputedRagSourceConfig !== undefined)
495
+ return visitor.precomputedRagSourceConfig(value.precomputedRagSourceConfig);
482
496
  return visitor._(value.$unknown[0], value.$unknown[1]);
483
497
  };
484
498
  })(RAGConfig || (RAGConfig = {}));
@@ -564,6 +578,8 @@ export const EvaluationBedrockModelFilterSensitiveLog = (obj) => ({
564
578
  export const EvaluationModelConfigFilterSensitiveLog = (obj) => {
565
579
  if (obj.bedrockModel !== undefined)
566
580
  return { bedrockModel: EvaluationBedrockModelFilterSensitiveLog(obj.bedrockModel) };
581
+ if (obj.precomputedInferenceSource !== undefined)
582
+ return { precomputedInferenceSource: obj.precomputedInferenceSource };
567
583
  if (obj.$unknown !== undefined)
568
584
  return { [obj.$unknown[0]]: "UNKNOWN" };
569
585
  };
@@ -767,6 +783,10 @@ export const GetCustomModelResponseFilterSensitiveLog = (obj) => ({
767
783
  ...(obj.trainingDataConfig && { trainingDataConfig: TrainingDataConfigFilterSensitiveLog(obj.trainingDataConfig) }),
768
784
  ...(obj.customizationConfig && { customizationConfig: obj.customizationConfig }),
769
785
  });
786
+ export const CreatePromptRouterRequestFilterSensitiveLog = (obj) => ({
787
+ ...obj,
788
+ ...(obj.description && { description: SENSITIVE_STRING }),
789
+ });
770
790
  export const GetPromptRouterResponseFilterSensitiveLog = (obj) => ({
771
791
  ...obj,
772
792
  ...(obj.description && { description: SENSITIVE_STRING }),
@@ -868,6 +888,8 @@ export const KnowledgeBaseConfigFilterSensitiveLog = (obj) => {
868
888
  export const RAGConfigFilterSensitiveLog = (obj) => {
869
889
  if (obj.knowledgeBaseConfig !== undefined)
870
890
  return { knowledgeBaseConfig: KnowledgeBaseConfigFilterSensitiveLog(obj.knowledgeBaseConfig) };
891
+ if (obj.precomputedRagSourceConfig !== undefined)
892
+ return { precomputedRagSourceConfig: obj.precomputedRagSourceConfig };
871
893
  if (obj.$unknown !== undefined)
872
894
  return { [obj.$unknown[0]]: "UNKNOWN" };
873
895
  };
@@ -199,6 +199,25 @@ export const se_CreateModelInvocationJobCommand = async (input, context) => {
199
199
  b.m("POST").h(headers).b(body);
200
200
  return b.build();
201
201
  };
202
+ export const se_CreatePromptRouterCommand = async (input, context) => {
203
+ const b = rb(input, context);
204
+ const headers = {
205
+ "content-type": "application/json",
206
+ };
207
+ b.bp("/prompt-routers");
208
+ let body;
209
+ body = JSON.stringify(take(input, {
210
+ clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
211
+ description: [],
212
+ fallbackModel: (_) => _json(_),
213
+ models: (_) => _json(_),
214
+ promptRouterName: [],
215
+ routingCriteria: (_) => se_RoutingCriteria(_, context),
216
+ tags: (_) => _json(_),
217
+ }));
218
+ b.m("POST").h(headers).b(body);
219
+ return b.build();
220
+ };
202
221
  export const se_CreateProvisionedModelThroughputCommand = async (input, context) => {
203
222
  const b = rb(input, context);
204
223
  const headers = {
@@ -273,6 +292,15 @@ export const se_DeleteModelInvocationLoggingConfigurationCommand = async (input,
273
292
  b.m("DELETE").h(headers).b(body);
274
293
  return b.build();
275
294
  };
295
+ export const se_DeletePromptRouterCommand = async (input, context) => {
296
+ const b = rb(input, context);
297
+ const headers = {};
298
+ b.bp("/prompt-routers/{promptRouterArn}");
299
+ b.p("promptRouterArn", () => input.promptRouterArn, "{promptRouterArn}", false);
300
+ let body;
301
+ b.m("DELETE").h(headers).b(body);
302
+ return b.build();
303
+ };
276
304
  export const se_DeleteProvisionedModelThroughputCommand = async (input, context) => {
277
305
  const b = rb(input, context);
278
306
  const headers = {};
@@ -609,6 +637,7 @@ export const se_ListPromptRoutersCommand = async (input, context) => {
609
637
  const query = map({
610
638
  [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
611
639
  [_nT]: [, input[_nT]],
640
+ [_t]: [, input[_t]],
612
641
  });
613
642
  let body;
614
643
  b.m("GET").h(headers).q(query).b(body);
@@ -927,6 +956,20 @@ export const de_CreateModelInvocationJobCommand = async (output, context) => {
927
956
  Object.assign(contents, doc);
928
957
  return contents;
929
958
  };
959
+ export const de_CreatePromptRouterCommand = async (output, context) => {
960
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
961
+ return de_CommandError(output, context);
962
+ }
963
+ const contents = map({
964
+ $metadata: deserializeMetadata(output),
965
+ });
966
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
967
+ const doc = take(data, {
968
+ promptRouterArn: __expectString,
969
+ });
970
+ Object.assign(contents, doc);
971
+ return contents;
972
+ };
930
973
  export const de_CreateProvisionedModelThroughputCommand = async (output, context) => {
931
974
  if (output.statusCode !== 201 && output.statusCode >= 300) {
932
975
  return de_CommandError(output, context);
@@ -1001,6 +1044,16 @@ export const de_DeleteModelInvocationLoggingConfigurationCommand = async (output
1001
1044
  await collectBody(output.body, context);
1002
1045
  return contents;
1003
1046
  };
1047
+ export const de_DeletePromptRouterCommand = async (output, context) => {
1048
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1049
+ return de_CommandError(output, context);
1050
+ }
1051
+ const contents = map({
1052
+ $metadata: deserializeMetadata(output),
1053
+ });
1054
+ await collectBody(output.body, context);
1055
+ return contents;
1056
+ };
1004
1057
  export const de_DeleteProvisionedModelThroughputCommand = async (output, context) => {
1005
1058
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1006
1059
  return de_CommandError(output, context);
@@ -1968,6 +2021,7 @@ const se_KnowledgeBaseVectorSearchConfiguration = (input, context) => {
1968
2021
  const se_RAGConfig = (input, context) => {
1969
2022
  return RAGConfig.visit(input, {
1970
2023
  knowledgeBaseConfig: (value) => ({ knowledgeBaseConfig: se_KnowledgeBaseConfig(value, context) }),
2024
+ precomputedRagSourceConfig: (value) => ({ precomputedRagSourceConfig: _json(value) }),
1971
2025
  _: (name, value) => ({ [name]: value }),
1972
2026
  });
1973
2027
  };
@@ -2016,6 +2070,11 @@ const se_RetrieveConfig = (input, context) => {
2016
2070
  knowledgeBaseRetrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
2017
2071
  });
2018
2072
  };
2073
+ const se_RoutingCriteria = (input, context) => {
2074
+ return take(input, {
2075
+ responseQualityDifference: __serializeFloat,
2076
+ });
2077
+ };
2019
2078
  const se_TextInferenceConfig = (input, context) => {
2020
2079
  return take(input, {
2021
2080
  maxTokens: [],
@@ -2089,6 +2148,7 @@ const de_EvaluationSummary = (output, context) => {
2089
2148
  creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2090
2149
  evaluationTaskTypes: _json,
2091
2150
  evaluatorModelIdentifiers: _json,
2151
+ inferenceConfigSummary: _json,
2092
2152
  jobArn: __expectString,
2093
2153
  jobName: __expectString,
2094
2154
  jobType: __expectString,
@@ -2435,6 +2495,11 @@ const de_RAGConfig = (output, context) => {
2435
2495
  knowledgeBaseConfig: de_KnowledgeBaseConfig(__expectUnion(output.knowledgeBaseConfig), context),
2436
2496
  };
2437
2497
  }
2498
+ if (output.precomputedRagSourceConfig != null) {
2499
+ return {
2500
+ precomputedRagSourceConfig: _json(__expectUnion(output.precomputedRagSourceConfig)),
2501
+ };
2502
+ }
2438
2503
  return { $unknown: Object.entries(output)[0] };
2439
2504
  };
2440
2505
  const de_RagConfigs = (output, context) => {
@@ -10,6 +10,7 @@ import { CreateModelCopyJobCommandInput, CreateModelCopyJobCommandOutput } from
10
10
  import { CreateModelCustomizationJobCommandInput, CreateModelCustomizationJobCommandOutput } from "./commands/CreateModelCustomizationJobCommand";
11
11
  import { CreateModelImportJobCommandInput, CreateModelImportJobCommandOutput } from "./commands/CreateModelImportJobCommand";
12
12
  import { CreateModelInvocationJobCommandInput, CreateModelInvocationJobCommandOutput } from "./commands/CreateModelInvocationJobCommand";
13
+ import { CreatePromptRouterCommandInput, CreatePromptRouterCommandOutput } from "./commands/CreatePromptRouterCommand";
13
14
  import { CreateProvisionedModelThroughputCommandInput, CreateProvisionedModelThroughputCommandOutput } from "./commands/CreateProvisionedModelThroughputCommand";
14
15
  import { DeleteCustomModelCommandInput, DeleteCustomModelCommandOutput } from "./commands/DeleteCustomModelCommand";
15
16
  import { DeleteGuardrailCommandInput, DeleteGuardrailCommandOutput } from "./commands/DeleteGuardrailCommand";
@@ -17,6 +18,7 @@ import { DeleteImportedModelCommandInput, DeleteImportedModelCommandOutput } fro
17
18
  import { DeleteInferenceProfileCommandInput, DeleteInferenceProfileCommandOutput } from "./commands/DeleteInferenceProfileCommand";
18
19
  import { DeleteMarketplaceModelEndpointCommandInput, DeleteMarketplaceModelEndpointCommandOutput } from "./commands/DeleteMarketplaceModelEndpointCommand";
19
20
  import { DeleteModelInvocationLoggingConfigurationCommandInput, DeleteModelInvocationLoggingConfigurationCommandOutput } from "./commands/DeleteModelInvocationLoggingConfigurationCommand";
21
+ import { DeletePromptRouterCommandInput, DeletePromptRouterCommandOutput } from "./commands/DeletePromptRouterCommand";
20
22
  import { DeleteProvisionedModelThroughputCommandInput, DeleteProvisionedModelThroughputCommandOutput } from "./commands/DeleteProvisionedModelThroughputCommand";
21
23
  import { DeregisterMarketplaceModelEndpointCommandInput, DeregisterMarketplaceModelEndpointCommandOutput } from "./commands/DeregisterMarketplaceModelEndpointCommand";
22
24
  import { GetCustomModelCommandInput, GetCustomModelCommandOutput } from "./commands/GetCustomModelCommand";
@@ -118,6 +120,12 @@ export interface Bedrock {
118
120
  createModelInvocationJob(args: CreateModelInvocationJobCommandInput, options?: __HttpHandlerOptions): Promise<CreateModelInvocationJobCommandOutput>;
119
121
  createModelInvocationJob(args: CreateModelInvocationJobCommandInput, cb: (err: any, data?: CreateModelInvocationJobCommandOutput) => void): void;
120
122
  createModelInvocationJob(args: CreateModelInvocationJobCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateModelInvocationJobCommandOutput) => void): void;
123
+ /**
124
+ * @see {@link CreatePromptRouterCommand}
125
+ */
126
+ createPromptRouter(args: CreatePromptRouterCommandInput, options?: __HttpHandlerOptions): Promise<CreatePromptRouterCommandOutput>;
127
+ createPromptRouter(args: CreatePromptRouterCommandInput, cb: (err: any, data?: CreatePromptRouterCommandOutput) => void): void;
128
+ createPromptRouter(args: CreatePromptRouterCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreatePromptRouterCommandOutput) => void): void;
121
129
  /**
122
130
  * @see {@link CreateProvisionedModelThroughputCommand}
123
131
  */
@@ -161,6 +169,12 @@ export interface Bedrock {
161
169
  deleteModelInvocationLoggingConfiguration(args: DeleteModelInvocationLoggingConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<DeleteModelInvocationLoggingConfigurationCommandOutput>;
162
170
  deleteModelInvocationLoggingConfiguration(args: DeleteModelInvocationLoggingConfigurationCommandInput, cb: (err: any, data?: DeleteModelInvocationLoggingConfigurationCommandOutput) => void): void;
163
171
  deleteModelInvocationLoggingConfiguration(args: DeleteModelInvocationLoggingConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteModelInvocationLoggingConfigurationCommandOutput) => void): void;
172
+ /**
173
+ * @see {@link DeletePromptRouterCommand}
174
+ */
175
+ deletePromptRouter(args: DeletePromptRouterCommandInput, options?: __HttpHandlerOptions): Promise<DeletePromptRouterCommandOutput>;
176
+ deletePromptRouter(args: DeletePromptRouterCommandInput, cb: (err: any, data?: DeletePromptRouterCommandOutput) => void): void;
177
+ deletePromptRouter(args: DeletePromptRouterCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeletePromptRouterCommandOutput) => void): void;
164
178
  /**
165
179
  * @see {@link DeleteProvisionedModelThroughputCommand}
166
180
  */
@@ -17,6 +17,7 @@ import { CreateModelCopyJobCommandInput, CreateModelCopyJobCommandOutput } from
17
17
  import { CreateModelCustomizationJobCommandInput, CreateModelCustomizationJobCommandOutput } from "./commands/CreateModelCustomizationJobCommand";
18
18
  import { CreateModelImportJobCommandInput, CreateModelImportJobCommandOutput } from "./commands/CreateModelImportJobCommand";
19
19
  import { CreateModelInvocationJobCommandInput, CreateModelInvocationJobCommandOutput } from "./commands/CreateModelInvocationJobCommand";
20
+ import { CreatePromptRouterCommandInput, CreatePromptRouterCommandOutput } from "./commands/CreatePromptRouterCommand";
20
21
  import { CreateProvisionedModelThroughputCommandInput, CreateProvisionedModelThroughputCommandOutput } from "./commands/CreateProvisionedModelThroughputCommand";
21
22
  import { DeleteCustomModelCommandInput, DeleteCustomModelCommandOutput } from "./commands/DeleteCustomModelCommand";
22
23
  import { DeleteGuardrailCommandInput, DeleteGuardrailCommandOutput } from "./commands/DeleteGuardrailCommand";
@@ -24,6 +25,7 @@ import { DeleteImportedModelCommandInput, DeleteImportedModelCommandOutput } fro
24
25
  import { DeleteInferenceProfileCommandInput, DeleteInferenceProfileCommandOutput } from "./commands/DeleteInferenceProfileCommand";
25
26
  import { DeleteMarketplaceModelEndpointCommandInput, DeleteMarketplaceModelEndpointCommandOutput } from "./commands/DeleteMarketplaceModelEndpointCommand";
26
27
  import { DeleteModelInvocationLoggingConfigurationCommandInput, DeleteModelInvocationLoggingConfigurationCommandOutput } from "./commands/DeleteModelInvocationLoggingConfigurationCommand";
28
+ import { DeletePromptRouterCommandInput, DeletePromptRouterCommandOutput } from "./commands/DeletePromptRouterCommand";
27
29
  import { DeleteProvisionedModelThroughputCommandInput, DeleteProvisionedModelThroughputCommandOutput } from "./commands/DeleteProvisionedModelThroughputCommand";
28
30
  import { DeregisterMarketplaceModelEndpointCommandInput, DeregisterMarketplaceModelEndpointCommandOutput } from "./commands/DeregisterMarketplaceModelEndpointCommand";
29
31
  import { GetCustomModelCommandInput, GetCustomModelCommandOutput } from "./commands/GetCustomModelCommand";
@@ -70,11 +72,11 @@ export { __Client };
70
72
  /**
71
73
  * @public
72
74
  */
73
- export type ServiceInputTypes = BatchDeleteEvaluationJobCommandInput | CreateEvaluationJobCommandInput | CreateGuardrailCommandInput | CreateGuardrailVersionCommandInput | CreateInferenceProfileCommandInput | CreateMarketplaceModelEndpointCommandInput | CreateModelCopyJobCommandInput | CreateModelCustomizationJobCommandInput | CreateModelImportJobCommandInput | CreateModelInvocationJobCommandInput | CreateProvisionedModelThroughputCommandInput | DeleteCustomModelCommandInput | DeleteGuardrailCommandInput | DeleteImportedModelCommandInput | DeleteInferenceProfileCommandInput | DeleteMarketplaceModelEndpointCommandInput | DeleteModelInvocationLoggingConfigurationCommandInput | DeleteProvisionedModelThroughputCommandInput | DeregisterMarketplaceModelEndpointCommandInput | GetCustomModelCommandInput | GetEvaluationJobCommandInput | GetFoundationModelCommandInput | GetGuardrailCommandInput | GetImportedModelCommandInput | GetInferenceProfileCommandInput | GetMarketplaceModelEndpointCommandInput | GetModelCopyJobCommandInput | GetModelCustomizationJobCommandInput | GetModelImportJobCommandInput | GetModelInvocationJobCommandInput | GetModelInvocationLoggingConfigurationCommandInput | GetPromptRouterCommandInput | GetProvisionedModelThroughputCommandInput | ListCustomModelsCommandInput | ListEvaluationJobsCommandInput | ListFoundationModelsCommandInput | ListGuardrailsCommandInput | ListImportedModelsCommandInput | ListInferenceProfilesCommandInput | ListMarketplaceModelEndpointsCommandInput | ListModelCopyJobsCommandInput | ListModelCustomizationJobsCommandInput | ListModelImportJobsCommandInput | ListModelInvocationJobsCommandInput | ListPromptRoutersCommandInput | ListProvisionedModelThroughputsCommandInput | ListTagsForResourceCommandInput | PutModelInvocationLoggingConfigurationCommandInput | RegisterMarketplaceModelEndpointCommandInput | StopEvaluationJobCommandInput | StopModelCustomizationJobCommandInput | StopModelInvocationJobCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateGuardrailCommandInput | UpdateMarketplaceModelEndpointCommandInput | UpdateProvisionedModelThroughputCommandInput;
75
+ export type ServiceInputTypes = BatchDeleteEvaluationJobCommandInput | CreateEvaluationJobCommandInput | CreateGuardrailCommandInput | CreateGuardrailVersionCommandInput | CreateInferenceProfileCommandInput | CreateMarketplaceModelEndpointCommandInput | CreateModelCopyJobCommandInput | CreateModelCustomizationJobCommandInput | CreateModelImportJobCommandInput | CreateModelInvocationJobCommandInput | CreatePromptRouterCommandInput | CreateProvisionedModelThroughputCommandInput | DeleteCustomModelCommandInput | DeleteGuardrailCommandInput | DeleteImportedModelCommandInput | DeleteInferenceProfileCommandInput | DeleteMarketplaceModelEndpointCommandInput | DeleteModelInvocationLoggingConfigurationCommandInput | DeletePromptRouterCommandInput | DeleteProvisionedModelThroughputCommandInput | DeregisterMarketplaceModelEndpointCommandInput | GetCustomModelCommandInput | GetEvaluationJobCommandInput | GetFoundationModelCommandInput | GetGuardrailCommandInput | GetImportedModelCommandInput | GetInferenceProfileCommandInput | GetMarketplaceModelEndpointCommandInput | GetModelCopyJobCommandInput | GetModelCustomizationJobCommandInput | GetModelImportJobCommandInput | GetModelInvocationJobCommandInput | GetModelInvocationLoggingConfigurationCommandInput | GetPromptRouterCommandInput | GetProvisionedModelThroughputCommandInput | ListCustomModelsCommandInput | ListEvaluationJobsCommandInput | ListFoundationModelsCommandInput | ListGuardrailsCommandInput | ListImportedModelsCommandInput | ListInferenceProfilesCommandInput | ListMarketplaceModelEndpointsCommandInput | ListModelCopyJobsCommandInput | ListModelCustomizationJobsCommandInput | ListModelImportJobsCommandInput | ListModelInvocationJobsCommandInput | ListPromptRoutersCommandInput | ListProvisionedModelThroughputsCommandInput | ListTagsForResourceCommandInput | PutModelInvocationLoggingConfigurationCommandInput | RegisterMarketplaceModelEndpointCommandInput | StopEvaluationJobCommandInput | StopModelCustomizationJobCommandInput | StopModelInvocationJobCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateGuardrailCommandInput | UpdateMarketplaceModelEndpointCommandInput | UpdateProvisionedModelThroughputCommandInput;
74
76
  /**
75
77
  * @public
76
78
  */
77
- export type ServiceOutputTypes = BatchDeleteEvaluationJobCommandOutput | CreateEvaluationJobCommandOutput | CreateGuardrailCommandOutput | CreateGuardrailVersionCommandOutput | CreateInferenceProfileCommandOutput | CreateMarketplaceModelEndpointCommandOutput | CreateModelCopyJobCommandOutput | CreateModelCustomizationJobCommandOutput | CreateModelImportJobCommandOutput | CreateModelInvocationJobCommandOutput | CreateProvisionedModelThroughputCommandOutput | DeleteCustomModelCommandOutput | DeleteGuardrailCommandOutput | DeleteImportedModelCommandOutput | DeleteInferenceProfileCommandOutput | DeleteMarketplaceModelEndpointCommandOutput | DeleteModelInvocationLoggingConfigurationCommandOutput | DeleteProvisionedModelThroughputCommandOutput | DeregisterMarketplaceModelEndpointCommandOutput | GetCustomModelCommandOutput | GetEvaluationJobCommandOutput | GetFoundationModelCommandOutput | GetGuardrailCommandOutput | GetImportedModelCommandOutput | GetInferenceProfileCommandOutput | GetMarketplaceModelEndpointCommandOutput | GetModelCopyJobCommandOutput | GetModelCustomizationJobCommandOutput | GetModelImportJobCommandOutput | GetModelInvocationJobCommandOutput | GetModelInvocationLoggingConfigurationCommandOutput | GetPromptRouterCommandOutput | GetProvisionedModelThroughputCommandOutput | ListCustomModelsCommandOutput | ListEvaluationJobsCommandOutput | ListFoundationModelsCommandOutput | ListGuardrailsCommandOutput | ListImportedModelsCommandOutput | ListInferenceProfilesCommandOutput | ListMarketplaceModelEndpointsCommandOutput | ListModelCopyJobsCommandOutput | ListModelCustomizationJobsCommandOutput | ListModelImportJobsCommandOutput | ListModelInvocationJobsCommandOutput | ListPromptRoutersCommandOutput | ListProvisionedModelThroughputsCommandOutput | ListTagsForResourceCommandOutput | PutModelInvocationLoggingConfigurationCommandOutput | RegisterMarketplaceModelEndpointCommandOutput | StopEvaluationJobCommandOutput | StopModelCustomizationJobCommandOutput | StopModelInvocationJobCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateGuardrailCommandOutput | UpdateMarketplaceModelEndpointCommandOutput | UpdateProvisionedModelThroughputCommandOutput;
79
+ export type ServiceOutputTypes = BatchDeleteEvaluationJobCommandOutput | CreateEvaluationJobCommandOutput | CreateGuardrailCommandOutput | CreateGuardrailVersionCommandOutput | CreateInferenceProfileCommandOutput | CreateMarketplaceModelEndpointCommandOutput | CreateModelCopyJobCommandOutput | CreateModelCustomizationJobCommandOutput | CreateModelImportJobCommandOutput | CreateModelInvocationJobCommandOutput | CreatePromptRouterCommandOutput | CreateProvisionedModelThroughputCommandOutput | DeleteCustomModelCommandOutput | DeleteGuardrailCommandOutput | DeleteImportedModelCommandOutput | DeleteInferenceProfileCommandOutput | DeleteMarketplaceModelEndpointCommandOutput | DeleteModelInvocationLoggingConfigurationCommandOutput | DeletePromptRouterCommandOutput | DeleteProvisionedModelThroughputCommandOutput | DeregisterMarketplaceModelEndpointCommandOutput | GetCustomModelCommandOutput | GetEvaluationJobCommandOutput | GetFoundationModelCommandOutput | GetGuardrailCommandOutput | GetImportedModelCommandOutput | GetInferenceProfileCommandOutput | GetMarketplaceModelEndpointCommandOutput | GetModelCopyJobCommandOutput | GetModelCustomizationJobCommandOutput | GetModelImportJobCommandOutput | GetModelInvocationJobCommandOutput | GetModelInvocationLoggingConfigurationCommandOutput | GetPromptRouterCommandOutput | GetProvisionedModelThroughputCommandOutput | ListCustomModelsCommandOutput | ListEvaluationJobsCommandOutput | ListFoundationModelsCommandOutput | ListGuardrailsCommandOutput | ListImportedModelsCommandOutput | ListInferenceProfilesCommandOutput | ListMarketplaceModelEndpointsCommandOutput | ListModelCopyJobsCommandOutput | ListModelCustomizationJobsCommandOutput | ListModelImportJobsCommandOutput | ListModelInvocationJobsCommandOutput | ListPromptRoutersCommandOutput | ListProvisionedModelThroughputsCommandOutput | ListTagsForResourceCommandOutput | PutModelInvocationLoggingConfigurationCommandOutput | RegisterMarketplaceModelEndpointCommandOutput | StopEvaluationJobCommandOutput | StopModelCustomizationJobCommandOutput | StopModelInvocationJobCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateGuardrailCommandOutput | UpdateMarketplaceModelEndpointCommandOutput | UpdateProvisionedModelThroughputCommandOutput;
78
80
  /**
79
81
  * @public
80
82
  */
@@ -109,6 +109,9 @@ declare const CreateEvaluationJobCommand_base: {
109
109
  * latency: "standard" || "optimized",
110
110
  * },
111
111
  * },
112
+ * precomputedInferenceSource: { // EvaluationPrecomputedInferenceSource
113
+ * inferenceSourceIdentifier: "STRING_VALUE", // required
114
+ * },
112
115
  * },
113
116
  * ],
114
117
  * ragConfigs: [ // RagConfigs
@@ -255,6 +258,14 @@ declare const CreateEvaluationJobCommand_base: {
255
258
  * },
256
259
  * },
257
260
  * },
261
+ * precomputedRagSourceConfig: { // EvaluationPrecomputedRagSourceConfig Union: only one key present
262
+ * retrieveSourceConfig: { // EvaluationPrecomputedRetrieveSourceConfig
263
+ * ragSourceIdentifier: "STRING_VALUE", // required
264
+ * },
265
+ * retrieveAndGenerateSourceConfig: { // EvaluationPrecomputedRetrieveAndGenerateSourceConfig
266
+ * ragSourceIdentifier: "STRING_VALUE", // required
267
+ * },
268
+ * },
258
269
  * },
259
270
  * ],
260
271
  * },
@@ -0,0 +1,115 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient";
4
+ import { CreatePromptRouterRequest, CreatePromptRouterResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link CreatePromptRouterCommand}.
14
+ */
15
+ export interface CreatePromptRouterCommandInput extends CreatePromptRouterRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link CreatePromptRouterCommand}.
21
+ */
22
+ export interface CreatePromptRouterCommandOutput extends CreatePromptRouterResponse, __MetadataBearer {
23
+ }
24
+ declare const CreatePromptRouterCommand_base: {
25
+ new (input: CreatePromptRouterCommandInput): import("@smithy/smithy-client").CommandImpl<CreatePromptRouterCommandInput, CreatePromptRouterCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: CreatePromptRouterCommandInput): import("@smithy/smithy-client").CommandImpl<CreatePromptRouterCommandInput, CreatePromptRouterCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Creates a prompt router that manages the routing of requests between multiple foundation models based on the routing criteria.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockClient, CreatePromptRouterCommand } from "@aws-sdk/client-bedrock"; // ES Modules import
35
+ * // const { BedrockClient, CreatePromptRouterCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import
36
+ * const client = new BedrockClient(config);
37
+ * const input = { // CreatePromptRouterRequest
38
+ * clientRequestToken: "STRING_VALUE",
39
+ * promptRouterName: "STRING_VALUE", // required
40
+ * models: [ // PromptRouterTargetModels // required
41
+ * { // PromptRouterTargetModel
42
+ * modelArn: "STRING_VALUE", // required
43
+ * },
44
+ * ],
45
+ * description: "STRING_VALUE",
46
+ * routingCriteria: { // RoutingCriteria
47
+ * responseQualityDifference: Number("double"), // required
48
+ * },
49
+ * fallbackModel: {
50
+ * modelArn: "STRING_VALUE", // required
51
+ * },
52
+ * tags: [ // TagList
53
+ * { // Tag
54
+ * key: "STRING_VALUE", // required
55
+ * value: "STRING_VALUE", // required
56
+ * },
57
+ * ],
58
+ * };
59
+ * const command = new CreatePromptRouterCommand(input);
60
+ * const response = await client.send(command);
61
+ * // { // CreatePromptRouterResponse
62
+ * // promptRouterArn: "STRING_VALUE",
63
+ * // };
64
+ *
65
+ * ```
66
+ *
67
+ * @param CreatePromptRouterCommandInput - {@link CreatePromptRouterCommandInput}
68
+ * @returns {@link CreatePromptRouterCommandOutput}
69
+ * @see {@link CreatePromptRouterCommandInput} for command's `input` shape.
70
+ * @see {@link CreatePromptRouterCommandOutput} for command's `response` shape.
71
+ * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape.
72
+ *
73
+ * @throws {@link AccessDeniedException} (client fault)
74
+ * <p>The request is denied because of missing access permissions.</p>
75
+ *
76
+ * @throws {@link ConflictException} (client fault)
77
+ * <p>Error occurred because of a conflict while performing an operation.</p>
78
+ *
79
+ * @throws {@link InternalServerException} (server fault)
80
+ * <p>An internal server error occurred. Retry your request.</p>
81
+ *
82
+ * @throws {@link ResourceNotFoundException} (client fault)
83
+ * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
84
+ *
85
+ * @throws {@link ServiceQuotaExceededException} (client fault)
86
+ * <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
87
+ *
88
+ * @throws {@link ThrottlingException} (client fault)
89
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
90
+ *
91
+ * @throws {@link TooManyTagsException} (client fault)
92
+ * <p>The request contains more tags than can be associated with a resource (50 tags per resource).
93
+ * The maximum number of tags includes both existing tags and those included in your current request. </p>
94
+ *
95
+ * @throws {@link ValidationException} (client fault)
96
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
97
+ *
98
+ * @throws {@link BedrockServiceException}
99
+ * <p>Base exception class for all service exceptions from Bedrock service.</p>
100
+ *
101
+ * @public
102
+ */
103
+ export declare class CreatePromptRouterCommand extends CreatePromptRouterCommand_base {
104
+ /** @internal type navigation helper, not in runtime. */
105
+ protected static __types: {
106
+ api: {
107
+ input: CreatePromptRouterRequest;
108
+ output: CreatePromptRouterResponse;
109
+ };
110
+ sdk: {
111
+ input: CreatePromptRouterCommandInput;
112
+ output: CreatePromptRouterCommandOutput;
113
+ };
114
+ };
115
+ }
@@ -0,0 +1,84 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient";
4
+ import { DeletePromptRouterRequest, DeletePromptRouterResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link DeletePromptRouterCommand}.
14
+ */
15
+ export interface DeletePromptRouterCommandInput extends DeletePromptRouterRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link DeletePromptRouterCommand}.
21
+ */
22
+ export interface DeletePromptRouterCommandOutput extends DeletePromptRouterResponse, __MetadataBearer {
23
+ }
24
+ declare const DeletePromptRouterCommand_base: {
25
+ new (input: DeletePromptRouterCommandInput): import("@smithy/smithy-client").CommandImpl<DeletePromptRouterCommandInput, DeletePromptRouterCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: DeletePromptRouterCommandInput): import("@smithy/smithy-client").CommandImpl<DeletePromptRouterCommandInput, DeletePromptRouterCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Deletes a specified prompt router. This action cannot be undone.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockClient, DeletePromptRouterCommand } from "@aws-sdk/client-bedrock"; // ES Modules import
35
+ * // const { BedrockClient, DeletePromptRouterCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import
36
+ * const client = new BedrockClient(config);
37
+ * const input = { // DeletePromptRouterRequest
38
+ * promptRouterArn: "STRING_VALUE", // required
39
+ * };
40
+ * const command = new DeletePromptRouterCommand(input);
41
+ * const response = await client.send(command);
42
+ * // {};
43
+ *
44
+ * ```
45
+ *
46
+ * @param DeletePromptRouterCommandInput - {@link DeletePromptRouterCommandInput}
47
+ * @returns {@link DeletePromptRouterCommandOutput}
48
+ * @see {@link DeletePromptRouterCommandInput} for command's `input` shape.
49
+ * @see {@link DeletePromptRouterCommandOutput} for command's `response` shape.
50
+ * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape.
51
+ *
52
+ * @throws {@link AccessDeniedException} (client fault)
53
+ * <p>The request is denied because of missing access permissions.</p>
54
+ *
55
+ * @throws {@link InternalServerException} (server fault)
56
+ * <p>An internal server error occurred. Retry your request.</p>
57
+ *
58
+ * @throws {@link ResourceNotFoundException} (client fault)
59
+ * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
60
+ *
61
+ * @throws {@link ThrottlingException} (client fault)
62
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
63
+ *
64
+ * @throws {@link ValidationException} (client fault)
65
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
66
+ *
67
+ * @throws {@link BedrockServiceException}
68
+ * <p>Base exception class for all service exceptions from Bedrock service.</p>
69
+ *
70
+ * @public
71
+ */
72
+ export declare class DeletePromptRouterCommand extends DeletePromptRouterCommand_base {
73
+ /** @internal type navigation helper, not in runtime. */
74
+ protected static __types: {
75
+ api: {
76
+ input: DeletePromptRouterRequest;
77
+ output: {};
78
+ };
79
+ sdk: {
80
+ input: DeletePromptRouterCommandInput;
81
+ output: DeletePromptRouterCommandOutput;
82
+ };
83
+ };
84
+ }
@@ -110,6 +110,9 @@ declare const GetEvaluationJobCommand_base: {
110
110
  * // latency: "standard" || "optimized",
111
111
  * // },
112
112
  * // },
113
+ * // precomputedInferenceSource: { // EvaluationPrecomputedInferenceSource
114
+ * // inferenceSourceIdentifier: "STRING_VALUE", // required
115
+ * // },
113
116
  * // },
114
117
  * // ],
115
118
  * // ragConfigs: [ // RagConfigs
@@ -256,6 +259,14 @@ declare const GetEvaluationJobCommand_base: {
256
259
  * // },
257
260
  * // },
258
261
  * // },
262
+ * // precomputedRagSourceConfig: { // EvaluationPrecomputedRagSourceConfig Union: only one key present
263
+ * // retrieveSourceConfig: { // EvaluationPrecomputedRetrieveSourceConfig
264
+ * // ragSourceIdentifier: "STRING_VALUE", // required
265
+ * // },
266
+ * // retrieveAndGenerateSourceConfig: { // EvaluationPrecomputedRetrieveAndGenerateSourceConfig
267
+ * // ragSourceIdentifier: "STRING_VALUE", // required
268
+ * // },
269
+ * // },
259
270
  * // },
260
271
  * // ],
261
272
  * // },
@@ -50,11 +50,11 @@ declare const GetPromptRouterCommand_base: {
50
50
  * // promptRouterArn: "STRING_VALUE", // required
51
51
  * // models: [ // PromptRouterTargetModels // required
52
52
  * // { // PromptRouterTargetModel
53
- * // modelArn: "STRING_VALUE",
53
+ * // modelArn: "STRING_VALUE", // required
54
54
  * // },
55
55
  * // ],
56
56
  * // fallbackModel: {
57
- * // modelArn: "STRING_VALUE",
57
+ * // modelArn: "STRING_VALUE", // required
58
58
  * // },
59
59
  * // status: "AVAILABLE", // required
60
60
  * // type: "custom" || "default", // required