Skip to content

Commit 82332ab

Browse files
author
awstools
committed
feat(client-bedrock): Amazon Bedrock Batch Inference/ Model Invocation is a feature which allows customers to asynchronously run inference on a large set of records/files stored in S3.
1 parent 20c4094 commit 82332ab

13 files changed

+2271
-43
lines changed

clients/client-bedrock/README.md

+32
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,14 @@ CreateModelCustomizationJob
242242

243243
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/CreateModelCustomizationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateModelCustomizationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateModelCustomizationJobCommandOutput/)
244244

245+
</details>
246+
<details>
247+
<summary>
248+
CreateModelInvocationJob
249+
</summary>
250+
251+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/CreateModelInvocationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateModelInvocationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateModelInvocationJobCommandOutput/)
252+
245253
</details>
246254
<details>
247255
<summary>
@@ -330,6 +338,14 @@ GetModelCustomizationJob
330338

331339
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/GetModelCustomizationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetModelCustomizationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetModelCustomizationJobCommandOutput/)
332340

341+
</details>
342+
<details>
343+
<summary>
344+
GetModelInvocationJob
345+
</summary>
346+
347+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/GetModelInvocationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetModelInvocationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetModelInvocationJobCommandOutput/)
348+
333349
</details>
334350
<details>
335351
<summary>
@@ -394,6 +410,14 @@ ListModelCustomizationJobs
394410

395411
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/ListModelCustomizationJobsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListModelCustomizationJobsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListModelCustomizationJobsCommandOutput/)
396412

413+
</details>
414+
<details>
415+
<summary>
416+
ListModelInvocationJobs
417+
</summary>
418+
419+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/ListModelInvocationJobsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListModelInvocationJobsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListModelInvocationJobsCommandOutput/)
420+
397421
</details>
398422
<details>
399423
<summary>
@@ -434,6 +458,14 @@ StopModelCustomizationJob
434458

435459
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/StopModelCustomizationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/StopModelCustomizationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/StopModelCustomizationJobCommandOutput/)
436460

461+
</details>
462+
<details>
463+
<summary>
464+
StopModelInvocationJob
465+
</summary>
466+
467+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/StopModelInvocationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/StopModelInvocationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/StopModelInvocationJobCommandOutput/)
468+
437469
</details>
438470
<details>
439471
<summary>

clients/client-bedrock/src/Bedrock.ts

