@aws-sdk/client-bedrock 3.422.1 → 3.423.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 +40 -0
- package/dist-cjs/Bedrock.js +10 -0
- package/dist-cjs/commands/CreateProvisionedModelThroughputCommand.js +51 -0
- package/dist-cjs/commands/DeleteProvisionedModelThroughputCommand.js +51 -0
- package/dist-cjs/commands/GetProvisionedModelThroughputCommand.js +51 -0
- package/dist-cjs/commands/ListProvisionedModelThroughputsCommand.js +51 -0
- package/dist-cjs/commands/UpdateProvisionedModelThroughputCommand.js +51 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +25 -12
- package/dist-cjs/pagination/ListProvisionedModelThroughputsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +386 -1
- package/dist-es/Bedrock.js +10 -0
- package/dist-es/commands/CreateProvisionedModelThroughputCommand.js +47 -0
- package/dist-es/commands/DeleteProvisionedModelThroughputCommand.js +47 -0
- package/dist-es/commands/GetProvisionedModelThroughputCommand.js +47 -0
- package/dist-es/commands/ListProvisionedModelThroughputsCommand.js +47 -0
- package/dist-es/commands/UpdateProvisionedModelThroughputCommand.js +47 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +22 -9
- package/dist-es/pagination/ListProvisionedModelThroughputsPaginator.js +25 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +376 -1
- package/dist-types/Bedrock.d.ts +35 -0
- package/dist-types/BedrockClient.d.ts +7 -2
- package/dist-types/commands/CreateModelCustomizationJobCommand.d.ts +8 -8
- package/dist-types/commands/CreateProvisionedModelThroughputCommand.d.ts +106 -0
- package/dist-types/commands/DeleteProvisionedModelThroughputCommand.d.ts +89 -0
- package/dist-types/commands/GetModelCustomizationJobCommand.d.ts +1 -1
- package/dist-types/commands/GetProvisionedModelThroughputCommand.d.ts +100 -0
- package/dist-types/commands/ListModelCustomizationJobsCommand.d.ts +1 -1
- package/dist-types/commands/ListProvisionedModelThroughputsCommand.d.ts +109 -0
- package/dist-types/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateProvisionedModelThroughputCommand.d.ts +88 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +370 -36
- package/dist-types/pagination/ListProvisionedModelThroughputsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
- package/dist-types/ts3.4/Bedrock.d.ts +363 -115
- package/dist-types/ts3.4/BedrockClient.d.ts +238 -182
- package/dist-types/ts3.4/commands/CreateModelCustomizationJobCommand.d.ts +42 -149
- package/dist-types/ts3.4/commands/CreateProvisionedModelThroughputCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteCustomModelCommand.d.ts +39 -89
- package/dist-types/ts3.4/commands/DeleteModelInvocationLoggingConfigurationCommand.d.ts +42 -78
- package/dist-types/ts3.4/commands/DeleteProvisionedModelThroughputCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetCustomModelCommand.d.ts +38 -118
- package/dist-types/ts3.4/commands/GetFoundationModelCommand.d.ts +39 -106
- package/dist-types/ts3.4/commands/GetModelCustomizationJobCommand.d.ts +42 -133
- package/dist-types/ts3.4/commands/GetModelInvocationLoggingConfigurationCommand.d.ts +42 -96
- package/dist-types/ts3.4/commands/GetProvisionedModelThroughputCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListCustomModelsCommand.d.ts +38 -103
- package/dist-types/ts3.4/commands/ListFoundationModelsCommand.d.ts +42 -108
- package/dist-types/ts3.4/commands/ListModelCustomizationJobsCommand.d.ts +42 -107
- package/dist-types/ts3.4/commands/ListProvisionedModelThroughputsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -94
- package/dist-types/ts3.4/commands/PutModelInvocationLoggingConfigurationCommand.d.ts +42 -99
- package/dist-types/ts3.4/commands/StopModelCustomizationJobCommand.d.ts +42 -89
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -96
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -89
- package/dist-types/ts3.4/commands/UpdateProvisionedModelThroughputCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/index.d.ts +20 -15
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -22
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -5
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -2
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -8
- package/dist-types/ts3.4/index.d.ts +7 -12
- package/dist-types/ts3.4/models/BedrockServiceException.d.ts +8 -13
- package/dist-types/ts3.4/models/index.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +412 -1144
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -8
- package/dist-types/ts3.4/pagination/ListCustomModelsPaginator.d.ts +11 -7
- package/dist-types/ts3.4/pagination/ListModelCustomizationJobsPaginator.d.ts +11 -7
- package/dist-types/ts3.4/pagination/ListProvisionedModelThroughputsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -3
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +245 -137
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +97 -46
- package/dist-types/ts3.4/runtimeConfig.d.ts +97 -46
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +88 -45
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -19
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -17
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopModelCustomizationJobCommand = exports.de_PutModelInvocationLoggingConfigurationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListModelCustomizationJobsCommand = exports.de_ListFoundationModelsCommand = exports.de_ListCustomModelsCommand = exports.de_GetModelInvocationLoggingConfigurationCommand = exports.de_GetModelCustomizationJobCommand = exports.de_GetFoundationModelCommand = exports.de_GetCustomModelCommand = exports.de_DeleteModelInvocationLoggingConfigurationCommand = exports.de_DeleteCustomModelCommand = exports.de_CreateModelCustomizationJobCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopModelCustomizationJobCommand = exports.se_PutModelInvocationLoggingConfigurationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListModelCustomizationJobsCommand = exports.se_ListFoundationModelsCommand = exports.se_ListCustomModelsCommand = exports.se_GetModelInvocationLoggingConfigurationCommand = exports.se_GetModelCustomizationJobCommand = exports.se_GetFoundationModelCommand = exports.se_GetCustomModelCommand = exports.se_DeleteModelInvocationLoggingConfigurationCommand = exports.se_DeleteCustomModelCommand = exports.se_CreateModelCustomizationJobCommand = void 0;
|
|
3
|
+
exports.de_UpdateProvisionedModelThroughputCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopModelCustomizationJobCommand = exports.de_PutModelInvocationLoggingConfigurationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListProvisionedModelThroughputsCommand = exports.de_ListModelCustomizationJobsCommand = exports.de_ListFoundationModelsCommand = exports.de_ListCustomModelsCommand = exports.de_GetProvisionedModelThroughputCommand = exports.de_GetModelInvocationLoggingConfigurationCommand = exports.de_GetModelCustomizationJobCommand = exports.de_GetFoundationModelCommand = exports.de_GetCustomModelCommand = exports.de_DeleteProvisionedModelThroughputCommand = exports.de_DeleteModelInvocationLoggingConfigurationCommand = exports.de_DeleteCustomModelCommand = exports.de_CreateProvisionedModelThroughputCommand = exports.de_CreateModelCustomizationJobCommand = exports.se_UpdateProvisionedModelThroughputCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopModelCustomizationJobCommand = exports.se_PutModelInvocationLoggingConfigurationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListProvisionedModelThroughputsCommand = exports.se_ListModelCustomizationJobsCommand = exports.se_ListFoundationModelsCommand = exports.se_ListCustomModelsCommand = exports.se_GetProvisionedModelThroughputCommand = exports.se_GetModelInvocationLoggingConfigurationCommand = exports.se_GetModelCustomizationJobCommand = exports.se_GetFoundationModelCommand = exports.se_GetCustomModelCommand = exports.se_DeleteProvisionedModelThroughputCommand = exports.se_DeleteModelInvocationLoggingConfigurationCommand = exports.se_DeleteCustomModelCommand = exports.se_CreateProvisionedModelThroughputCommand = exports.se_CreateModelCustomizationJobCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
@@ -39,6 +39,32 @@ const se_CreateModelCustomizationJobCommand = async (input, context) => {
|
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
exports.se_CreateModelCustomizationJobCommand = se_CreateModelCustomizationJobCommand;
|
|
42
|
+
const se_CreateProvisionedModelThroughputCommand = async (input, context) => {
|
|
43
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
44
|
+
const headers = {
|
|
45
|
+
"content-type": "application/json",
|
|
46
|
+
};
|
|
47
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/provisioned-model-throughput";
|
|
48
|
+
let body;
|
|
49
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
50
|
+
clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
51
|
+
commitmentDuration: [],
|
|
52
|
+
modelId: [],
|
|
53
|
+
modelUnits: [],
|
|
54
|
+
provisionedModelName: [],
|
|
55
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
56
|
+
}));
|
|
57
|
+
return new protocol_http_1.HttpRequest({
|
|
58
|
+
protocol,
|
|
59
|
+
hostname,
|
|
60
|
+
port,
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers,
|
|
63
|
+
path: resolvedPath,
|
|
64
|
+
body,
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
exports.se_CreateProvisionedModelThroughputCommand = se_CreateProvisionedModelThroughputCommand;
|
|
42
68
|
const se_DeleteCustomModelCommand = async (input, context) => {
|
|
43
69
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
44
70
|
const headers = {};
|
|
@@ -75,6 +101,24 @@ const se_DeleteModelInvocationLoggingConfigurationCommand = async (input, contex
|
|
|
75
101
|
});
|
|
76
102
|
};
|
|
77
103
|
exports.se_DeleteModelInvocationLoggingConfigurationCommand = se_DeleteModelInvocationLoggingConfigurationCommand;
|
|
104
|
+
const se_DeleteProvisionedModelThroughputCommand = async (input, context) => {
|
|
105
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
106
|
+
const headers = {};
|
|
107
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
108
|
+
"/provisioned-model-throughput/{provisionedModelId}";
|
|
109
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
|
|
110
|
+
let body;
|
|
111
|
+
return new protocol_http_1.HttpRequest({
|
|
112
|
+
protocol,
|
|
113
|
+
hostname,
|
|
114
|
+
port,
|
|
115
|
+
method: "DELETE",
|
|
116
|
+
headers,
|
|
117
|
+
path: resolvedPath,
|
|
118
|
+
body,
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
exports.se_DeleteProvisionedModelThroughputCommand = se_DeleteProvisionedModelThroughputCommand;
|
|
78
122
|
const se_GetCustomModelCommand = async (input, context) => {
|
|
79
123
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
80
124
|
const headers = {};
|
|
@@ -145,6 +189,24 @@ const se_GetModelInvocationLoggingConfigurationCommand = async (input, context)
|
|
|
145
189
|
});
|
|
146
190
|
};
|
|
147
191
|
exports.se_GetModelInvocationLoggingConfigurationCommand = se_GetModelInvocationLoggingConfigurationCommand;
|
|
192
|
+
const se_GetProvisionedModelThroughputCommand = async (input, context) => {
|
|
193
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
194
|
+
const headers = {};
|
|
195
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
196
|
+
"/provisioned-model-throughput/{provisionedModelId}";
|
|
197
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
|
|
198
|
+
let body;
|
|
199
|
+
return new protocol_http_1.HttpRequest({
|
|
200
|
+
protocol,
|
|
201
|
+
hostname,
|
|
202
|
+
port,
|
|
203
|
+
method: "GET",
|
|
204
|
+
headers,
|
|
205
|
+
path: resolvedPath,
|
|
206
|
+
body,
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
exports.se_GetProvisionedModelThroughputCommand = se_GetProvisionedModelThroughputCommand;
|
|
148
210
|
const se_ListCustomModelsCommand = async (input, context) => {
|
|
149
211
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
150
212
|
const headers = {};
|
|
@@ -235,6 +297,40 @@ const se_ListModelCustomizationJobsCommand = async (input, context) => {
|
|
|
235
297
|
});
|
|
236
298
|
};
|
|
237
299
|
exports.se_ListModelCustomizationJobsCommand = se_ListModelCustomizationJobsCommand;
|
|
300
|
+
const se_ListProvisionedModelThroughputsCommand = async (input, context) => {
|
|
301
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
302
|
+
const headers = {};
|
|
303
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/provisioned-model-throughputs";
|
|
304
|
+
const query = (0, smithy_client_1.map)({
|
|
305
|
+
creationTimeAfter: [
|
|
306
|
+
() => input.creationTimeAfter !== void 0,
|
|
307
|
+
() => (input.creationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
308
|
+
],
|
|
309
|
+
creationTimeBefore: [
|
|
310
|
+
() => input.creationTimeBefore !== void 0,
|
|
311
|
+
() => (input.creationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
312
|
+
],
|
|
313
|
+
statusEquals: [, input.statusEquals],
|
|
314
|
+
modelArnEquals: [, input.modelArnEquals],
|
|
315
|
+
nameContains: [, input.nameContains],
|
|
316
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
317
|
+
nextToken: [, input.nextToken],
|
|
318
|
+
sortBy: [, input.sortBy],
|
|
319
|
+
sortOrder: [, input.sortOrder],
|
|
320
|
+
});
|
|
321
|
+
let body;
|
|
322
|
+
return new protocol_http_1.HttpRequest({
|
|
323
|
+
protocol,
|
|
324
|
+
hostname,
|
|
325
|
+
port,
|
|
326
|
+
method: "GET",
|
|
327
|
+
headers,
|
|
328
|
+
path: resolvedPath,
|
|
329
|
+
query,
|
|
330
|
+
body,
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
exports.se_ListProvisionedModelThroughputsCommand = se_ListProvisionedModelThroughputsCommand;
|
|
238
334
|
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
239
335
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
240
336
|
const headers = {
|
|
@@ -339,6 +435,30 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
339
435
|
});
|
|
340
436
|
};
|
|
341
437
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
438
|
+
const se_UpdateProvisionedModelThroughputCommand = async (input, context) => {
|
|
439
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
440
|
+
const headers = {
|
|
441
|
+
"content-type": "application/json",
|
|
442
|
+
};
|
|
443
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
444
|
+
"/provisioned-model-throughput/{provisionedModelId}";
|
|
445
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
|
|
446
|
+
let body;
|
|
447
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
448
|
+
desiredModelId: [],
|
|
449
|
+
desiredProvisionedModelName: [],
|
|
450
|
+
}));
|
|
451
|
+
return new protocol_http_1.HttpRequest({
|
|
452
|
+
protocol,
|
|
453
|
+
hostname,
|
|
454
|
+
port,
|
|
455
|
+
method: "PATCH",
|
|
456
|
+
headers,
|
|
457
|
+
path: resolvedPath,
|
|
458
|
+
body,
|
|
459
|
+
});
|
|
460
|
+
};
|
|
461
|
+
exports.se_UpdateProvisionedModelThroughputCommand = se_UpdateProvisionedModelThroughputCommand;
|
|
342
462
|
const de_CreateModelCustomizationJobCommand = async (output, context) => {
|
|
343
463
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
344
464
|
return de_CreateModelCustomizationJobCommandError(output, context);
|
|
@@ -394,6 +514,58 @@ const de_CreateModelCustomizationJobCommandError = async (output, context) => {
|
|
|
394
514
|
});
|
|
395
515
|
}
|
|
396
516
|
};
|
|
517
|
+
const de_CreateProvisionedModelThroughputCommand = async (output, context) => {
|
|
518
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
519
|
+
return de_CreateProvisionedModelThroughputCommandError(output, context);
|
|
520
|
+
}
|
|
521
|
+
const contents = (0, smithy_client_1.map)({
|
|
522
|
+
$metadata: deserializeMetadata(output),
|
|
523
|
+
});
|
|
524
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
525
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
526
|
+
provisionedModelArn: smithy_client_1.expectString,
|
|
527
|
+
});
|
|
528
|
+
Object.assign(contents, doc);
|
|
529
|
+
return contents;
|
|
530
|
+
};
|
|
531
|
+
exports.de_CreateProvisionedModelThroughputCommand = de_CreateProvisionedModelThroughputCommand;
|
|
532
|
+
const de_CreateProvisionedModelThroughputCommandError = async (output, context) => {
|
|
533
|
+
const parsedOutput = {
|
|
534
|
+
...output,
|
|
535
|
+
body: await parseErrorBody(output.body, context),
|
|
536
|
+
};
|
|
537
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
538
|
+
switch (errorCode) {
|
|
539
|
+
case "AccessDeniedException":
|
|
540
|
+
case "com.amazonaws.bedrock#AccessDeniedException":
|
|
541
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
542
|
+
case "InternalServerException":
|
|
543
|
+
case "com.amazonaws.bedrock#InternalServerException":
|
|
544
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
545
|
+
case "ResourceNotFoundException":
|
|
546
|
+
case "com.amazonaws.bedrock#ResourceNotFoundException":
|
|
547
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
548
|
+
case "ServiceQuotaExceededException":
|
|
549
|
+
case "com.amazonaws.bedrock#ServiceQuotaExceededException":
|
|
550
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
551
|
+
case "ThrottlingException":
|
|
552
|
+
case "com.amazonaws.bedrock#ThrottlingException":
|
|
553
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
554
|
+
case "TooManyTagsException":
|
|
555
|
+
case "com.amazonaws.bedrock#TooManyTagsException":
|
|
556
|
+
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
557
|
+
case "ValidationException":
|
|
558
|
+
case "com.amazonaws.bedrock#ValidationException":
|
|
559
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
560
|
+
default:
|
|
561
|
+
const parsedBody = parsedOutput.body;
|
|
562
|
+
return throwDefaultError({
|
|
563
|
+
output,
|
|
564
|
+
parsedBody,
|
|
565
|
+
errorCode,
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
};
|
|
397
569
|
const de_DeleteCustomModelCommand = async (output, context) => {
|
|
398
570
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
399
571
|
return de_DeleteCustomModelCommandError(output, context);
|
|
@@ -475,6 +647,51 @@ const de_DeleteModelInvocationLoggingConfigurationCommandError = async (output,
|
|
|
475
647
|
});
|
|
476
648
|
}
|
|
477
649
|
};
|
|
650
|
+
const de_DeleteProvisionedModelThroughputCommand = async (output, context) => {
|
|
651
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
652
|
+
return de_DeleteProvisionedModelThroughputCommandError(output, context);
|
|
653
|
+
}
|
|
654
|
+
const contents = (0, smithy_client_1.map)({
|
|
655
|
+
$metadata: deserializeMetadata(output),
|
|
656
|
+
});
|
|
657
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
658
|
+
return contents;
|
|
659
|
+
};
|
|
660
|
+
exports.de_DeleteProvisionedModelThroughputCommand = de_DeleteProvisionedModelThroughputCommand;
|
|
661
|
+
const de_DeleteProvisionedModelThroughputCommandError = async (output, context) => {
|
|
662
|
+
const parsedOutput = {
|
|
663
|
+
...output,
|
|
664
|
+
body: await parseErrorBody(output.body, context),
|
|
665
|
+
};
|
|
666
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
667
|
+
switch (errorCode) {
|
|
668
|
+
case "AccessDeniedException":
|
|
669
|
+
case "com.amazonaws.bedrock#AccessDeniedException":
|
|
670
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
671
|
+
case "ConflictException":
|
|
672
|
+
case "com.amazonaws.bedrock#ConflictException":
|
|
673
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
674
|
+
case "InternalServerException":
|
|
675
|
+
case "com.amazonaws.bedrock#InternalServerException":
|
|
676
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
677
|
+
case "ResourceNotFoundException":
|
|
678
|
+
case "com.amazonaws.bedrock#ResourceNotFoundException":
|
|
679
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
680
|
+
case "ThrottlingException":
|
|
681
|
+
case "com.amazonaws.bedrock#ThrottlingException":
|
|
682
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
683
|
+
case "ValidationException":
|
|
684
|
+
case "com.amazonaws.bedrock#ValidationException":
|
|
685
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
686
|
+
default:
|
|
687
|
+
const parsedBody = parsedOutput.body;
|
|
688
|
+
return throwDefaultError({
|
|
689
|
+
output,
|
|
690
|
+
parsedBody,
|
|
691
|
+
errorCode,
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
};
|
|
478
695
|
const de_GetCustomModelCommand = async (output, context) => {
|
|
479
696
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
480
697
|
return de_GetCustomModelCommandError(output, context);
|
|
@@ -684,6 +901,64 @@ const de_GetModelInvocationLoggingConfigurationCommandError = async (output, con
|
|
|
684
901
|
});
|
|
685
902
|
}
|
|
686
903
|
};
|
|
904
|
+
const de_GetProvisionedModelThroughputCommand = async (output, context) => {
|
|
905
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
906
|
+
return de_GetProvisionedModelThroughputCommandError(output, context);
|
|
907
|
+
}
|
|
908
|
+
const contents = (0, smithy_client_1.map)({
|
|
909
|
+
$metadata: deserializeMetadata(output),
|
|
910
|
+
});
|
|
911
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
912
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
913
|
+
commitmentDuration: smithy_client_1.expectString,
|
|
914
|
+
commitmentExpirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
915
|
+
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
916
|
+
desiredModelArn: smithy_client_1.expectString,
|
|
917
|
+
desiredModelUnits: smithy_client_1.expectInt32,
|
|
918
|
+
failureMessage: smithy_client_1.expectString,
|
|
919
|
+
foundationModelArn: smithy_client_1.expectString,
|
|
920
|
+
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
921
|
+
modelArn: smithy_client_1.expectString,
|
|
922
|
+
modelUnits: smithy_client_1.expectInt32,
|
|
923
|
+
provisionedModelArn: smithy_client_1.expectString,
|
|
924
|
+
provisionedModelName: smithy_client_1.expectString,
|
|
925
|
+
status: smithy_client_1.expectString,
|
|
926
|
+
});
|
|
927
|
+
Object.assign(contents, doc);
|
|
928
|
+
return contents;
|
|
929
|
+
};
|
|
930
|
+
exports.de_GetProvisionedModelThroughputCommand = de_GetProvisionedModelThroughputCommand;
|
|
931
|
+
const de_GetProvisionedModelThroughputCommandError = async (output, context) => {
|
|
932
|
+
const parsedOutput = {
|
|
933
|
+
...output,
|
|
934
|
+
body: await parseErrorBody(output.body, context),
|
|
935
|
+
};
|
|
936
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
937
|
+
switch (errorCode) {
|
|
938
|
+
case "AccessDeniedException":
|
|
939
|
+
case "com.amazonaws.bedrock#AccessDeniedException":
|
|
940
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
941
|
+
case "InternalServerException":
|
|
942
|
+
case "com.amazonaws.bedrock#InternalServerException":
|
|
943
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
944
|
+
case "ResourceNotFoundException":
|
|
945
|
+
case "com.amazonaws.bedrock#ResourceNotFoundException":
|
|
946
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
947
|
+
case "ThrottlingException":
|
|
948
|
+
case "com.amazonaws.bedrock#ThrottlingException":
|
|
949
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
950
|
+
case "ValidationException":
|
|
951
|
+
case "com.amazonaws.bedrock#ValidationException":
|
|
952
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
953
|
+
default:
|
|
954
|
+
const parsedBody = parsedOutput.body;
|
|
955
|
+
return throwDefaultError({
|
|
956
|
+
output,
|
|
957
|
+
parsedBody,
|
|
958
|
+
errorCode,
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
};
|
|
687
962
|
const de_ListCustomModelsCommand = async (output, context) => {
|
|
688
963
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
689
964
|
return de_ListCustomModelsCommandError(output, context);
|
|
@@ -815,6 +1090,50 @@ const de_ListModelCustomizationJobsCommandError = async (output, context) => {
|
|
|
815
1090
|
});
|
|
816
1091
|
}
|
|
817
1092
|
};
|
|
1093
|
+
const de_ListProvisionedModelThroughputsCommand = async (output, context) => {
|
|
1094
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1095
|
+
return de_ListProvisionedModelThroughputsCommandError(output, context);
|
|
1096
|
+
}
|
|
1097
|
+
const contents = (0, smithy_client_1.map)({
|
|
1098
|
+
$metadata: deserializeMetadata(output),
|
|
1099
|
+
});
|
|
1100
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1101
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1102
|
+
nextToken: smithy_client_1.expectString,
|
|
1103
|
+
provisionedModelSummaries: (_) => de_ProvisionedModelSummaries(_, context),
|
|
1104
|
+
});
|
|
1105
|
+
Object.assign(contents, doc);
|
|
1106
|
+
return contents;
|
|
1107
|
+
};
|
|
1108
|
+
exports.de_ListProvisionedModelThroughputsCommand = de_ListProvisionedModelThroughputsCommand;
|
|
1109
|
+
const de_ListProvisionedModelThroughputsCommandError = async (output, context) => {
|
|
1110
|
+
const parsedOutput = {
|
|
1111
|
+
...output,
|
|
1112
|
+
body: await parseErrorBody(output.body, context),
|
|
1113
|
+
};
|
|
1114
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1115
|
+
switch (errorCode) {
|
|
1116
|
+
case "AccessDeniedException":
|
|
1117
|
+
case "com.amazonaws.bedrock#AccessDeniedException":
|
|
1118
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1119
|
+
case "InternalServerException":
|
|
1120
|
+
case "com.amazonaws.bedrock#InternalServerException":
|
|
1121
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1122
|
+
case "ThrottlingException":
|
|
1123
|
+
case "com.amazonaws.bedrock#ThrottlingException":
|
|
1124
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1125
|
+
case "ValidationException":
|
|
1126
|
+
case "com.amazonaws.bedrock#ValidationException":
|
|
1127
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1128
|
+
default:
|
|
1129
|
+
const parsedBody = parsedOutput.body;
|
|
1130
|
+
return throwDefaultError({
|
|
1131
|
+
output,
|
|
1132
|
+
parsedBody,
|
|
1133
|
+
errorCode,
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
818
1137
|
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
819
1138
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
820
1139
|
return de_ListTagsForResourceCommandError(output, context);
|
|
@@ -1032,6 +1351,48 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
1032
1351
|
});
|
|
1033
1352
|
}
|
|
1034
1353
|
};
|
|
1354
|
+
const de_UpdateProvisionedModelThroughputCommand = async (output, context) => {
|
|
1355
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1356
|
+
return de_UpdateProvisionedModelThroughputCommandError(output, context);
|
|
1357
|
+
}
|
|
1358
|
+
const contents = (0, smithy_client_1.map)({
|
|
1359
|
+
$metadata: deserializeMetadata(output),
|
|
1360
|
+
});
|
|
1361
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1362
|
+
return contents;
|
|
1363
|
+
};
|
|
1364
|
+
exports.de_UpdateProvisionedModelThroughputCommand = de_UpdateProvisionedModelThroughputCommand;
|
|
1365
|
+
const de_UpdateProvisionedModelThroughputCommandError = async (output, context) => {
|
|
1366
|
+
const parsedOutput = {
|
|
1367
|
+
...output,
|
|
1368
|
+
body: await parseErrorBody(output.body, context),
|
|
1369
|
+
};
|
|
1370
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1371
|
+
switch (errorCode) {
|
|
1372
|
+
case "AccessDeniedException":
|
|
1373
|
+
case "com.amazonaws.bedrock#AccessDeniedException":
|
|
1374
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1375
|
+
case "InternalServerException":
|
|
1376
|
+
case "com.amazonaws.bedrock#InternalServerException":
|
|
1377
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1378
|
+
case "ResourceNotFoundException":
|
|
1379
|
+
case "com.amazonaws.bedrock#ResourceNotFoundException":
|
|
1380
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1381
|
+
case "ThrottlingException":
|
|
1382
|
+
case "com.amazonaws.bedrock#ThrottlingException":
|
|
1383
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1384
|
+
case "ValidationException":
|
|
1385
|
+
case "com.amazonaws.bedrock#ValidationException":
|
|
1386
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1387
|
+
default:
|
|
1388
|
+
const parsedBody = parsedOutput.body;
|
|
1389
|
+
return throwDefaultError({
|
|
1390
|
+
output,
|
|
1391
|
+
parsedBody,
|
|
1392
|
+
errorCode,
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
};
|
|
1035
1396
|
const throwDefaultError = (0, smithy_client_1.withBaseException)(BedrockServiceException_1.BedrockServiceException);
|
|
1036
1397
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1037
1398
|
const contents = (0, smithy_client_1.map)({});
|
|
@@ -1176,6 +1537,30 @@ const de_ModelCustomizationJobSummary = (output, context) => {
|
|
|
1176
1537
|
status: smithy_client_1.expectString,
|
|
1177
1538
|
});
|
|
1178
1539
|
};
|
|
1540
|
+
const de_ProvisionedModelSummaries = (output, context) => {
|
|
1541
|
+
const retVal = (output || [])
|
|
1542
|
+
.filter((e) => e != null)
|
|
1543
|
+
.map((entry) => {
|
|
1544
|
+
return de_ProvisionedModelSummary(entry, context);
|
|
1545
|
+
});
|
|
1546
|
+
return retVal;
|
|
1547
|
+
};
|
|
1548
|
+
const de_ProvisionedModelSummary = (output, context) => {
|
|
1549
|
+
return (0, smithy_client_1.take)(output, {
|
|
1550
|
+
commitmentDuration: smithy_client_1.expectString,
|
|
1551
|
+
commitmentExpirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1552
|
+
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1553
|
+
desiredModelArn: smithy_client_1.expectString,
|
|
1554
|
+
desiredModelUnits: smithy_client_1.expectInt32,
|
|
1555
|
+
foundationModelArn: smithy_client_1.expectString,
|
|
1556
|
+
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1557
|
+
modelArn: smithy_client_1.expectString,
|
|
1558
|
+
modelUnits: smithy_client_1.expectInt32,
|
|
1559
|
+
provisionedModelArn: smithy_client_1.expectString,
|
|
1560
|
+
provisionedModelName: smithy_client_1.expectString,
|
|
1561
|
+
status: smithy_client_1.expectString,
|
|
1562
|
+
});
|
|
1563
|
+
};
|
|
1179
1564
|
const de_TrainingMetrics = (output, context) => {
|
|
1180
1565
|
return (0, smithy_client_1.take)(output, {
|
|
1181
1566
|
trainingLoss: smithy_client_1.limitedParseFloat32,
|
package/dist-es/Bedrock.js
CHANGED
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
2
2
|
import { BedrockClient } from "./BedrockClient";
|
|
3
3
|
import { CreateModelCustomizationJobCommand, } from "./commands/CreateModelCustomizationJobCommand";
|
|
4
|
+
import { CreateProvisionedModelThroughputCommand, } from "./commands/CreateProvisionedModelThroughputCommand";
|
|
4
5
|
import { DeleteCustomModelCommand, } from "./commands/DeleteCustomModelCommand";
|
|
5
6
|
import { DeleteModelInvocationLoggingConfigurationCommand, } from "./commands/DeleteModelInvocationLoggingConfigurationCommand";
|
|
7
|
+
import { DeleteProvisionedModelThroughputCommand, } from "./commands/DeleteProvisionedModelThroughputCommand";
|
|
6
8
|
import { GetCustomModelCommand, } from "./commands/GetCustomModelCommand";
|
|
7
9
|
import { GetFoundationModelCommand, } from "./commands/GetFoundationModelCommand";
|
|
8
10
|
import { GetModelCustomizationJobCommand, } from "./commands/GetModelCustomizationJobCommand";
|
|
9
11
|
import { GetModelInvocationLoggingConfigurationCommand, } from "./commands/GetModelInvocationLoggingConfigurationCommand";
|
|
12
|
+
import { GetProvisionedModelThroughputCommand, } from "./commands/GetProvisionedModelThroughputCommand";
|
|
10
13
|
import { ListCustomModelsCommand, } from "./commands/ListCustomModelsCommand";
|
|
11
14
|
import { ListFoundationModelsCommand, } from "./commands/ListFoundationModelsCommand";
|
|
12
15
|
import { ListModelCustomizationJobsCommand, } from "./commands/ListModelCustomizationJobsCommand";
|
|
16
|
+
import { ListProvisionedModelThroughputsCommand, } from "./commands/ListProvisionedModelThroughputsCommand";
|
|
13
17
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
14
18
|
import { PutModelInvocationLoggingConfigurationCommand, } from "./commands/PutModelInvocationLoggingConfigurationCommand";
|
|
15
19
|
import { StopModelCustomizationJobCommand, } from "./commands/StopModelCustomizationJobCommand";
|
|
16
20
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
17
21
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
22
|
+
import { UpdateProvisionedModelThroughputCommand, } from "./commands/UpdateProvisionedModelThroughputCommand";
|
|
18
23
|
const commands = {
|
|
19
24
|
CreateModelCustomizationJobCommand,
|
|
25
|
+
CreateProvisionedModelThroughputCommand,
|
|
20
26
|
DeleteCustomModelCommand,
|
|
21
27
|
DeleteModelInvocationLoggingConfigurationCommand,
|
|
28
|
+
DeleteProvisionedModelThroughputCommand,
|
|
22
29
|
GetCustomModelCommand,
|
|
23
30
|
GetFoundationModelCommand,
|
|
24
31
|
GetModelCustomizationJobCommand,
|
|
25
32
|
GetModelInvocationLoggingConfigurationCommand,
|
|
33
|
+
GetProvisionedModelThroughputCommand,
|
|
26
34
|
ListCustomModelsCommand,
|
|
27
35
|
ListFoundationModelsCommand,
|
|
28
36
|
ListModelCustomizationJobsCommand,
|
|
37
|
+
ListProvisionedModelThroughputsCommand,
|
|
29
38
|
ListTagsForResourceCommand,
|
|
30
39
|
PutModelInvocationLoggingConfigurationCommand,
|
|
31
40
|
StopModelCustomizationJobCommand,
|
|
32
41
|
TagResourceCommand,
|
|
33
42
|
UntagResourceCommand,
|
|
43
|
+
UpdateProvisionedModelThroughputCommand,
|
|
34
44
|
};
|
|
35
45
|
export class Bedrock extends BedrockClient {
|
|
36
46
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_CreateProvisionedModelThroughputCommand, se_CreateProvisionedModelThroughputCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class CreateProvisionedModelThroughputCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, CreateProvisionedModelThroughputCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "BedrockClient";
|
|
26
|
+
const commandName = "CreateProvisionedModelThroughputCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonBedrockControlPlaneService",
|
|
35
|
+
operation: "CreateProvisionedModelThroughput",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_CreateProvisionedModelThroughputCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_CreateProvisionedModelThroughputCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_DeleteProvisionedModelThroughputCommand, se_DeleteProvisionedModelThroughputCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteProvisionedModelThroughputCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, DeleteProvisionedModelThroughputCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "BedrockClient";
|
|
26
|
+
const commandName = "DeleteProvisionedModelThroughputCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonBedrockControlPlaneService",
|
|
35
|
+
operation: "DeleteProvisionedModelThroughput",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_DeleteProvisionedModelThroughputCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_DeleteProvisionedModelThroughputCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_GetProvisionedModelThroughputCommand, se_GetProvisionedModelThroughputCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetProvisionedModelThroughputCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetProvisionedModelThroughputCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "BedrockClient";
|
|
26
|
+
const commandName = "GetProvisionedModelThroughputCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonBedrockControlPlaneService",
|
|
35
|
+
operation: "GetProvisionedModelThroughput",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_GetProvisionedModelThroughputCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_GetProvisionedModelThroughputCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|