Skip to content

Commit

Permalink
feat(client-bedrock): Provisioned throughput feature with Amazon and …
Browse files Browse the repository at this point in the history
…third-party base models, and update validators for model identifier and taggable resource ARNs.
  • Loading branch information
awstools committed Oct 2, 2023
1 parent 03d0108 commit 441ce01
Show file tree
Hide file tree
Showing 18 changed files with 2,863 additions and 69 deletions.
40 changes: 40 additions & 0 deletions clients/client-bedrock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ CreateModelCustomizationJob

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/createmodelcustomizationjobcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/createmodelcustomizationjobcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/createmodelcustomizationjobcommandoutput.html)

</details>
<details>
<summary>
CreateProvisionedModelThroughput
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/createprovisionedmodelthroughputcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/createprovisionedmodelthroughputcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/createprovisionedmodelthroughputcommandoutput.html)

</details>
<details>
<summary>
Expand All @@ -226,6 +234,14 @@ DeleteModelInvocationLoggingConfiguration

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/deletemodelinvocationloggingconfigurationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/deletemodelinvocationloggingconfigurationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/deletemodelinvocationloggingconfigurationcommandoutput.html)

</details>
<details>
<summary>
DeleteProvisionedModelThroughput
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/deleteprovisionedmodelthroughputcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/deleteprovisionedmodelthroughputcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/deleteprovisionedmodelthroughputcommandoutput.html)

</details>
<details>
<summary>
Expand Down Expand Up @@ -258,6 +274,14 @@ GetModelInvocationLoggingConfiguration

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/getmodelinvocationloggingconfigurationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/getmodelinvocationloggingconfigurationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/getmodelinvocationloggingconfigurationcommandoutput.html)

</details>
<details>
<summary>
GetProvisionedModelThroughput
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/getprovisionedmodelthroughputcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/getprovisionedmodelthroughputcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/getprovisionedmodelthroughputcommandoutput.html)

</details>
<details>
<summary>
Expand All @@ -282,6 +306,14 @@ ListModelCustomizationJobs

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/listmodelcustomizationjobscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/listmodelcustomizationjobscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/listmodelcustomizationjobscommandoutput.html)

</details>
<details>
<summary>
ListProvisionedModelThroughputs
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/listprovisionedmodelthroughputscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/listprovisionedmodelthroughputscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/listprovisionedmodelthroughputscommandoutput.html)

</details>
<details>
<summary>
Expand Down Expand Up @@ -323,3 +355,11 @@ UntagResource
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/untagresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/untagresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/untagresourcecommandoutput.html)

</details>
<details>
<summary>
UpdateProvisionedModelThroughput
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/classes/updateprovisionedmodelthroughputcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/updateprovisionedmodelthroughputcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-bedrock/interfaces/updateprovisionedmodelthroughputcommandoutput.html)