+93
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ import {
2828
CreateModelCustomizationJobCommandInput,
2929
CreateModelCustomizationJobCommandOutput,
3030
} from "./commands/CreateModelCustomizationJobCommand";
31+
import {
32+
CreateModelInvocationJobCommand,
33+
CreateModelInvocationJobCommandInput,
34+
CreateModelInvocationJobCommandOutput,
35+
} from "./commands/CreateModelInvocationJobCommand";
3136
import {
3237
CreateProvisionedModelThroughputCommand,
3338
CreateProvisionedModelThroughputCommandInput,
@@ -83,6 +88,11 @@ import {
8388
GetModelCustomizationJobCommandInput,
8489
GetModelCustomizationJobCommandOutput,
8590
} from "./commands/GetModelCustomizationJobCommand";
91+
import {
92+
GetModelInvocationJobCommand,
93+
GetModelInvocationJobCommandInput,
94+
GetModelInvocationJobCommandOutput,
95+
} from "./commands/GetModelInvocationJobCommand";
8696
import {
8797
GetModelInvocationLoggingConfigurationCommand,
8898
GetModelInvocationLoggingConfigurationCommandInput,
@@ -123,6 +133,11 @@ import {
123133
ListModelCustomizationJobsCommandInput,
124134
ListModelCustomizationJobsCommandOutput,
125135
} from "./commands/ListModelCustomizationJobsCommand";
136+
import {
137+
ListModelInvocationJobsCommand,
138+
ListModelInvocationJobsCommandInput,
139+
ListModelInvocationJobsCommandOutput,
140+
} from "./commands/ListModelInvocationJobsCommand";
126141
import {
127142
ListProvisionedModelThroughputsCommand,
128143
ListProvisionedModelThroughputsCommandInput,
@@ -148,6 +163,11 @@ import {
148163
StopModelCustomizationJobCommandInput,
149164
StopModelCustomizationJobCommandOutput,
150165
} from "./commands/StopModelCustomizationJobCommand";
166+
import {
167+
StopModelInvocationJobCommand,
168+
StopModelInvocationJobCommandInput,
169+
StopModelInvocationJobCommandOutput,
170+
} from "./commands/StopModelInvocationJobCommand";
151171
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
152172
import {
153173
UntagResourceCommand,
@@ -171,6 +191,7 @@ const commands = {
171191
CreateGuardrailVersionCommand,
172192
CreateModelCopyJobCommand,
173193
CreateModelCustomizationJobCommand,
194+
CreateModelInvocationJobCommand,
174195
CreateProvisionedModelThroughputCommand,
175196
DeleteCustomModelCommand,
176197
DeleteGuardrailCommand,
@@ -182,6 +203,7 @@ const commands = {
182203
GetGuardrailCommand,
183204
GetModelCopyJobCommand,
184205
GetModelCustomizationJobCommand,
206+
GetModelInvocationJobCommand,
185207
GetModelInvocationLoggingConfigurationCommand,
186208
GetProvisionedModelThroughputCommand,
187209
ListCustomModelsCommand,
@@ -190,11 +212,13 @@ const commands = {
190212
ListGuardrailsCommand,
191213
ListModelCopyJobsCommand,
192214
ListModelCustomizationJobsCommand,
215+
ListModelInvocationJobsCommand,
193216
ListProvisionedModelThroughputsCommand,
194217
ListTagsForResourceCommand,
195218
PutModelInvocationLoggingConfigurationCommand,
196219
StopEvaluationJobCommand,
197220
StopModelCustomizationJobCommand,
221+
StopModelInvocationJobCommand,
198222
TagResourceCommand,
199223
UntagResourceCommand,
200224
UpdateGuardrailCommand,
@@ -284,6 +308,23 @@ export interface Bedrock {
284308
cb: (err: any, data?: CreateModelCustomizationJobCommandOutput) => void
285309
): void;
286310

311+
/**
312+
* @see {@link CreateModelInvocationJobCommand}
313+
*/
314+
createModelInvocationJob(
315+
args: CreateModelInvocationJobCommandInput,
316+
options?: __HttpHandlerOptions
317+
): Promise<CreateModelInvocationJobCommandOutput>;
318+
createModelInvocationJob(
319+
args: CreateModelInvocationJobCommandInput,
320+
cb: (err: any, data?: CreateModelInvocationJobCommandOutput) => void
321+
): void;
322+
createModelInvocationJob(
323+
args: CreateModelInvocationJobCommandInput,
324+
options: __HttpHandlerOptions,
325+
cb: (err: any, data?: CreateModelInvocationJobCommandOutput) => void
326+
): void;
327+
287328
/**
288329
* @see {@link CreateProvisionedModelThroughputCommand}
289330
*/
@@ -457,6 +498,23 @@ export interface Bedrock {
457498
cb: (err: any, data?: GetModelCustomizationJobCommandOutput) => void
458499
): void;
459500

501+
/**
502+
* @see {@link GetModelInvocationJobCommand}
503+
*/
504+
getModelInvocationJob(
505+
args: GetModelInvocationJobCommandInput,
506+
options?: __HttpHandlerOptions
507+
): Promise<GetModelInvocationJobCommandOutput>;
508+
getModelInvocationJob(
509+
args: GetModelInvocationJobCommandInput,
510+
cb: (err: any, data?: GetModelInvocationJobCommandOutput) => void
511+
): void;
512+
getModelInvocationJob(
513+
args: GetModelInvocationJobCommandInput,
514+
options: __HttpHandlerOptions,
515+
cb: (err: any, data?: GetModelInvocationJobCommandOutput) => void
516+
): void;
517+
460518
/**
461519
* @see {@link GetModelInvocationLoggingConfigurationCommand}
462520
*/
@@ -597,6 +655,24 @@ export interface Bedrock {
597655
cb: (err: any, data?: ListModelCustomizationJobsCommandOutput) => void
598656
): void;
599657

658+
/**
659+
* @see {@link ListModelInvocationJobsCommand}
660+
*/
661+
listModelInvocationJobs(): Promise<ListModelInvocationJobsCommandOutput>;
662+
listModelInvocationJobs(
663+
args: ListModelInvocationJobsCommandInput,
664+
options?: __HttpHandlerOptions
665+
): Promise<ListModelInvocationJobsCommandOutput>;
666+
listModelInvocationJobs(
667+
args: ListModelInvocationJobsCommandInput,
668+
cb: (err: any, data?: ListModelInvocationJobsCommandOutput) => void
669+
): void;
670+
listModelInvocationJobs(
671+
args: ListModelInvocationJobsCommandInput,
672+
options: __HttpHandlerOptions,
673+
cb: (err: any, data?: ListModelInvocationJobsCommandOutput) => void
674+
): void;
675+
600676
/**
601677
* @see {@link ListProvisionedModelThroughputsCommand}
602678
*/
@@ -683,6 +759,23 @@ export interface Bedrock {
683759
cb: (err: any, data?: StopModelCustomizationJobCommandOutput) => void
684760
): void;
685761

762+
/**
763+
* @see {@link StopModelInvocationJobCommand}
764+
*/
765+
stopModelInvocationJob(
766+
args: StopModelInvocationJobCommandInput,
767+
options?: __HttpHandlerOptions
768+
): Promise<StopModelInvocationJobCommandOutput>;
769+
stopModelInvocationJob(
770+
args: StopModelInvocationJobCommandInput,
771+
cb: (err: any, data?: StopModelInvocationJobCommandOutput) => void
772+
): void;
773+
stopModelInvocationJob(
774+
args: StopModelInvocationJobCommandInput,
775+
options: __HttpHandlerOptions,
776+
cb: (err: any, data?: StopModelInvocationJobCommandOutput) => void
777+
): void;
778+
686779
/**
687780
* @see {@link TagResourceCommand}
688781
*/

clients/client-bedrock/src/BedrockClient.ts

+24
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ import {
6767
CreateModelCustomizationJobCommandInput,
6868
CreateModelCustomizationJobCommandOutput,
6969
} from "./commands/CreateModelCustomizationJobCommand";
70+
import {
71+
CreateModelInvocationJobCommandInput,
72+
CreateModelInvocationJobCommandOutput,
73+
} from "./commands/CreateModelInvocationJobCommand";
7074
import {
7175
CreateProvisionedModelThroughputCommandInput,
7276
CreateProvisionedModelThroughputCommandOutput,
@@ -90,6 +94,10 @@ import {
9094
GetModelCustomizationJobCommandInput,
9195
GetModelCustomizationJobCommandOutput,
9296
} from "./commands/GetModelCustomizationJobCommand";
97+
import {
98+
GetModelInvocationJobCommandInput,
99+
GetModelInvocationJobCommandOutput,
100+
} from "./commands/GetModelInvocationJobCommand";
93101
import {
94102
GetModelInvocationLoggingConfigurationCommandInput,
95103
GetModelInvocationLoggingConfigurationCommandOutput,
@@ -110,6 +118,10 @@ import {
110118
ListModelCustomizationJobsCommandInput,
111119
ListModelCustomizationJobsCommandOutput,
112120
} from "./commands/ListModelCustomizationJobsCommand";
121+
import {
122+
ListModelInvocationJobsCommandInput,
123+
ListModelInvocationJobsCommandOutput,
124+
} from "./commands/ListModelInvocationJobsCommand";
113125
import {
114126
ListProvisionedModelThroughputsCommandInput,
115127
ListProvisionedModelThroughputsCommandOutput,
@@ -127,6 +139,10 @@ import {
127139
StopModelCustomizationJobCommandInput,
128140
StopModelCustomizationJobCommandOutput,
129141
} from "./commands/StopModelCustomizationJobCommand";
142+
import {
143+
StopModelInvocationJobCommandInput,
144+
StopModelInvocationJobCommandOutput,
145+
} from "./commands/StopModelInvocationJobCommand";
130146
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
131147
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
132148
import { UpdateGuardrailCommandInput, UpdateGuardrailCommandOutput } from "./commands/UpdateGuardrailCommand";
@@ -154,6 +170,7 @@ export type ServiceInputTypes =
154170
| CreateGuardrailVersionCommandInput
155171
| CreateModelCopyJobCommandInput
156172
| CreateModelCustomizationJobCommandInput
173+
| CreateModelInvocationJobCommandInput
157174
| CreateProvisionedModelThroughputCommandInput
158175
| DeleteCustomModelCommandInput
159176
| DeleteGuardrailCommandInput
@@ -165,6 +182,7 @@ export type ServiceInputTypes =
165182
| GetGuardrailCommandInput
166183
| GetModelCopyJobCommandInput
167184
| GetModelCustomizationJobCommandInput
185+
| GetModelInvocationJobCommandInput
168186
| GetModelInvocationLoggingConfigurationCommandInput
169187
| GetProvisionedModelThroughputCommandInput
170188
| ListCustomModelsCommandInput
@@ -173,11 +191,13 @@ export type ServiceInputTypes =
173191
| ListGuardrailsCommandInput
174192
| ListModelCopyJobsCommandInput
175193
| ListModelCustomizationJobsCommandInput
194+
| ListModelInvocationJobsCommandInput
176195
| ListProvisionedModelThroughputsCommandInput
177196
| ListTagsForResourceCommandInput
178197
| PutModelInvocationLoggingConfigurationCommandInput
179198
| StopEvaluationJobCommandInput
180199
| StopModelCustomizationJobCommandInput
200+
| StopModelInvocationJobCommandInput
181201
| TagResourceCommandInput
182202
| UntagResourceCommandInput
183203
| UpdateGuardrailCommandInput
@@ -192,6 +212,7 @@ export type ServiceOutputTypes =
192212
| CreateGuardrailVersionCommandOutput
193213
| CreateModelCopyJobCommandOutput
194214
| CreateModelCustomizationJobCommandOutput
215+
| CreateModelInvocationJobCommandOutput
195216
| CreateProvisionedModelThroughputCommandOutput
196217
| DeleteCustomModelCommandOutput
197218
| DeleteGuardrailCommandOutput
@@ -203,6 +224,7 @@ export type ServiceOutputTypes =
203224
| GetGuardrailCommandOutput
204225
| GetModelCopyJobCommandOutput
205226
| GetModelCustomizationJobCommandOutput
227+
| GetModelInvocationJobCommandOutput
206228
| GetModelInvocationLoggingConfigurationCommandOutput
207229
| GetProvisionedModelThroughputCommandOutput
208230
| ListCustomModelsCommandOutput
@@ -211,11 +233,13 @@ export type ServiceOutputTypes =
211233
| ListGuardrailsCommandOutput
212234
| ListModelCopyJobsCommandOutput
213235
| ListModelCustomizationJobsCommandOutput
236+
| ListModelInvocationJobsCommandOutput
214237
| ListProvisionedModelThroughputsCommandOutput
215238
| ListTagsForResourceCommandOutput
216239
| PutModelInvocationLoggingConfigurationCommandOutput
217240
| StopEvaluationJobCommandOutput
218241
| StopModelCustomizationJobCommandOutput
242+
| StopModelInvocationJobCommandOutput
219243
| TagResourceCommandOutput
220244
| UntagResourceCommandOutput
221245
| UpdateGuardrailCommandOutput

0 commit comments

Comments
 (0)