@aws-sdk/client-bedrock 3.703.0 → 3.706.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -0
- package/dist-cjs/index.js +717 -30
- package/dist-es/Bedrock.js +18 -0
- package/dist-es/commands/CreateMarketplaceModelEndpointCommand.js +22 -0
- package/dist-es/commands/CreateModelCustomizationJobCommand.js +2 -1
- package/dist-es/commands/DeleteMarketplaceModelEndpointCommand.js +22 -0
- package/dist-es/commands/DeregisterMarketplaceModelEndpointCommand.js +22 -0
- package/dist-es/commands/GetCustomModelCommand.js +2 -1
- package/dist-es/commands/GetMarketplaceModelEndpointCommand.js +22 -0
- package/dist-es/commands/GetModelCustomizationJobCommand.js +2 -1
- package/dist-es/commands/GetPromptRouterCommand.js +23 -0
- package/dist-es/commands/ListMarketplaceModelEndpointsCommand.js +22 -0
- package/dist-es/commands/ListPromptRoutersCommand.js +23 -0
- package/dist-es/commands/RegisterMarketplaceModelEndpointCommand.js +22 -0
- package/dist-es/commands/UpdateMarketplaceModelEndpointCommand.js +22 -0
- package/dist-es/commands/index.js +9 -0
- package/dist-es/models/models_0.js +173 -20
- package/dist-es/pagination/ListMarketplaceModelEndpointsPaginator.js +4 -0
- package/dist-es/pagination/ListPromptRoutersPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +317 -1
- package/dist-types/Bedrock.d.ts +65 -0
- package/dist-types/BedrockClient.d.ts +11 -2
- package/dist-types/commands/CreateGuardrailCommand.d.ts +7 -1
- package/dist-types/commands/CreateMarketplaceModelEndpointCommand.d.ts +143 -0
- package/dist-types/commands/CreateModelCustomizationJobCommand.d.ts +43 -3
- package/dist-types/commands/DeleteMarketplaceModelEndpointCommand.d.ts +84 -0
- package/dist-types/commands/DeregisterMarketplaceModelEndpointCommand.d.ts +89 -0
- package/dist-types/commands/GetCustomModelCommand.d.ts +42 -2
- package/dist-types/commands/GetFoundationModelCommand.d.ts +1 -1
- package/dist-types/commands/GetGuardrailCommand.d.ts +6 -0
- package/dist-types/commands/GetMarketplaceModelEndpointCommand.d.ts +111 -0
- package/dist-types/commands/GetModelCustomizationJobCommand.d.ts +43 -3
- package/dist-types/commands/GetModelInvocationJobCommand.d.ts +1 -1
- package/dist-types/commands/GetModelInvocationLoggingConfigurationCommand.d.ts +1 -0
- package/dist-types/commands/GetPromptRouterCommand.d.ts +103 -0
- package/dist-types/commands/ListCustomModelsCommand.d.ts +1 -1
- package/dist-types/commands/ListFoundationModelsCommand.d.ts +2 -2
- package/dist-types/commands/ListMarketplaceModelEndpointsCommand.d.ts +99 -0
- package/dist-types/commands/ListModelCustomizationJobsCommand.d.ts +1 -1
- package/dist-types/commands/ListModelInvocationJobsCommand.d.ts +1 -1
- package/dist-types/commands/ListPromptRoutersCommand.d.ts +106 -0
- package/dist-types/commands/PutModelInvocationLoggingConfigurationCommand.d.ts +1 -0
- package/dist-types/commands/RegisterMarketplaceModelEndpointCommand.d.ts +116 -0
- package/dist-types/commands/StopModelInvocationJobCommand.d.ts +1 -1
- package/dist-types/commands/UpdateGuardrailCommand.d.ts +6 -0
- package/dist-types/commands/UpdateMarketplaceModelEndpointCommand.d.ts +135 -0
- package/dist-types/commands/index.d.ts +9 -0
- package/dist-types/models/models_0.d.ts +1163 -139
- package/dist-types/pagination/ListMarketplaceModelEndpointsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListPromptRoutersPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +81 -0
- package/dist-types/ts3.4/Bedrock.d.ts +161 -0
- package/dist-types/ts3.4/BedrockClient.d.ts +54 -0
- package/dist-types/ts3.4/commands/CreateMarketplaceModelEndpointCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeleteMarketplaceModelEndpointCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeregisterMarketplaceModelEndpointCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetMarketplaceModelEndpointCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetPromptRouterCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListMarketplaceModelEndpointsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListPromptRoutersCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/RegisterMarketplaceModelEndpointCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/UpdateMarketplaceModelEndpointCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +9 -0
- package/dist-types/ts3.4/models/models_0.d.ts +363 -44
- package/dist-types/ts3.4/pagination/ListMarketplaceModelEndpointsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListPromptRoutersPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +108 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { requestBuilder as rb } from "@smithy/core";
|
|
|
3
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { BedrockServiceException as __BaseException } from "../models/BedrockServiceException";
|
|
6
|
-
import { AccessDeniedException, ConflictException, EvaluationInferenceConfig, InternalServerException, KnowledgeBaseConfig, RAGConfig, ResourceNotFoundException, RetrievalFilter, ServiceQuotaExceededException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
|
|
6
|
+
import { AccessDeniedException, ConflictException, EvaluationInferenceConfig, InternalServerException, KnowledgeBaseConfig, RAGConfig, ResourceNotFoundException, RetrievalFilter, ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
|
|
7
7
|
export const se_BatchDeleteEvaluationJobCommand = async (input, context) => {
|
|
8
8
|
const b = rb(input, context);
|
|
9
9
|
const headers = {
|
|
@@ -95,6 +95,24 @@ export const se_CreateInferenceProfileCommand = async (input, context) => {
|
|
|
95
95
|
b.m("POST").h(headers).b(body);
|
|
96
96
|
return b.build();
|
|
97
97
|
};
|
|
98
|
+
export const se_CreateMarketplaceModelEndpointCommand = async (input, context) => {
|
|
99
|
+
const b = rb(input, context);
|
|
100
|
+
const headers = {
|
|
101
|
+
"content-type": "application/json",
|
|
102
|
+
};
|
|
103
|
+
b.bp("/marketplace-model/endpoints");
|
|
104
|
+
let body;
|
|
105
|
+
body = JSON.stringify(take(input, {
|
|
106
|
+
acceptEula: [],
|
|
107
|
+
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
108
|
+
endpointConfig: (_) => _json(_),
|
|
109
|
+
endpointName: [],
|
|
110
|
+
modelSourceIdentifier: [],
|
|
111
|
+
tags: (_) => _json(_),
|
|
112
|
+
}));
|
|
113
|
+
b.m("POST").h(headers).b(body);
|
|
114
|
+
return b.build();
|
|
115
|
+
};
|
|
98
116
|
export const se_CreateModelCopyJobCommand = async (input, context) => {
|
|
99
117
|
const b = rb(input, context);
|
|
100
118
|
const headers = {
|
|
@@ -125,6 +143,7 @@ export const se_CreateModelCustomizationJobCommand = async (input, context) => {
|
|
|
125
143
|
customModelKmsKeyId: [],
|
|
126
144
|
customModelName: [],
|
|
127
145
|
customModelTags: (_) => _json(_),
|
|
146
|
+
customizationConfig: (_) => _json(_),
|
|
128
147
|
customizationType: [],
|
|
129
148
|
hyperParameters: (_) => _json(_),
|
|
130
149
|
jobName: [],
|
|
@@ -237,6 +256,15 @@ export const se_DeleteInferenceProfileCommand = async (input, context) => {
|
|
|
237
256
|
b.m("DELETE").h(headers).b(body);
|
|
238
257
|
return b.build();
|
|
239
258
|
};
|
|
259
|
+
export const se_DeleteMarketplaceModelEndpointCommand = async (input, context) => {
|
|
260
|
+
const b = rb(input, context);
|
|
261
|
+
const headers = {};
|
|
262
|
+
b.bp("/marketplace-model/endpoints/{endpointArn}");
|
|
263
|
+
b.p("endpointArn", () => input.endpointArn, "{endpointArn}", false);
|
|
264
|
+
let body;
|
|
265
|
+
b.m("DELETE").h(headers).b(body);
|
|
266
|
+
return b.build();
|
|
267
|
+
};
|
|
240
268
|
export const se_DeleteModelInvocationLoggingConfigurationCommand = async (input, context) => {
|
|
241
269
|
const b = rb(input, context);
|
|
242
270
|
const headers = {};
|
|
@@ -254,6 +282,15 @@ export const se_DeleteProvisionedModelThroughputCommand = async (input, context)
|
|
|
254
282
|
b.m("DELETE").h(headers).b(body);
|
|
255
283
|
return b.build();
|
|
256
284
|
};
|
|
285
|
+
export const se_DeregisterMarketplaceModelEndpointCommand = async (input, context) => {
|
|
286
|
+
const b = rb(input, context);
|
|
287
|
+
const headers = {};
|
|
288
|
+
b.bp("/marketplace-model/endpoints/{endpointArn}/registration");
|
|
289
|
+
b.p("endpointArn", () => input.endpointArn, "{endpointArn}", false);
|
|
290
|
+
let body;
|
|
291
|
+
b.m("DELETE").h(headers).b(body);
|
|
292
|
+
return b.build();
|
|
293
|
+
};
|
|
257
294
|
export const se_GetCustomModelCommand = async (input, context) => {
|
|
258
295
|
const b = rb(input, context);
|
|
259
296
|
const headers = {};
|
|
@@ -311,6 +348,15 @@ export const se_GetInferenceProfileCommand = async (input, context) => {
|
|
|
311
348
|
b.m("GET").h(headers).b(body);
|
|
312
349
|
return b.build();
|
|
313
350
|
};
|
|
351
|
+
export const se_GetMarketplaceModelEndpointCommand = async (input, context) => {
|
|
352
|
+
const b = rb(input, context);
|
|
353
|
+
const headers = {};
|
|
354
|
+
b.bp("/marketplace-model/endpoints/{endpointArn}");
|
|
355
|
+
b.p("endpointArn", () => input.endpointArn, "{endpointArn}", false);
|
|
356
|
+
let body;
|
|
357
|
+
b.m("GET").h(headers).b(body);
|
|
358
|
+
return b.build();
|
|
359
|
+
};
|
|
314
360
|
export const se_GetModelCopyJobCommand = async (input, context) => {
|
|
315
361
|
const b = rb(input, context);
|
|
316
362
|
const headers = {};
|
|
@@ -355,6 +401,15 @@ export const se_GetModelInvocationLoggingConfigurationCommand = async (input, co
|
|
|
355
401
|
b.m("GET").h(headers).b(body);
|
|
356
402
|
return b.build();
|
|
357
403
|
};
|
|
404
|
+
export const se_GetPromptRouterCommand = async (input, context) => {
|
|
405
|
+
const b = rb(input, context);
|
|
406
|
+
const headers = {};
|
|
407
|
+
b.bp("/prompt-routers/{promptRouterArn}");
|
|
408
|
+
b.p("promptRouterArn", () => input.promptRouterArn, "{promptRouterArn}", false);
|
|
409
|
+
let body;
|
|
410
|
+
b.m("GET").h(headers).b(body);
|
|
411
|
+
return b.build();
|
|
412
|
+
};
|
|
358
413
|
export const se_GetProvisionedModelThroughputCommand = async (input, context) => {
|
|
359
414
|
const b = rb(input, context);
|
|
360
415
|
const headers = {};
|
|
@@ -460,6 +515,19 @@ export const se_ListInferenceProfilesCommand = async (input, context) => {
|
|
|
460
515
|
b.m("GET").h(headers).q(query).b(body);
|
|
461
516
|
return b.build();
|
|
462
517
|
};
|
|
518
|
+
export const se_ListMarketplaceModelEndpointsCommand = async (input, context) => {
|
|
519
|
+
const b = rb(input, context);
|
|
520
|
+
const headers = {};
|
|
521
|
+
b.bp("/marketplace-model/endpoints");
|
|
522
|
+
const query = map({
|
|
523
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
524
|
+
[_nT]: [, input[_nT]],
|
|
525
|
+
[_mSI]: [, input[_mSE]],
|
|
526
|
+
});
|
|
527
|
+
let body;
|
|
528
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
529
|
+
return b.build();
|
|
530
|
+
};
|
|
463
531
|
export const se_ListModelCopyJobsCommand = async (input, context) => {
|
|
464
532
|
const b = rb(input, context);
|
|
465
533
|
const headers = {};
|
|
@@ -534,6 +602,18 @@ export const se_ListModelInvocationJobsCommand = async (input, context) => {
|
|
|
534
602
|
b.m("GET").h(headers).q(query).b(body);
|
|
535
603
|
return b.build();
|
|
536
604
|
};
|
|
605
|
+
export const se_ListPromptRoutersCommand = async (input, context) => {
|
|
606
|
+
const b = rb(input, context);
|
|
607
|
+
const headers = {};
|
|
608
|
+
b.bp("/prompt-routers");
|
|
609
|
+
const query = map({
|
|
610
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
611
|
+
[_nT]: [, input[_nT]],
|
|
612
|
+
});
|
|
613
|
+
let body;
|
|
614
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
615
|
+
return b.build();
|
|
616
|
+
};
|
|
537
617
|
export const se_ListProvisionedModelThroughputsCommand = async (input, context) => {
|
|
538
618
|
const b = rb(input, context);
|
|
539
619
|
const headers = {};
|
|
@@ -579,6 +659,20 @@ export const se_PutModelInvocationLoggingConfigurationCommand = async (input, co
|
|
|
579
659
|
b.m("PUT").h(headers).b(body);
|
|
580
660
|
return b.build();
|
|
581
661
|
};
|
|
662
|
+
export const se_RegisterMarketplaceModelEndpointCommand = async (input, context) => {
|
|
663
|
+
const b = rb(input, context);
|
|
664
|
+
const headers = {
|
|
665
|
+
"content-type": "application/json",
|
|
666
|
+
};
|
|
667
|
+
b.bp("/marketplace-model/endpoints/{endpointIdentifier}/registration");
|
|
668
|
+
b.p("endpointIdentifier", () => input.endpointIdentifier, "{endpointIdentifier}", false);
|
|
669
|
+
let body;
|
|
670
|
+
body = JSON.stringify(take(input, {
|
|
671
|
+
modelSourceIdentifier: [],
|
|
672
|
+
}));
|
|
673
|
+
b.m("POST").h(headers).b(body);
|
|
674
|
+
return b.build();
|
|
675
|
+
};
|
|
582
676
|
export const se_StopEvaluationJobCommand = async (input, context) => {
|
|
583
677
|
const b = rb(input, context);
|
|
584
678
|
const headers = {};
|
|
@@ -657,6 +751,21 @@ export const se_UpdateGuardrailCommand = async (input, context) => {
|
|
|
657
751
|
b.m("PUT").h(headers).b(body);
|
|
658
752
|
return b.build();
|
|
659
753
|
};
|
|
754
|
+
export const se_UpdateMarketplaceModelEndpointCommand = async (input, context) => {
|
|
755
|
+
const b = rb(input, context);
|
|
756
|
+
const headers = {
|
|
757
|
+
"content-type": "application/json",
|
|
758
|
+
};
|
|
759
|
+
b.bp("/marketplace-model/endpoints/{endpointArn}");
|
|
760
|
+
b.p("endpointArn", () => input.endpointArn, "{endpointArn}", false);
|
|
761
|
+
let body;
|
|
762
|
+
body = JSON.stringify(take(input, {
|
|
763
|
+
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
764
|
+
endpointConfig: (_) => _json(_),
|
|
765
|
+
}));
|
|
766
|
+
b.m("PATCH").h(headers).b(body);
|
|
767
|
+
return b.build();
|
|
768
|
+
};
|
|
660
769
|
export const se_UpdateProvisionedModelThroughputCommand = async (input, context) => {
|
|
661
770
|
const b = rb(input, context);
|
|
662
771
|
const headers = {
|
|
@@ -748,6 +857,20 @@ export const de_CreateInferenceProfileCommand = async (output, context) => {
|
|
|
748
857
|
Object.assign(contents, doc);
|
|
749
858
|
return contents;
|
|
750
859
|
};
|
|
860
|
+
export const de_CreateMarketplaceModelEndpointCommand = async (output, context) => {
|
|
861
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
862
|
+
return de_CommandError(output, context);
|
|
863
|
+
}
|
|
864
|
+
const contents = map({
|
|
865
|
+
$metadata: deserializeMetadata(output),
|
|
866
|
+
});
|
|
867
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
868
|
+
const doc = take(data, {
|
|
869
|
+
marketplaceModelEndpoint: (_) => de_MarketplaceModelEndpoint(_, context),
|
|
870
|
+
});
|
|
871
|
+
Object.assign(contents, doc);
|
|
872
|
+
return contents;
|
|
873
|
+
};
|
|
751
874
|
export const de_CreateModelCopyJobCommand = async (output, context) => {
|
|
752
875
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
753
876
|
return de_CommandError(output, context);
|
|
@@ -858,6 +981,16 @@ export const de_DeleteInferenceProfileCommand = async (output, context) => {
|
|
|
858
981
|
await collectBody(output.body, context);
|
|
859
982
|
return contents;
|
|
860
983
|
};
|
|
984
|
+
export const de_DeleteMarketplaceModelEndpointCommand = async (output, context) => {
|
|
985
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
986
|
+
return de_CommandError(output, context);
|
|
987
|
+
}
|
|
988
|
+
const contents = map({
|
|
989
|
+
$metadata: deserializeMetadata(output),
|
|
990
|
+
});
|
|
991
|
+
await collectBody(output.body, context);
|
|
992
|
+
return contents;
|
|
993
|
+
};
|
|
861
994
|
export const de_DeleteModelInvocationLoggingConfigurationCommand = async (output, context) => {
|
|
862
995
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
863
996
|
return de_CommandError(output, context);
|
|
@@ -878,6 +1011,16 @@ export const de_DeleteProvisionedModelThroughputCommand = async (output, context
|
|
|
878
1011
|
await collectBody(output.body, context);
|
|
879
1012
|
return contents;
|
|
880
1013
|
};
|
|
1014
|
+
export const de_DeregisterMarketplaceModelEndpointCommand = async (output, context) => {
|
|
1015
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1016
|
+
return de_CommandError(output, context);
|
|
1017
|
+
}
|
|
1018
|
+
const contents = map({
|
|
1019
|
+
$metadata: deserializeMetadata(output),
|
|
1020
|
+
});
|
|
1021
|
+
await collectBody(output.body, context);
|
|
1022
|
+
return contents;
|
|
1023
|
+
};
|
|
881
1024
|
export const de_GetCustomModelCommand = async (output, context) => {
|
|
882
1025
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
883
1026
|
return de_CommandError(output, context);
|
|
@@ -889,6 +1032,7 @@ export const de_GetCustomModelCommand = async (output, context) => {
|
|
|
889
1032
|
const doc = take(data, {
|
|
890
1033
|
baseModelArn: __expectString,
|
|
891
1034
|
creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1035
|
+
customizationConfig: (_) => _json(__expectUnion(_)),
|
|
892
1036
|
customizationType: __expectString,
|
|
893
1037
|
hyperParameters: _json,
|
|
894
1038
|
jobArn: __expectString,
|
|
@@ -1021,6 +1165,20 @@ export const de_GetInferenceProfileCommand = async (output, context) => {
|
|
|
1021
1165
|
Object.assign(contents, doc);
|
|
1022
1166
|
return contents;
|
|
1023
1167
|
};
|
|
1168
|
+
export const de_GetMarketplaceModelEndpointCommand = async (output, context) => {
|
|
1169
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1170
|
+
return de_CommandError(output, context);
|
|
1171
|
+
}
|
|
1172
|
+
const contents = map({
|
|
1173
|
+
$metadata: deserializeMetadata(output),
|
|
1174
|
+
});
|
|
1175
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1176
|
+
const doc = take(data, {
|
|
1177
|
+
marketplaceModelEndpoint: (_) => de_MarketplaceModelEndpoint(_, context),
|
|
1178
|
+
});
|
|
1179
|
+
Object.assign(contents, doc);
|
|
1180
|
+
return contents;
|
|
1181
|
+
};
|
|
1024
1182
|
export const de_GetModelCopyJobCommand = async (output, context) => {
|
|
1025
1183
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1026
1184
|
return de_CommandError(output, context);
|
|
@@ -1057,6 +1215,7 @@ export const de_GetModelCustomizationJobCommand = async (output, context) => {
|
|
|
1057
1215
|
baseModelArn: __expectString,
|
|
1058
1216
|
clientRequestToken: __expectString,
|
|
1059
1217
|
creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1218
|
+
customizationConfig: (_) => _json(__expectUnion(_)),
|
|
1060
1219
|
customizationType: __expectString,
|
|
1061
1220
|
endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1062
1221
|
failureMessage: __expectString,
|
|
@@ -1147,6 +1306,29 @@ export const de_GetModelInvocationLoggingConfigurationCommand = async (output, c
|
|
|
1147
1306
|
Object.assign(contents, doc);
|
|
1148
1307
|
return contents;
|
|
1149
1308
|
};
|
|
1309
|
+
export const de_GetPromptRouterCommand = async (output, context) => {
|
|
1310
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1311
|
+
return de_CommandError(output, context);
|
|
1312
|
+
}
|
|
1313
|
+
const contents = map({
|
|
1314
|
+
$metadata: deserializeMetadata(output),
|
|
1315
|
+
});
|
|
1316
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1317
|
+
const doc = take(data, {
|
|
1318
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1319
|
+
description: __expectString,
|
|
1320
|
+
fallbackModel: _json,
|
|
1321
|
+
models: _json,
|
|
1322
|
+
promptRouterArn: __expectString,
|
|
1323
|
+
promptRouterName: __expectString,
|
|
1324
|
+
routingCriteria: (_) => de_RoutingCriteria(_, context),
|
|
1325
|
+
status: __expectString,
|
|
1326
|
+
type: __expectString,
|
|
1327
|
+
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1328
|
+
});
|
|
1329
|
+
Object.assign(contents, doc);
|
|
1330
|
+
return contents;
|
|
1331
|
+
};
|
|
1150
1332
|
export const de_GetProvisionedModelThroughputCommand = async (output, context) => {
|
|
1151
1333
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1152
1334
|
return de_CommandError(output, context);
|
|
@@ -1262,6 +1444,21 @@ export const de_ListInferenceProfilesCommand = async (output, context) => {
|
|
|
1262
1444
|
Object.assign(contents, doc);
|
|
1263
1445
|
return contents;
|
|
1264
1446
|
};
|
|
1447
|
+
export const de_ListMarketplaceModelEndpointsCommand = async (output, context) => {
|
|
1448
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1449
|
+
return de_CommandError(output, context);
|
|
1450
|
+
}
|
|
1451
|
+
const contents = map({
|
|
1452
|
+
$metadata: deserializeMetadata(output),
|
|
1453
|
+
});
|
|
1454
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1455
|
+
const doc = take(data, {
|
|
1456
|
+
marketplaceModelEndpoints: (_) => de_MarketplaceModelEndpointSummaries(_, context),
|
|
1457
|
+
nextToken: __expectString,
|
|
1458
|
+
});
|
|
1459
|
+
Object.assign(contents, doc);
|
|
1460
|
+
return contents;
|
|
1461
|
+
};
|
|
1265
1462
|
export const de_ListModelCopyJobsCommand = async (output, context) => {
|
|
1266
1463
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1267
1464
|
return de_CommandError(output, context);
|
|
@@ -1322,6 +1519,21 @@ export const de_ListModelInvocationJobsCommand = async (output, context) => {
|
|
|
1322
1519
|
Object.assign(contents, doc);
|
|
1323
1520
|
return contents;
|
|
1324
1521
|
};
|
|
1522
|
+
export const de_ListPromptRoutersCommand = async (output, context) => {
|
|
1523
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1524
|
+
return de_CommandError(output, context);
|
|
1525
|
+
}
|
|
1526
|
+
const contents = map({
|
|
1527
|
+
$metadata: deserializeMetadata(output),
|
|
1528
|
+
});
|
|
1529
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1530
|
+
const doc = take(data, {
|
|
1531
|
+
nextToken: __expectString,
|
|
1532
|
+
promptRouterSummaries: (_) => de_PromptRouterSummaries(_, context),
|
|
1533
|
+
});
|
|
1534
|
+
Object.assign(contents, doc);
|
|
1535
|
+
return contents;
|
|
1536
|
+
};
|
|
1325
1537
|
export const de_ListProvisionedModelThroughputsCommand = async (output, context) => {
|
|
1326
1538
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1327
1539
|
return de_CommandError(output, context);
|
|
@@ -1361,6 +1573,20 @@ export const de_PutModelInvocationLoggingConfigurationCommand = async (output, c
|
|
|
1361
1573
|
await collectBody(output.body, context);
|
|
1362
1574
|
return contents;
|
|
1363
1575
|
};
|
|
1576
|
+
export const de_RegisterMarketplaceModelEndpointCommand = async (output, context) => {
|
|
1577
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1578
|
+
return de_CommandError(output, context);
|
|
1579
|
+
}
|
|
1580
|
+
const contents = map({
|
|
1581
|
+
$metadata: deserializeMetadata(output),
|
|
1582
|
+
});
|
|
1583
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1584
|
+
const doc = take(data, {
|
|
1585
|
+
marketplaceModelEndpoint: (_) => de_MarketplaceModelEndpoint(_, context),
|
|
1586
|
+
});
|
|
1587
|
+
Object.assign(contents, doc);
|
|
1588
|
+
return contents;
|
|
1589
|
+
};
|
|
1364
1590
|
export const de_StopEvaluationJobCommand = async (output, context) => {
|
|
1365
1591
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1366
1592
|
return de_CommandError(output, context);
|
|
@@ -1428,6 +1654,20 @@ export const de_UpdateGuardrailCommand = async (output, context) => {
|
|
|
1428
1654
|
Object.assign(contents, doc);
|
|
1429
1655
|
return contents;
|
|
1430
1656
|
};
|
|
1657
|
+
export const de_UpdateMarketplaceModelEndpointCommand = async (output, context) => {
|
|
1658
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1659
|
+
return de_CommandError(output, context);
|
|
1660
|
+
}
|
|
1661
|
+
const contents = map({
|
|
1662
|
+
$metadata: deserializeMetadata(output),
|
|
1663
|
+
});
|
|
1664
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1665
|
+
const doc = take(data, {
|
|
1666
|
+
marketplaceModelEndpoint: (_) => de_MarketplaceModelEndpoint(_, context),
|
|
1667
|
+
});
|
|
1668
|
+
Object.assign(contents, doc);
|
|
1669
|
+
return contents;
|
|
1670
|
+
};
|
|
1431
1671
|
export const de_UpdateProvisionedModelThroughputCommand = async (output, context) => {
|
|
1432
1672
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1433
1673
|
return de_CommandError(output, context);
|
|
@@ -1469,6 +1709,9 @@ const de_CommandError = async (output, context) => {
|
|
|
1469
1709
|
case "TooManyTagsException":
|
|
1470
1710
|
case "com.amazonaws.bedrock#TooManyTagsException":
|
|
1471
1711
|
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
1712
|
+
case "ServiceUnavailableException":
|
|
1713
|
+
case "com.amazonaws.bedrock#ServiceUnavailableException":
|
|
1714
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1472
1715
|
default:
|
|
1473
1716
|
const parsedBody = parsedOutput.body;
|
|
1474
1717
|
return throwDefaultError({
|
|
@@ -1544,6 +1787,19 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
1544
1787
|
});
|
|
1545
1788
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1546
1789
|
};
|
|
1790
|
+
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
1791
|
+
const contents = map({});
|
|
1792
|
+
const data = parsedOutput.body;
|
|
1793
|
+
const doc = take(data, {
|
|
1794
|
+
message: __expectString,
|
|
1795
|
+
});
|
|
1796
|
+
Object.assign(contents, doc);
|
|
1797
|
+
const exception = new ServiceUnavailableException({
|
|
1798
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1799
|
+
...contents,
|
|
1800
|
+
});
|
|
1801
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1802
|
+
};
|
|
1547
1803
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1548
1804
|
const contents = map({});
|
|
1549
1805
|
const data = parsedOutput.body;
|
|
@@ -2004,6 +2260,37 @@ const de_KnowledgeBaseVectorSearchConfiguration = (output, context) => {
|
|
|
2004
2260
|
overrideSearchType: __expectString,
|
|
2005
2261
|
});
|
|
2006
2262
|
};
|
|
2263
|
+
const de_MarketplaceModelEndpoint = (output, context) => {
|
|
2264
|
+
return take(output, {
|
|
2265
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2266
|
+
endpointArn: __expectString,
|
|
2267
|
+
endpointConfig: (_) => _json(__expectUnion(_)),
|
|
2268
|
+
endpointStatus: __expectString,
|
|
2269
|
+
endpointStatusMessage: __expectString,
|
|
2270
|
+
modelSourceIdentifier: __expectString,
|
|
2271
|
+
status: __expectString,
|
|
2272
|
+
statusMessage: __expectString,
|
|
2273
|
+
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2274
|
+
});
|
|
2275
|
+
};
|
|
2276
|
+
const de_MarketplaceModelEndpointSummaries = (output, context) => {
|
|
2277
|
+
const retVal = (output || [])
|
|
2278
|
+
.filter((e) => e != null)
|
|
2279
|
+
.map((entry) => {
|
|
2280
|
+
return de_MarketplaceModelEndpointSummary(entry, context);
|
|
2281
|
+
});
|
|
2282
|
+
return retVal;
|
|
2283
|
+
};
|
|
2284
|
+
const de_MarketplaceModelEndpointSummary = (output, context) => {
|
|
2285
|
+
return take(output, {
|
|
2286
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2287
|
+
endpointArn: __expectString,
|
|
2288
|
+
modelSourceIdentifier: __expectString,
|
|
2289
|
+
status: __expectString,
|
|
2290
|
+
statusMessage: __expectString,
|
|
2291
|
+
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2292
|
+
});
|
|
2293
|
+
};
|
|
2007
2294
|
const de_ModelCopyJobSummaries = (output, context) => {
|
|
2008
2295
|
const retVal = (output || [])
|
|
2009
2296
|
.filter((e) => e != null)
|
|
@@ -2096,6 +2383,28 @@ const de_ModelInvocationJobSummary = (output, context) => {
|
|
|
2096
2383
|
vpcConfig: _json,
|
|
2097
2384
|
});
|
|
2098
2385
|
};
|
|
2386
|
+
const de_PromptRouterSummaries = (output, context) => {
|
|
2387
|
+
const retVal = (output || [])
|
|
2388
|
+
.filter((e) => e != null)
|
|
2389
|
+
.map((entry) => {
|
|
2390
|
+
return de_PromptRouterSummary(entry, context);
|
|
2391
|
+
});
|
|
2392
|
+
return retVal;
|
|
2393
|
+
};
|
|
2394
|
+
const de_PromptRouterSummary = (output, context) => {
|
|
2395
|
+
return take(output, {
|
|
2396
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2397
|
+
description: __expectString,
|
|
2398
|
+
fallbackModel: _json,
|
|
2399
|
+
models: _json,
|
|
2400
|
+
promptRouterArn: __expectString,
|
|
2401
|
+
promptRouterName: __expectString,
|
|
2402
|
+
routingCriteria: (_) => de_RoutingCriteria(_, context),
|
|
2403
|
+
status: __expectString,
|
|
2404
|
+
type: __expectString,
|
|
2405
|
+
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2406
|
+
});
|
|
2407
|
+
};
|
|
2099
2408
|
const de_ProvisionedModelSummaries = (output, context) => {
|
|
2100
2409
|
const retVal = (output || [])
|
|
2101
2410
|
.filter((e) => e != null)
|
|
@@ -2225,6 +2534,11 @@ const de_RetrieveConfig = (output, context) => {
|
|
|
2225
2534
|
knowledgeBaseRetrievalConfiguration: (_) => de_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
2226
2535
|
});
|
|
2227
2536
|
};
|
|
2537
|
+
const de_RoutingCriteria = (output, context) => {
|
|
2538
|
+
return take(output, {
|
|
2539
|
+
responseQualityDifference: __limitedParseDouble,
|
|
2540
|
+
});
|
|
2541
|
+
};
|
|
2228
2542
|
const de_TextInferenceConfig = (output, context) => {
|
|
2229
2543
|
return take(output, {
|
|
2230
2544
|
maxTokens: __expectInt32,
|
|
@@ -2272,6 +2586,8 @@ const _gV = "guardrailVersion";
|
|
|
2272
2586
|
const _iO = "isOwned";
|
|
2273
2587
|
const _mAE = "modelArnEquals";
|
|
2274
2588
|
const _mR = "maxResults";
|
|
2589
|
+
const _mSE = "modelSourceEquals";
|
|
2590
|
+
const _mSI = "modelSourceIdentifier";
|
|
2275
2591
|
const _nC = "nameContains";
|
|
2276
2592
|
const _nT = "nextToken";
|
|
2277
2593
|
const _oMNC = "outputModelNameContains";
|