</details>
115 changes: 115 additions & 0 deletions clients/client-bedrock/src/Bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import {
CreateModelCustomizationJobCommandInput,
CreateModelCustomizationJobCommandOutput,
} from "./commands/CreateModelCustomizationJobCommand";
import {
CreateProvisionedModelThroughputCommand,
CreateProvisionedModelThroughputCommandInput,
CreateProvisionedModelThroughputCommandOutput,
} from "./commands/CreateProvisionedModelThroughputCommand";
import {
DeleteCustomModelCommand,
DeleteCustomModelCommandInput,
Expand All @@ -18,6 +23,11 @@ import {
DeleteModelInvocationLoggingConfigurationCommandInput,
DeleteModelInvocationLoggingConfigurationCommandOutput,
} from "./commands/DeleteModelInvocationLoggingConfigurationCommand";
import {
DeleteProvisionedModelThroughputCommand,
DeleteProvisionedModelThroughputCommandInput,
DeleteProvisionedModelThroughputCommandOutput,
} from "./commands/DeleteProvisionedModelThroughputCommand";
import {
GetCustomModelCommand,
GetCustomModelCommandInput,
Expand All @@ -38,6 +48,11 @@ import {
GetModelInvocationLoggingConfigurationCommandInput,
GetModelInvocationLoggingConfigurationCommandOutput,
} from "./commands/GetModelInvocationLoggingConfigurationCommand";
import {
GetProvisionedModelThroughputCommand,
GetProvisionedModelThroughputCommandInput,
GetProvisionedModelThroughputCommandOutput,
} from "./commands/GetProvisionedModelThroughputCommand";
import {
ListCustomModelsCommand,
ListCustomModelsCommandInput,
Expand All @@ -53,6 +68,11 @@ import {
ListModelCustomizationJobsCommandInput,
ListModelCustomizationJobsCommandOutput,
} from "./commands/ListModelCustomizationJobsCommand";
import {
ListProvisionedModelThroughputsCommand,
ListProvisionedModelThroughputsCommandInput,
ListProvisionedModelThroughputsCommandOutput,
} from "./commands/ListProvisionedModelThroughputsCommand";
import {
ListTagsForResourceCommand,
ListTagsForResourceCommandInput,
Expand All @@ -74,23 +94,33 @@ import {
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import {
UpdateProvisionedModelThroughputCommand,
UpdateProvisionedModelThroughputCommandInput,
UpdateProvisionedModelThroughputCommandOutput,
} from "./commands/UpdateProvisionedModelThroughputCommand";

const commands = {
CreateModelCustomizationJobCommand,
CreateProvisionedModelThroughputCommand,
DeleteCustomModelCommand,
DeleteModelInvocationLoggingConfigurationCommand,
DeleteProvisionedModelThroughputCommand,
GetCustomModelCommand,
GetFoundationModelCommand,
GetModelCustomizationJobCommand,
GetModelInvocationLoggingConfigurationCommand,
GetProvisionedModelThroughputCommand,
ListCustomModelsCommand,
ListFoundationModelsCommand,
ListModelCustomizationJobsCommand,
ListProvisionedModelThroughputsCommand,
ListTagsForResourceCommand,
PutModelInvocationLoggingConfigurationCommand,
StopModelCustomizationJobCommand,
TagResourceCommand,
UntagResourceCommand,
UpdateProvisionedModelThroughputCommand,
};

export interface Bedrock {
Expand All @@ -111,6 +141,23 @@ export interface Bedrock {
cb: (err: any, data?: CreateModelCustomizationJobCommandOutput) => void
): void;

/**
* @see {@link CreateProvisionedModelThroughputCommand}
*/
createProvisionedModelThroughput(
args: CreateProvisionedModelThroughputCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateProvisionedModelThroughputCommandOutput>;
createProvisionedModelThroughput(
args: CreateProvisionedModelThroughputCommandInput,
cb: (err: any, data?: CreateProvisionedModelThroughputCommandOutput) => void
): void;
createProvisionedModelThroughput(
args: CreateProvisionedModelThroughputCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateProvisionedModelThroughputCommandOutput) => void
): void;

/**
* @see {@link DeleteCustomModelCommand}
*/
Expand Down Expand Up @@ -145,6 +192,23 @@ export interface Bedrock {
cb: (err: any, data?: DeleteModelInvocationLoggingConfigurationCommandOutput) => void
): void;

/**
* @see {@link DeleteProvisionedModelThroughputCommand}
*/
deleteProvisionedModelThroughput(
args: DeleteProvisionedModelThroughputCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteProvisionedModelThroughputCommandOutput>;
deleteProvisionedModelThroughput(
args: DeleteProvisionedModelThroughputCommandInput,
cb: (err: any, data?: DeleteProvisionedModelThroughputCommandOutput) => void
): void;
deleteProvisionedModelThroughput(
args: DeleteProvisionedModelThroughputCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteProvisionedModelThroughputCommandOutput) => void
): void;

/**
* @see {@link GetCustomModelCommand}
*/
Expand Down Expand Up @@ -210,6 +274,23 @@ export interface Bedrock {
cb: (err: any, data?: GetModelInvocationLoggingConfigurationCommandOutput) => void
): void;

/**
* @see {@link GetProvisionedModelThroughputCommand}
*/
getProvisionedModelThroughput(
args: GetProvisionedModelThroughputCommandInput,
options?: __HttpHandlerOptions
): Promise<GetProvisionedModelThroughputCommandOutput>;
getProvisionedModelThroughput(
args: GetProvisionedModelThroughputCommandInput,
cb: (err: any, data?: GetProvisionedModelThroughputCommandOutput) => void
): void;
getProvisionedModelThroughput(
args: GetProvisionedModelThroughputCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetProvisionedModelThroughputCommandOutput) => void
): void;

/**
* @see {@link ListCustomModelsCommand}
*/
Expand Down Expand Up @@ -261,6 +342,23 @@ export interface Bedrock {
cb: (err: any, data?: ListModelCustomizationJobsCommandOutput) => void
): void;

/**
* @see {@link ListProvisionedModelThroughputsCommand}
*/
listProvisionedModelThroughputs(
args: ListProvisionedModelThroughputsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListProvisionedModelThroughputsCommandOutput>;
listProvisionedModelThroughputs(
args: ListProvisionedModelThroughputsCommandInput,
cb: (err: any, data?: ListProvisionedModelThroughputsCommandOutput) => void
): void;
listProvisionedModelThroughputs(
args: ListProvisionedModelThroughputsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListProvisionedModelThroughputsCommandOutput) => void
): void;

/**
* @see {@link ListTagsForResourceCommand}
*/
Expand Down Expand Up @@ -333,6 +431,23 @@ export interface Bedrock {
options: __HttpHandlerOptions,
cb: (err: any, data?: UntagResourceCommandOutput) => void
): void;

/**
* @see {@link UpdateProvisionedModelThroughputCommand}
*/
updateProvisionedModelThroughput(
args: UpdateProvisionedModelThroughputCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateProvisionedModelThroughputCommandOutput>;
updateProvisionedModelThroughput(
args: UpdateProvisionedModelThroughputCommandInput,
cb: (err: any, data?: UpdateProvisionedModelThroughputCommandOutput) => void
): void;
updateProvisionedModelThroughput(
args: UpdateProvisionedModelThroughputCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateProvisionedModelThroughputCommandOutput) => void
): void;
}

/**
Expand Down
34 changes: 32 additions & 2 deletions clients/client-bedrock/src/BedrockClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,19 @@ import {
CreateModelCustomizationJobCommandInput,
CreateModelCustomizationJobCommandOutput,
} from "./commands/CreateModelCustomizationJobCommand";
import {
CreateProvisionedModelThroughputCommandInput,
CreateProvisionedModelThroughputCommandOutput,
} from "./commands/CreateProvisionedModelThroughputCommand";
import { DeleteCustomModelCommandInput, DeleteCustomModelCommandOutput } from "./commands/DeleteCustomModelCommand";
import {
DeleteModelInvocationLoggingConfigurationCommandInput,
DeleteModelInvocationLoggingConfigurationCommandOutput,
} from "./commands/DeleteModelInvocationLoggingConfigurationCommand";
import {
DeleteProvisionedModelThroughputCommandInput,
DeleteProvisionedModelThroughputCommandOutput,
} from "./commands/DeleteProvisionedModelThroughputCommand";
import { GetCustomModelCommandInput, GetCustomModelCommandOutput } from "./commands/GetCustomModelCommand";
import { GetFoundationModelCommandInput, GetFoundationModelCommandOutput } from "./commands/GetFoundationModelCommand";
import {
Expand All @@ -69,6 +77,10 @@ import {
GetModelInvocationLoggingConfigurationCommandInput,
GetModelInvocationLoggingConfigurationCommandOutput,
} from "./commands/GetModelInvocationLoggingConfigurationCommand";
import {
GetProvisionedModelThroughputCommandInput,
GetProvisionedModelThroughputCommandOutput,
} from "./commands/GetProvisionedModelThroughputCommand";
import { ListCustomModelsCommandInput, ListCustomModelsCommandOutput } from "./commands/ListCustomModelsCommand";
import {
ListFoundationModelsCommandInput,
Expand All @@ -78,6 +90,10 @@ import {
ListModelCustomizationJobsCommandInput,
ListModelCustomizationJobsCommandOutput,
} from "./commands/ListModelCustomizationJobsCommand";
import {
ListProvisionedModelThroughputsCommandInput,
ListProvisionedModelThroughputsCommandOutput,
} from "./commands/ListProvisionedModelThroughputsCommand";
import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
Expand All @@ -92,6 +108,10 @@ import {
} from "./commands/StopModelCustomizationJobCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import {
UpdateProvisionedModelThroughputCommandInput,
UpdateProvisionedModelThroughputCommandOutput,
} from "./commands/UpdateProvisionedModelThroughputCommand";
import {
ClientInputEndpointParameters,
ClientResolvedEndpointParameters,
Expand All @@ -108,40 +128,50 @@ export { __Client };
*/
export type ServiceInputTypes =
| CreateModelCustomizationJobCommandInput
| CreateProvisionedModelThroughputCommandInput
| DeleteCustomModelCommandInput
| DeleteModelInvocationLoggingConfigurationCommandInput
| DeleteProvisionedModelThroughputCommandInput
| GetCustomModelCommandInput
| GetFoundationModelCommandInput
| GetModelCustomizationJobCommandInput
| GetModelInvocationLoggingConfigurationCommandInput
| GetProvisionedModelThroughputCommandInput
| ListCustomModelsCommandInput
| ListFoundationModelsCommandInput
| ListModelCustomizationJobsCommandInput
| ListProvisionedModelThroughputsCommandInput
| ListTagsForResourceCommandInput
| PutModelInvocationLoggingConfigurationCommandInput
| StopModelCustomizationJobCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput;
| UntagResourceCommandInput
| UpdateProvisionedModelThroughputCommandInput;

/**
* @public
*/
export type ServiceOutputTypes =
| CreateModelCustomizationJobCommandOutput
| CreateProvisionedModelThroughputCommandOutput
| DeleteCustomModelCommandOutput
| DeleteModelInvocationLoggingConfigurationCommandOutput
| DeleteProvisionedModelThroughputCommandOutput
| GetCustomModelCommandOutput
| GetFoundationModelCommandOutput
| GetModelCustomizationJobCommandOutput
| GetModelInvocationLoggingConfigurationCommandOutput
| GetProvisionedModelThroughputCommandOutput
| ListCustomModelsCommandOutput
| ListFoundationModelsCommandOutput
| ListModelCustomizationJobsCommandOutput
| ListProvisionedModelThroughputsCommandOutput
| ListTagsForResourceCommandOutput
| PutModelInvocationLoggingConfigurationCommandOutput
| StopModelCustomizationJobCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput;
| UntagResourceCommandOutput
| UpdateProvisionedModelThroughputCommandOutput;

/**
* @public
Expand Down
Loading

0 comments on commit 441ce01

Please sign in to comment.