Skip to content

Commit

Permalink
feat(client-bedrock): Amazon Bedrock Evaluation BatchDeleteEvaluation…
Browse files Browse the repository at this point in the history
…Job API allows customers to delete evaluation jobs under terminated evaluation job statuses - Stopped, Failed, or Completed. Customers can submit a batch of 25 evaluation jobs to be deleted at once.
  • Loading branch information
awstools committed Aug 22, 2024
1 parent 9d2511b commit 06501cb
Show file tree
Hide file tree
Showing 18 changed files with 2,299 additions and 142 deletions.
56 changes: 56 additions & 0 deletions clients/client-bedrock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ see LICENSE for more information.

## Client Commands (Operations List)

<details>
<summary>
BatchDeleteEvaluationJob
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/BatchDeleteEvaluationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/BatchDeleteEvaluationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/BatchDeleteEvaluationJobCommandOutput/)

</details>
<details>
<summary>
CreateEvaluationJob
Expand Down Expand Up @@ -242,6 +250,14 @@ CreateModelCustomizationJob

[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/)

</details>
<details>
<summary>
CreateModelImportJob
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/CreateModelImportJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateModelImportJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateModelImportJobCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -274,6 +290,14 @@ DeleteGuardrail

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/DeleteGuardrailCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/DeleteGuardrailCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/DeleteGuardrailCommandOutput/)

</details>
<details>
<summary>
DeleteImportedModel
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/DeleteImportedModelCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/DeleteImportedModelCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/DeleteImportedModelCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -322,6 +346,14 @@ GetGuardrail

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/GetGuardrailCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetGuardrailCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetGuardrailCommandOutput/)

</details>
<details>
<summary>
GetImportedModel
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/GetImportedModelCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetImportedModelCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetImportedModelCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -338,6 +370,14 @@ GetModelCustomizationJob

[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/)

</details>
<details>
<summary>
GetModelImportJob
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/GetModelImportJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetModelImportJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetModelImportJobCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -394,6 +434,14 @@ ListGuardrails

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/ListGuardrailsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListGuardrailsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListGuardrailsCommandOutput/)

</details>
<details>
<summary>
ListImportedModels
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/ListImportedModelsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListImportedModelsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListImportedModelsCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -410,6 +458,14 @@ ListModelCustomizationJobs

[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/)

</details>
<details>
<summary>
ListModelImportJobs
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/ListModelImportJobsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListModelImportJobsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListModelImportJobsCommandOutput/)

</details>
<details>
<summary>
Expand Down
163 changes: 163 additions & 0 deletions clients/client-bedrock/src/Bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { createAggregatedClient } from "@smithy/smithy-client";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";

import { BedrockClient, BedrockClientConfig } from "./BedrockClient";
import {
BatchDeleteEvaluationJobCommand,
BatchDeleteEvaluationJobCommandInput,
BatchDeleteEvaluationJobCommandOutput,
} from "./commands/BatchDeleteEvaluationJobCommand";
import {
CreateEvaluationJobCommand,
CreateEvaluationJobCommandInput,
Expand All @@ -28,6 +33,11 @@ import {
CreateModelCustomizationJobCommandInput,
CreateModelCustomizationJobCommandOutput,
} from "./commands/CreateModelCustomizationJobCommand";
import {
CreateModelImportJobCommand,
CreateModelImportJobCommandInput,
CreateModelImportJobCommandOutput,
} from "./commands/CreateModelImportJobCommand";
import {
CreateModelInvocationJobCommand,
CreateModelInvocationJobCommandInput,
Expand All @@ -48,6 +58,11 @@ import {
DeleteGuardrailCommandInput,
DeleteGuardrailCommandOutput,
} from "./commands/DeleteGuardrailCommand";
import {
DeleteImportedModelCommand,
DeleteImportedModelCommandInput,
DeleteImportedModelCommandOutput,
} from "./commands/DeleteImportedModelCommand";
import {
DeleteModelInvocationLoggingConfigurationCommand,
DeleteModelInvocationLoggingConfigurationCommandInput,
Expand Down Expand Up @@ -78,6 +93,11 @@ import {
GetGuardrailCommandInput,
GetGuardrailCommandOutput,
} from "./commands/GetGuardrailCommand";
import {
GetImportedModelCommand,
GetImportedModelCommandInput,
GetImportedModelCommandOutput,
} from "./commands/GetImportedModelCommand";
import {
GetModelCopyJobCommand,
GetModelCopyJobCommandInput,
Expand All @@ -88,6 +108,11 @@ import {
GetModelCustomizationJobCommandInput,
GetModelCustomizationJobCommandOutput,
} from "./commands/GetModelCustomizationJobCommand";
import {
GetModelImportJobCommand,
GetModelImportJobCommandInput,
GetModelImportJobCommandOutput,
} from "./commands/GetModelImportJobCommand";
import {
GetModelInvocationJobCommand,
GetModelInvocationJobCommandInput,
Expand Down Expand Up @@ -123,6 +148,11 @@ import {
ListGuardrailsCommandInput,
ListGuardrailsCommandOutput,
} from "./commands/ListGuardrailsCommand";
import {
ListImportedModelsCommand,
ListImportedModelsCommandInput,
ListImportedModelsCommandOutput,
} from "./commands/ListImportedModelsCommand";
import {
ListModelCopyJobsCommand,
ListModelCopyJobsCommandInput,
Expand All @@ -133,6 +163,11 @@ import {
ListModelCustomizationJobsCommandInput,
ListModelCustomizationJobsCommandOutput,
} from "./commands/ListModelCustomizationJobsCommand";
import {
ListModelImportJobsCommand,
ListModelImportJobsCommandInput,
ListModelImportJobsCommandOutput,
} from "./commands/ListModelImportJobsCommand";
import {
ListModelInvocationJobsCommand,
ListModelInvocationJobsCommandInput,
Expand Down Expand Up @@ -186,32 +221,39 @@ import {
} from "./commands/UpdateProvisionedModelThroughputCommand";

const commands = {
BatchDeleteEvaluationJobCommand,
CreateEvaluationJobCommand,
CreateGuardrailCommand,
CreateGuardrailVersionCommand,
CreateModelCopyJobCommand,
CreateModelCustomizationJobCommand,
CreateModelImportJobCommand,
CreateModelInvocationJobCommand,
CreateProvisionedModelThroughputCommand,
DeleteCustomModelCommand,
DeleteGuardrailCommand,
DeleteImportedModelCommand,
DeleteModelInvocationLoggingConfigurationCommand,
DeleteProvisionedModelThroughputCommand,
GetCustomModelCommand,
GetEvaluationJobCommand,
GetFoundationModelCommand,
GetGuardrailCommand,
GetImportedModelCommand,
GetModelCopyJobCommand,
GetModelCustomizationJobCommand,
GetModelImportJobCommand,
GetModelInvocationJobCommand,
GetModelInvocationLoggingConfigurationCommand,
GetProvisionedModelThroughputCommand,
ListCustomModelsCommand,
ListEvaluationJobsCommand,
ListFoundationModelsCommand,
ListGuardrailsCommand,
ListImportedModelsCommand,
ListModelCopyJobsCommand,
ListModelCustomizationJobsCommand,
ListModelImportJobsCommand,
ListModelInvocationJobsCommand,
ListProvisionedModelThroughputsCommand,
ListTagsForResourceCommand,
Expand All @@ -226,6 +268,23 @@ const commands = {
};

export interface Bedrock {
/**
* @see {@link BatchDeleteEvaluationJobCommand}
*/
batchDeleteEvaluationJob(
args: BatchDeleteEvaluationJobCommandInput,
options?: __HttpHandlerOptions
): Promise<BatchDeleteEvaluationJobCommandOutput>;
batchDeleteEvaluationJob(
args: BatchDeleteEvaluationJobCommandInput,
cb: (err: any, data?: BatchDeleteEvaluationJobCommandOutput) => void
): void;
batchDeleteEvaluationJob(
args: BatchDeleteEvaluationJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: BatchDeleteEvaluationJobCommandOutput) => void
): void;

/**
* @see {@link CreateEvaluationJobCommand}
*/
Expand Down Expand Up @@ -308,6 +367,23 @@ export interface Bedrock {
cb: (err: any, data?: CreateModelCustomizationJobCommandOutput) => void
): void;

/**
* @see {@link CreateModelImportJobCommand}
*/
createModelImportJob(
args: CreateModelImportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateModelImportJobCommandOutput>;
createModelImportJob(
args: CreateModelImportJobCommandInput,
cb: (err: any, data?: CreateModelImportJobCommandOutput) => void
): void;
createModelImportJob(
args: CreateModelImportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateModelImportJobCommandOutput) => void
): void;

/**
* @see {@link CreateModelInvocationJobCommand}
*/
Expand Down Expand Up @@ -373,6 +449,23 @@ export interface Bedrock {
cb: (err: any, data?: DeleteGuardrailCommandOutput) => void
): void;

/**
* @see {@link DeleteImportedModelCommand}
*/
deleteImportedModel(
args: DeleteImportedModelCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteImportedModelCommandOutput>;
deleteImportedModel(
args: DeleteImportedModelCommandInput,
cb: (err: any, data?: DeleteImportedModelCommandOutput) => void
): void;
deleteImportedModel(
args: DeleteImportedModelCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteImportedModelCommandOutput) => void
): void;

/**
* @see {@link DeleteModelInvocationLoggingConfigurationCommand}
*/
Expand Down Expand Up @@ -467,6 +560,23 @@ export interface Bedrock {
cb: (err: any, data?: GetGuardrailCommandOutput) => void
): void;

/**
* @see {@link GetImportedModelCommand}
*/
getImportedModel(
args: GetImportedModelCommandInput,
options?: __HttpHandlerOptions
): Promise<GetImportedModelCommandOutput>;
getImportedModel(
args: GetImportedModelCommandInput,
cb: (err: any, data?: GetImportedModelCommandOutput) => void
): void;
getImportedModel(
args: GetImportedModelCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetImportedModelCommandOutput) => void
): void;

/**
* @see {@link GetModelCopyJobCommand}
*/
Expand Down Expand Up @@ -498,6 +608,23 @@ export interface Bedrock {
cb: (err: any, data?: GetModelCustomizationJobCommandOutput) => void
): void;

/**
* @see {@link GetModelImportJobCommand}
*/
getModelImportJob(
args: GetModelImportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<GetModelImportJobCommandOutput>;
getModelImportJob(
args: GetModelImportJobCommandInput,
cb: (err: any, data?: GetModelImportJobCommandOutput) => void
): void;
getModelImportJob(
args: GetModelImportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetModelImportJobCommandOutput) => void
): void;

/**
* @see {@link GetModelInvocationJobCommand}
*/
Expand Down Expand Up @@ -619,6 +746,24 @@ export interface Bedrock {
cb: (err: any, data?: ListGuardrailsCommandOutput) => void
): void;

/**
* @see {@link ListImportedModelsCommand}
*/
listImportedModels(): Promise<ListImportedModelsCommandOutput>;
listImportedModels(
args: ListImportedModelsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListImportedModelsCommandOutput>;
listImportedModels(
args: ListImportedModelsCommandInput,
cb: (err: any, data?: ListImportedModelsCommandOutput) => void
): void;
listImportedModels(
args: ListImportedModelsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListImportedModelsCommandOutput) => void
): void;

/**
* @see {@link ListModelCopyJobsCommand}
*/
Expand Down Expand Up @@ -655,6 +800,24 @@ export interface Bedrock {
cb: (err: any, data?: ListModelCustomizationJobsCommandOutput) => void
): void;

/**
* @see {@link ListModelImportJobsCommand}
*/
listModelImportJobs(): Promise<ListModelImportJobsCommandOutput>;
listModelImportJobs(
args: ListModelImportJobsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListModelImportJobsCommandOutput>;
listModelImportJobs(
args: ListModelImportJobsCommandInput,
cb: (err: any, data?: ListModelImportJobsCommandOutput) => void
): void;
listModelImportJobs(
args: ListModelImportJobsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListModelImportJobsCommandOutput) => void
): void;

/**
* @see {@link ListModelInvocationJobsCommand}
*/
Expand Down
Loading

0 comments on commit 06501cb

Please sign in to comment.