From cd3a5ec8ce31adc220bfbf9f38c2a939b886c5d6 Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 29 Oct 2024 18:58:00 +0000 Subject: [PATCH] feat(client-bedrock): Update Application Inference Profile --- clients/client-bedrock/README.md | 16 + clients/client-bedrock/src/Bedrock.ts | 46 +++ clients/client-bedrock/src/BedrockClient.ts | 12 + .../commands/CreateInferenceProfileCommand.ts | 133 +++++++++ .../commands/DeleteInferenceProfileCommand.ts | 108 +++++++ .../commands/GetInferenceProfileCommand.ts | 20 +- .../commands/ListInferenceProfilesCommand.ts | 21 +- .../commands/ListTagsForResourceCommand.ts | 2 +- .../src/commands/TagResourceCommand.ts | 2 +- .../src/commands/UntagResourceCommand.ts | 2 +- clients/client-bedrock/src/commands/index.ts | 2 + clients/client-bedrock/src/models/models_0.ts | 229 +++++++++++++-- .../src/protocols/Aws_restJson1.ts | 95 ++++++ codegen/sdk-codegen/aws-models/bedrock.json | 276 ++++++++++++++++-- 14 files changed, 892 insertions(+), 72 deletions(-) create mode 100644 clients/client-bedrock/src/commands/CreateInferenceProfileCommand.ts create mode 100644 clients/client-bedrock/src/commands/DeleteInferenceProfileCommand.ts diff --git a/clients/client-bedrock/README.md b/clients/client-bedrock/README.md index 2d5966719c23..8252de0b9120 100644 --- a/clients/client-bedrock/README.md +++ b/clients/client-bedrock/README.md @@ -234,6 +234,14 @@ CreateGuardrailVersion [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/CreateGuardrailVersionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateGuardrailVersionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateGuardrailVersionCommandOutput/) + +
+ +CreateInferenceProfile + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/CreateInferenceProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateInferenceProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateInferenceProfileCommandOutput/) +
@@ -298,6 +306,14 @@ DeleteImportedModel [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/) +
+
+ +DeleteInferenceProfile + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/DeleteInferenceProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/DeleteInferenceProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/DeleteInferenceProfileCommandOutput/) +
diff --git a/clients/client-bedrock/src/Bedrock.ts b/clients/client-bedrock/src/Bedrock.ts index 47eec9ce25cb..52818fc65d6d 100644 --- a/clients/client-bedrock/src/Bedrock.ts +++ b/clients/client-bedrock/src/Bedrock.ts @@ -23,6 +23,11 @@ import { CreateGuardrailVersionCommandInput, CreateGuardrailVersionCommandOutput, } from "./commands/CreateGuardrailVersionCommand"; +import { + CreateInferenceProfileCommand, + CreateInferenceProfileCommandInput, + CreateInferenceProfileCommandOutput, +} from "./commands/CreateInferenceProfileCommand"; import { CreateModelCopyJobCommand, CreateModelCopyJobCommandInput, @@ -63,6 +68,11 @@ import { DeleteImportedModelCommandInput, DeleteImportedModelCommandOutput, } from "./commands/DeleteImportedModelCommand"; +import { + DeleteInferenceProfileCommand, + DeleteInferenceProfileCommandInput, + DeleteInferenceProfileCommandOutput, +} from "./commands/DeleteInferenceProfileCommand"; import { DeleteModelInvocationLoggingConfigurationCommand, DeleteModelInvocationLoggingConfigurationCommandInput, @@ -235,6 +245,7 @@ const commands = { CreateEvaluationJobCommand, CreateGuardrailCommand, CreateGuardrailVersionCommand, + CreateInferenceProfileCommand, CreateModelCopyJobCommand, CreateModelCustomizationJobCommand, CreateModelImportJobCommand, @@ -243,6 +254,7 @@ const commands = { DeleteCustomModelCommand, DeleteGuardrailCommand, DeleteImportedModelCommand, + DeleteInferenceProfileCommand, DeleteModelInvocationLoggingConfigurationCommand, DeleteProvisionedModelThroughputCommand, GetCustomModelCommand, @@ -345,6 +357,23 @@ export interface Bedrock { cb: (err: any, data?: CreateGuardrailVersionCommandOutput) => void ): void; + /** + * @see {@link CreateInferenceProfileCommand} + */ + createInferenceProfile( + args: CreateInferenceProfileCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createInferenceProfile( + args: CreateInferenceProfileCommandInput, + cb: (err: any, data?: CreateInferenceProfileCommandOutput) => void + ): void; + createInferenceProfile( + args: CreateInferenceProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateInferenceProfileCommandOutput) => void + ): void; + /** * @see {@link CreateModelCopyJobCommand} */ @@ -478,6 +507,23 @@ export interface Bedrock { cb: (err: any, data?: DeleteImportedModelCommandOutput) => void ): void; + /** + * @see {@link DeleteInferenceProfileCommand} + */ + deleteInferenceProfile( + args: DeleteInferenceProfileCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteInferenceProfile( + args: DeleteInferenceProfileCommandInput, + cb: (err: any, data?: DeleteInferenceProfileCommandOutput) => void + ): void; + deleteInferenceProfile( + args: DeleteInferenceProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteInferenceProfileCommandOutput) => void + ): void; + /** * @see {@link DeleteModelInvocationLoggingConfigurationCommand} */ diff --git a/clients/client-bedrock/src/BedrockClient.ts b/clients/client-bedrock/src/BedrockClient.ts index 68c8fb959931..963dc8ef4666 100644 --- a/clients/client-bedrock/src/BedrockClient.ts +++ b/clients/client-bedrock/src/BedrockClient.ts @@ -66,6 +66,10 @@ import { CreateGuardrailVersionCommandInput, CreateGuardrailVersionCommandOutput, } from "./commands/CreateGuardrailVersionCommand"; +import { + CreateInferenceProfileCommandInput, + CreateInferenceProfileCommandOutput, +} from "./commands/CreateInferenceProfileCommand"; import { CreateModelCopyJobCommandInput, CreateModelCopyJobCommandOutput } from "./commands/CreateModelCopyJobCommand"; import { CreateModelCustomizationJobCommandInput, @@ -89,6 +93,10 @@ import { DeleteImportedModelCommandInput, DeleteImportedModelCommandOutput, } from "./commands/DeleteImportedModelCommand"; +import { + DeleteInferenceProfileCommandInput, + DeleteInferenceProfileCommandOutput, +} from "./commands/DeleteInferenceProfileCommand"; import { DeleteModelInvocationLoggingConfigurationCommandInput, DeleteModelInvocationLoggingConfigurationCommandOutput, @@ -196,6 +204,7 @@ export type ServiceInputTypes = | CreateEvaluationJobCommandInput | CreateGuardrailCommandInput | CreateGuardrailVersionCommandInput + | CreateInferenceProfileCommandInput | CreateModelCopyJobCommandInput | CreateModelCustomizationJobCommandInput | CreateModelImportJobCommandInput @@ -204,6 +213,7 @@ export type ServiceInputTypes = | DeleteCustomModelCommandInput | DeleteGuardrailCommandInput | DeleteImportedModelCommandInput + | DeleteInferenceProfileCommandInput | DeleteModelInvocationLoggingConfigurationCommandInput | DeleteProvisionedModelThroughputCommandInput | GetCustomModelCommandInput @@ -247,6 +257,7 @@ export type ServiceOutputTypes = | CreateEvaluationJobCommandOutput | CreateGuardrailCommandOutput | CreateGuardrailVersionCommandOutput + | CreateInferenceProfileCommandOutput | CreateModelCopyJobCommandOutput | CreateModelCustomizationJobCommandOutput | CreateModelImportJobCommandOutput @@ -255,6 +266,7 @@ export type ServiceOutputTypes = | DeleteCustomModelCommandOutput | DeleteGuardrailCommandOutput | DeleteImportedModelCommandOutput + | DeleteInferenceProfileCommandOutput | DeleteModelInvocationLoggingConfigurationCommandOutput | DeleteProvisionedModelThroughputCommandOutput | GetCustomModelCommandOutput diff --git a/clients/client-bedrock/src/commands/CreateInferenceProfileCommand.ts b/clients/client-bedrock/src/commands/CreateInferenceProfileCommand.ts new file mode 100644 index 000000000000..dd43133e9406 --- /dev/null +++ b/clients/client-bedrock/src/commands/CreateInferenceProfileCommand.ts @@ -0,0 +1,133 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + CreateInferenceProfileRequest, + CreateInferenceProfileRequestFilterSensitiveLog, + CreateInferenceProfileResponse, +} from "../models/models_0"; +import { de_CreateInferenceProfileCommand, se_CreateInferenceProfileCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateInferenceProfileCommand}. + */ +export interface CreateInferenceProfileCommandInput extends CreateInferenceProfileRequest {} +/** + * @public + * + * The output of {@link CreateInferenceProfileCommand}. + */ +export interface CreateInferenceProfileCommandOutput extends CreateInferenceProfileResponse, __MetadataBearer {} + +/** + *

Creates an application inference profile to track metrics and costs when invoking a model. To create an application inference profile for a foundation model in one region, specify the ARN of the model in that region. To create an application inference profile for a foundation model across multiple regions, specify the ARN of the system-defined inference profile that contains the regions that you want to route requests to. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, CreateInferenceProfileCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, CreateInferenceProfileCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // CreateInferenceProfileRequest + * inferenceProfileName: "STRING_VALUE", // required + * description: "STRING_VALUE", + * clientRequestToken: "STRING_VALUE", + * modelSource: { // InferenceProfileModelSource Union: only one key present + * copyFrom: "STRING_VALUE", + * }, + * tags: [ // TagList + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new CreateInferenceProfileCommand(input); + * const response = await client.send(command); + * // { // CreateInferenceProfileResponse + * // inferenceProfileArn: "STRING_VALUE", // required + * // status: "ACTIVE", + * // }; + * + * ``` + * + * @param CreateInferenceProfileCommandInput - {@link CreateInferenceProfileCommandInput} + * @returns {@link CreateInferenceProfileCommandOutput} + * @see {@link CreateInferenceProfileCommandInput} for command's `input` shape. + * @see {@link CreateInferenceProfileCommandOutput} for command's `response` shape. + * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The request is denied because of missing access permissions.

+ * + * @throws {@link ConflictException} (client fault) + *

Error occurred because of a conflict while performing an operation.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal server error occurred. Retry your request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

The number of requests exceeds the service quota. Resubmit your request later.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The number of requests exceeds the limit. Resubmit your request later.

+ * + * @throws {@link TooManyTagsException} (client fault) + *

The request contains more tags than can be associated with a resource (50 tags per resource). + * The maximum number of tags includes both existing tags and those included in your current request.

+ * + * @throws {@link ValidationException} (client fault) + *

Input validation failed. Check your request parameters and retry the request.

+ * + * @throws {@link BedrockServiceException} + *

Base exception class for all service exceptions from Bedrock service.

+ * + * @public + */ +export class CreateInferenceProfileCommand extends $Command + .classBuilder< + CreateInferenceProfileCommandInput, + CreateInferenceProfileCommandOutput, + BedrockClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockControlPlaneService", "CreateInferenceProfile", {}) + .n("BedrockClient", "CreateInferenceProfileCommand") + .f(CreateInferenceProfileRequestFilterSensitiveLog, void 0) + .ser(se_CreateInferenceProfileCommand) + .de(de_CreateInferenceProfileCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateInferenceProfileRequest; + output: CreateInferenceProfileResponse; + }; + sdk: { + input: CreateInferenceProfileCommandInput; + output: CreateInferenceProfileCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock/src/commands/DeleteInferenceProfileCommand.ts b/clients/client-bedrock/src/commands/DeleteInferenceProfileCommand.ts new file mode 100644 index 000000000000..3c58900552f9 --- /dev/null +++ b/clients/client-bedrock/src/commands/DeleteInferenceProfileCommand.ts @@ -0,0 +1,108 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteInferenceProfileRequest, DeleteInferenceProfileResponse } from "../models/models_0"; +import { de_DeleteInferenceProfileCommand, se_DeleteInferenceProfileCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteInferenceProfileCommand}. + */ +export interface DeleteInferenceProfileCommandInput extends DeleteInferenceProfileRequest {} +/** + * @public + * + * The output of {@link DeleteInferenceProfileCommand}. + */ +export interface DeleteInferenceProfileCommandOutput extends DeleteInferenceProfileResponse, __MetadataBearer {} + +/** + *

Deletes an application inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, DeleteInferenceProfileCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, DeleteInferenceProfileCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // DeleteInferenceProfileRequest + * inferenceProfileIdentifier: "STRING_VALUE", // required + * }; + * const command = new DeleteInferenceProfileCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteInferenceProfileCommandInput - {@link DeleteInferenceProfileCommandInput} + * @returns {@link DeleteInferenceProfileCommandOutput} + * @see {@link DeleteInferenceProfileCommandInput} for command's `input` shape. + * @see {@link DeleteInferenceProfileCommandOutput} for command's `response` shape. + * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The request is denied because of missing access permissions.

+ * + * @throws {@link ConflictException} (client fault) + *

Error occurred because of a conflict while performing an operation.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal server error occurred. Retry your request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The number of requests exceeds the limit. Resubmit your request later.

+ * + * @throws {@link ValidationException} (client fault) + *

Input validation failed. Check your request parameters and retry the request.

+ * + * @throws {@link BedrockServiceException} + *

Base exception class for all service exceptions from Bedrock service.

+ * + * @public + */ +export class DeleteInferenceProfileCommand extends $Command + .classBuilder< + DeleteInferenceProfileCommandInput, + DeleteInferenceProfileCommandOutput, + BedrockClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockControlPlaneService", "DeleteInferenceProfile", {}) + .n("BedrockClient", "DeleteInferenceProfileCommand") + .f(void 0, void 0) + .ser(se_DeleteInferenceProfileCommand) + .de(de_DeleteInferenceProfileCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteInferenceProfileRequest; + output: {}; + }; + sdk: { + input: DeleteInferenceProfileCommandInput; + output: DeleteInferenceProfileCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock/src/commands/GetInferenceProfileCommand.ts b/clients/client-bedrock/src/commands/GetInferenceProfileCommand.ts index 79d04b3a3607..096b0a5c90e3 100644 --- a/clients/client-bedrock/src/commands/GetInferenceProfileCommand.ts +++ b/clients/client-bedrock/src/commands/GetInferenceProfileCommand.ts @@ -6,7 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient"; import { commonParams } from "../endpoint/EndpointParameters"; -import { GetInferenceProfileRequest, GetInferenceProfileResponse } from "../models/models_0"; +import { + GetInferenceProfileRequest, + GetInferenceProfileResponse, + GetInferenceProfileResponseFilterSensitiveLog, +} from "../models/models_0"; import { de_GetInferenceProfileCommand, se_GetInferenceProfileCommand } from "../protocols/Aws_restJson1"; /** @@ -28,7 +32,7 @@ export interface GetInferenceProfileCommandInput extends GetInferenceProfileRequ export interface GetInferenceProfileCommandOutput extends GetInferenceProfileResponse, __MetadataBearer {} /** - *

Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide.

+ *

Gets information about an inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -42,18 +46,18 @@ export interface GetInferenceProfileCommandOutput extends GetInferenceProfileRes * const response = await client.send(command); * // { // GetInferenceProfileResponse * // inferenceProfileName: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // inferenceProfileArn: "STRING_VALUE", // required * // models: [ // InferenceProfileModels // required * // { // InferenceProfileModel * // modelArn: "STRING_VALUE", * // }, * // ], - * // description: "STRING_VALUE", - * // createdAt: new Date("TIMESTAMP"), - * // updatedAt: new Date("TIMESTAMP"), - * // inferenceProfileArn: "STRING_VALUE", // required * // inferenceProfileId: "STRING_VALUE", // required * // status: "ACTIVE", // required - * // type: "SYSTEM_DEFINED", // required + * // type: "SYSTEM_DEFINED" || "APPLICATION", // required * // }; * * ``` @@ -101,7 +105,7 @@ export class GetInferenceProfileCommand extends $Command }) .s("AmazonBedrockControlPlaneService", "GetInferenceProfile", {}) .n("BedrockClient", "GetInferenceProfileCommand") - .f(void 0, void 0) + .f(void 0, GetInferenceProfileResponseFilterSensitiveLog) .ser(se_GetInferenceProfileCommand) .de(de_GetInferenceProfileCommand) .build() { diff --git a/clients/client-bedrock/src/commands/ListInferenceProfilesCommand.ts b/clients/client-bedrock/src/commands/ListInferenceProfilesCommand.ts index bb646ff8f42b..3d84db0bc60d 100644 --- a/clients/client-bedrock/src/commands/ListInferenceProfilesCommand.ts +++ b/clients/client-bedrock/src/commands/ListInferenceProfilesCommand.ts @@ -6,7 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient"; import { commonParams } from "../endpoint/EndpointParameters"; -import { ListInferenceProfilesRequest, ListInferenceProfilesResponse } from "../models/models_0"; +import { + ListInferenceProfilesRequest, + ListInferenceProfilesResponse, + ListInferenceProfilesResponseFilterSensitiveLog, +} from "../models/models_0"; import { de_ListInferenceProfilesCommand, se_ListInferenceProfilesCommand } from "../protocols/Aws_restJson1"; /** @@ -28,7 +32,7 @@ export interface ListInferenceProfilesCommandInput extends ListInferenceProfiles export interface ListInferenceProfilesCommandOutput extends ListInferenceProfilesResponse, __MetadataBearer {} /** - *

Returns a list of inference profiles that you can use.

+ *

Returns a list of inference profiles that you can use. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -38,6 +42,7 @@ export interface ListInferenceProfilesCommandOutput extends ListInferenceProfile * const input = { // ListInferenceProfilesRequest * maxResults: Number("int"), * nextToken: "STRING_VALUE", + * typeEquals: "SYSTEM_DEFINED" || "APPLICATION", * }; * const command = new ListInferenceProfilesCommand(input); * const response = await client.send(command); @@ -45,18 +50,18 @@ export interface ListInferenceProfilesCommandOutput extends ListInferenceProfile * // inferenceProfileSummaries: [ // InferenceProfileSummaries * // { // InferenceProfileSummary * // inferenceProfileName: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // inferenceProfileArn: "STRING_VALUE", // required * // models: [ // InferenceProfileModels // required * // { // InferenceProfileModel * // modelArn: "STRING_VALUE", * // }, * // ], - * // description: "STRING_VALUE", - * // createdAt: new Date("TIMESTAMP"), - * // updatedAt: new Date("TIMESTAMP"), - * // inferenceProfileArn: "STRING_VALUE", // required * // inferenceProfileId: "STRING_VALUE", // required * // status: "ACTIVE", // required - * // type: "SYSTEM_DEFINED", // required + * // type: "SYSTEM_DEFINED" || "APPLICATION", // required * // }, * // ], * // nextToken: "STRING_VALUE", @@ -104,7 +109,7 @@ export class ListInferenceProfilesCommand extends $Command }) .s("AmazonBedrockControlPlaneService", "ListInferenceProfiles", {}) .n("BedrockClient", "ListInferenceProfilesCommand") - .f(void 0, void 0) + .f(void 0, ListInferenceProfilesResponseFilterSensitiveLog) .ser(se_ListInferenceProfilesCommand) .de(de_ListInferenceProfilesCommand) .build() { diff --git a/clients/client-bedrock/src/commands/ListTagsForResourceCommand.ts b/clients/client-bedrock/src/commands/ListTagsForResourceCommand.ts index 3dba022f80ac..911968ecb7b8 100644 --- a/clients/client-bedrock/src/commands/ListTagsForResourceCommand.ts +++ b/clients/client-bedrock/src/commands/ListTagsForResourceCommand.ts @@ -29,7 +29,7 @@ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceRes /** *

List the tags associated with the specified resource.

- *

For more information, see Tagging resources in the Amazon Bedrock User Guide.

+ *

For more information, see Tagging resources in the Amazon Bedrock User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-bedrock/src/commands/TagResourceCommand.ts b/clients/client-bedrock/src/commands/TagResourceCommand.ts index 451d9b4ffd4f..082b3c2b8d03 100644 --- a/clients/client-bedrock/src/commands/TagResourceCommand.ts +++ b/clients/client-bedrock/src/commands/TagResourceCommand.ts @@ -28,7 +28,7 @@ export interface TagResourceCommandInput extends TagResourceRequest {} export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} /** - *

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

+ *

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-bedrock/src/commands/UntagResourceCommand.ts b/clients/client-bedrock/src/commands/UntagResourceCommand.ts index 9edd10eb93a5..4d1da23abef4 100644 --- a/clients/client-bedrock/src/commands/UntagResourceCommand.ts +++ b/clients/client-bedrock/src/commands/UntagResourceCommand.ts @@ -28,7 +28,7 @@ export interface UntagResourceCommandInput extends UntagResourceRequest {} export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} /** - *

Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

+ *

Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-bedrock/src/commands/index.ts b/clients/client-bedrock/src/commands/index.ts index 2e2c2fd594ee..14fee39699b3 100644 --- a/clients/client-bedrock/src/commands/index.ts +++ b/clients/client-bedrock/src/commands/index.ts @@ -3,6 +3,7 @@ export * from "./BatchDeleteEvaluationJobCommand"; export * from "./CreateEvaluationJobCommand"; export * from "./CreateGuardrailCommand"; export * from "./CreateGuardrailVersionCommand"; +export * from "./CreateInferenceProfileCommand"; export * from "./CreateModelCopyJobCommand"; export * from "./CreateModelCustomizationJobCommand"; export * from "./CreateModelImportJobCommand"; @@ -11,6 +12,7 @@ export * from "./CreateProvisionedModelThroughputCommand"; export * from "./DeleteCustomModelCommand"; export * from "./DeleteGuardrailCommand"; export * from "./DeleteImportedModelCommand"; +export * from "./DeleteInferenceProfileCommand"; export * from "./DeleteModelInvocationLoggingConfigurationCommand"; export * from "./DeleteProvisionedModelThroughputCommand"; export * from "./GetCustomModelCommand"; diff --git a/clients/client-bedrock/src/models/models_0.ts b/clients/client-bedrock/src/models/models_0.ts index c3d731f9179d..2e3497a1101f 100644 --- a/clients/client-bedrock/src/models/models_0.ts +++ b/clients/client-bedrock/src/models/models_0.ts @@ -2476,26 +2476,79 @@ export interface UpdateGuardrailResponse { } /** + *

Contains information about the model or system-defined inference profile that is the source for an inference profile..

* @public */ -export interface GetInferenceProfileRequest { +export type InferenceProfileModelSource = + | InferenceProfileModelSource.CopyFromMember + | InferenceProfileModelSource.$UnknownMember; + +/** + * @public + */ +export namespace InferenceProfileModelSource { /** - *

The unique identifier of the inference profile.

+ *

The ARN of the model or system-defined inference profile that is the source for the inference profile.

* @public */ - inferenceProfileIdentifier: string | undefined; + export interface CopyFromMember { + copyFrom: string; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + copyFrom?: never; + $unknown: [string, any]; + } + + export interface Visitor { + copyFrom: (value: string) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: InferenceProfileModelSource, visitor: Visitor): T => { + if (value.copyFrom !== undefined) return visitor.copyFrom(value.copyFrom); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; } /** - *

Contains information about a model.

* @public */ -export interface InferenceProfileModel { +export interface CreateInferenceProfileRequest { /** - *

The Amazon Resource Name (ARN) of the model.

+ *

A name for the inference profile.

* @public */ - modelArn?: string; + inferenceProfileName: string | undefined; + + /** + *

A description for the inference profile.

+ * @public + */ + description?: string; + + /** + *

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, + * Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

+ * @public + */ + clientRequestToken?: string; + + /** + *

The foundation model or system-defined inference profile that the inference profile will track metrics and costs for.

+ * @public + */ + modelSource: InferenceProfileModelSource | undefined; + + /** + *

An array of objects, each of which contains a tag and its value. For more information, see Tagging resources in the Amazon Bedrock User Guide.

+ * @public + */ + tags?: Tag[]; } /** @@ -2511,11 +2564,68 @@ export const InferenceProfileStatus = { */ export type InferenceProfileStatus = (typeof InferenceProfileStatus)[keyof typeof InferenceProfileStatus]; +/** + * @public + */ +export interface CreateInferenceProfileResponse { + /** + *

The ARN of the inference profile that you created.

+ * @public + */ + inferenceProfileArn: string | undefined; + + /** + *

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

+ * @public + */ + status?: InferenceProfileStatus; +} + +/** + * @public + */ +export interface DeleteInferenceProfileRequest { + /** + *

The Amazon Resource Name (ARN) or ID of the application inference profile to delete.

+ * @public + */ + inferenceProfileIdentifier: string | undefined; +} + +/** + * @public + */ +export interface DeleteInferenceProfileResponse {} + +/** + * @public + */ +export interface GetInferenceProfileRequest { + /** + *

The ID or Amazon Resource Name (ARN) of the inference profile.

+ * @public + */ + inferenceProfileIdentifier: string | undefined; +} + +/** + *

Contains information about a model.

+ * @public + */ +export interface InferenceProfileModel { + /** + *

The Amazon Resource Name (ARN) of the model.

+ * @public + */ + modelArn?: string; +} + /** * @public * @enum */ export const InferenceProfileType = { + APPLICATION: "APPLICATION", SYSTEM_DEFINED: "SYSTEM_DEFINED", } as const; @@ -2534,12 +2644,6 @@ export interface GetInferenceProfileResponse { */ inferenceProfileName: string | undefined; - /** - *

A list of information about each model in the inference profile.

- * @public - */ - models: InferenceProfileModel[] | undefined; - /** *

The description of the inference profile.

* @public @@ -2564,6 +2668,12 @@ export interface GetInferenceProfileResponse { */ inferenceProfileArn: string | undefined; + /** + *

A list of information about each model in the inference profile.

+ * @public + */ + models: InferenceProfileModel[] | undefined; + /** *

The unique identifier of the inference profile.

* @public @@ -2571,13 +2681,23 @@ export interface GetInferenceProfileResponse { inferenceProfileId: string | undefined; /** - *

The status of the inference profile. ACTIVE means that the inference profile is available to use.

+ *

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

* @public */ status: InferenceProfileStatus | undefined; /** - *

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock.

+ *

The type of the inference profile. The following types are possible:

+ *
    + *
  • + *

    + * SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

    + *
  • + *
  • + *

    + * APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

    + *
  • + *
* @public */ type: InferenceProfileType | undefined; @@ -2598,6 +2718,22 @@ export interface ListInferenceProfilesRequest { * @public */ nextToken?: string; + + /** + *

Filters for inference profiles that match the type you specify.

+ *
    + *
  • + *

    + * SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

    + *
  • + *
  • + *

    + * APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

    + *
  • + *
+ * @public + */ + typeEquals?: InferenceProfileType; } /** @@ -2611,12 +2747,6 @@ export interface InferenceProfileSummary { */ inferenceProfileName: string | undefined; - /** - *

A list of information about each model in the inference profile.

- * @public - */ - models: InferenceProfileModel[] | undefined; - /** *

The description of the inference profile.

* @public @@ -2641,6 +2771,12 @@ export interface InferenceProfileSummary { */ inferenceProfileArn: string | undefined; + /** + *

A list of information about each model in the inference profile.

+ * @public + */ + models: InferenceProfileModel[] | undefined; + /** *

The unique identifier of the inference profile.

* @public @@ -2648,13 +2784,23 @@ export interface InferenceProfileSummary { inferenceProfileId: string | undefined; /** - *

The status of the inference profile. ACTIVE means that the inference profile is available to use.

+ *

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

* @public */ status: InferenceProfileStatus | undefined; /** - *

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock.

+ *

The type of the inference profile. The following types are possible:

+ *
    + *
  • + *

    + * SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

    + *
  • + *
  • + *

    + * APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

    + *
  • + *
* @public */ type: InferenceProfileType | undefined; @@ -5984,6 +6130,43 @@ export const UpdateGuardrailRequestFilterSensitiveLog = (obj: UpdateGuardrailReq ...(obj.blockedOutputsMessaging && { blockedOutputsMessaging: SENSITIVE_STRING }), }); +/** + * @internal + */ +export const CreateInferenceProfileRequestFilterSensitiveLog = (obj: CreateInferenceProfileRequest): any => ({ + ...obj, + ...(obj.description && { description: SENSITIVE_STRING }), + ...(obj.modelSource && { modelSource: obj.modelSource }), +}); + +/** + * @internal + */ +export const GetInferenceProfileResponseFilterSensitiveLog = (obj: GetInferenceProfileResponse): any => ({ + ...obj, + ...(obj.description && { description: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const InferenceProfileSummaryFilterSensitiveLog = (obj: InferenceProfileSummary): any => ({ + ...obj, + ...(obj.description && { description: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const ListInferenceProfilesResponseFilterSensitiveLog = (obj: ListInferenceProfilesResponse): any => ({ + ...obj, + ...(obj.inferenceProfileSummaries && { + inferenceProfileSummaries: obj.inferenceProfileSummaries.map((item) => + InferenceProfileSummaryFilterSensitiveLog(item) + ), + }), +}); + /** * @internal */ diff --git a/clients/client-bedrock/src/protocols/Aws_restJson1.ts b/clients/client-bedrock/src/protocols/Aws_restJson1.ts index 75ef094a0a43..69c45aebe601 100644 --- a/clients/client-bedrock/src/protocols/Aws_restJson1.ts +++ b/clients/client-bedrock/src/protocols/Aws_restJson1.ts @@ -47,6 +47,10 @@ import { CreateGuardrailVersionCommandInput, CreateGuardrailVersionCommandOutput, } from "../commands/CreateGuardrailVersionCommand"; +import { + CreateInferenceProfileCommandInput, + CreateInferenceProfileCommandOutput, +} from "../commands/CreateInferenceProfileCommand"; import { CreateModelCopyJobCommandInput, CreateModelCopyJobCommandOutput } from "../commands/CreateModelCopyJobCommand"; import { CreateModelCustomizationJobCommandInput, @@ -70,6 +74,10 @@ import { DeleteImportedModelCommandInput, DeleteImportedModelCommandOutput, } from "../commands/DeleteImportedModelCommand"; +import { + DeleteInferenceProfileCommandInput, + DeleteInferenceProfileCommandOutput, +} from "../commands/DeleteInferenceProfileCommand"; import { DeleteModelInvocationLoggingConfigurationCommandInput, DeleteModelInvocationLoggingConfigurationCommandOutput, @@ -193,6 +201,7 @@ import { HumanEvaluationCustomMetric, HumanWorkflowConfig, ImportedModelSummary, + InferenceProfileModelSource, InferenceProfileSummary, InternalServerException, LoggingConfig, @@ -332,6 +341,32 @@ export const se_CreateGuardrailVersionCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1CreateInferenceProfileCommand + */ +export const se_CreateInferenceProfileCommand = async ( + input: CreateInferenceProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/inference-profiles"); + let body: any; + body = JSON.stringify( + take(input, { + clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + description: [], + inferenceProfileName: [], + modelSource: (_) => _json(_), + tags: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1CreateModelCopyJobCommand */ @@ -531,6 +566,22 @@ export const se_DeleteImportedModelCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1DeleteInferenceProfileCommand + */ +export const se_DeleteInferenceProfileCommand = async ( + input: DeleteInferenceProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/inference-profiles/{inferenceProfileIdentifier}"); + b.p("inferenceProfileIdentifier", () => input.inferenceProfileIdentifier!, "{inferenceProfileIdentifier}", false); + let body: any; + b.m("DELETE").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1DeleteModelInvocationLoggingConfigurationCommand */ @@ -886,6 +937,7 @@ export const se_ListInferenceProfilesCommand = async ( const query: any = map({ [_mR]: [() => input.maxResults !== void 0, () => input[_mR]!.toString()], [_nT]: [, input[_nT]!], + [_t]: [, input[_tE]!], }); let body: any; b.m("GET").h(headers).q(query).b(body); @@ -1303,6 +1355,28 @@ export const de_CreateGuardrailVersionCommand = async ( return contents; }; +/** + * deserializeAws_restJson1CreateInferenceProfileCommand + */ +export const de_CreateInferenceProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + inferenceProfileArn: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1CreateModelCopyJobCommand */ @@ -1459,6 +1533,23 @@ export const de_DeleteImportedModelCommand = async ( return contents; }; +/** + * deserializeAws_restJson1DeleteInferenceProfileCommand + */ +export const de_DeleteInferenceProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restJson1DeleteModelInvocationLoggingConfigurationCommand */ @@ -2582,6 +2673,8 @@ const se_GuardrailContextualGroundingPolicyConfig = ( // se_HumanWorkflowConfig omitted. +// se_InferenceProfileModelSource omitted. + // se_LoggingConfig omitted. // se_ModelCustomizationHyperParameters omitted. @@ -3161,4 +3254,6 @@ const _sMAE = "sourceModelArnEquals"; const _sO = "sortOrder"; const _sTA = "submitTimeAfter"; const _sTB = "submitTimeBefore"; +const _t = "type"; +const _tE = "typeEquals"; const _tMNC = "targetModelNameContains"; diff --git a/codegen/sdk-codegen/aws-models/bedrock.json b/codegen/sdk-codegen/aws-models/bedrock.json index 075ba2c7a5cb..3b5ca192fe00 100644 --- a/codegen/sdk-codegen/aws-models/bedrock.json +++ b/codegen/sdk-codegen/aws-models/bedrock.json @@ -1369,6 +1369,112 @@ "smithy.api#output": {} } }, + "com.amazonaws.bedrock#CreateInferenceProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#CreateInferenceProfileRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#CreateInferenceProfileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#ConflictException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#TooManyTagsException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an application inference profile to track metrics and costs when invoking a model. To create an application inference profile for a foundation model in one region, specify the ARN of the model in that region. To create an application inference profile for a foundation model across multiple regions, specify the ARN of the system-defined inference profile that contains the regions that you want to route requests to. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

", + "smithy.api#http": { + "code": 201, + "method": "POST", + "uri": "/inference-profiles" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrock#CreateInferenceProfileRequest": { + "type": "structure", + "members": { + "inferenceProfileName": { + "target": "com.amazonaws.bedrock#InferenceProfileName", + "traits": { + "smithy.api#documentation": "

A name for the inference profile.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.bedrock#InferenceProfileDescription", + "traits": { + "smithy.api#documentation": "

A description for the inference profile.

" + } + }, + "clientRequestToken": { + "target": "com.amazonaws.bedrock#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request,\n Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

", + "smithy.api#idempotencyToken": {} + } + }, + "modelSource": { + "target": "com.amazonaws.bedrock#InferenceProfileModelSource", + "traits": { + "smithy.api#documentation": "

The foundation model or system-defined inference profile that the inference profile will track metrics and costs for.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "

An array of objects, each of which contains a tag and its value. For more information, see Tagging resources in the Amazon Bedrock User Guide.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#CreateInferenceProfileResponse": { + "type": "structure", + "members": { + "inferenceProfileArn": { + "target": "com.amazonaws.bedrock#InferenceProfileArn", + "traits": { + "smithy.api#documentation": "

The ARN of the inference profile that you created.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.bedrock#InferenceProfileStatus", + "traits": { + "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.bedrock#CreateModelCopyJob": { "type": "operation", "input": { @@ -2257,6 +2363,67 @@ "smithy.api#output": {} } }, + "com.amazonaws.bedrock#DeleteInferenceProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#DeleteInferenceProfileRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#DeleteInferenceProfileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#ConflictException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an application inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/inference-profiles/{inferenceProfileIdentifier}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrock#DeleteInferenceProfileRequest": { + "type": "structure", + "members": { + "inferenceProfileIdentifier": { + "target": "com.amazonaws.bedrock#InferenceProfileIdentifier", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) or ID of the application inference profile to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#DeleteInferenceProfileResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfiguration": { "type": "operation", "input": { @@ -2720,7 +2887,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:((:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:inference-profile/(([a-z]{2}.)[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))))|(([a-z]{2}[.]{1})([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))$" + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:((:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:application-inference-profile/[a-z0-9]{12})|([0-9]{12}:inference-profile/(([a-z]{2}.)[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))))|(([a-z]{2}[.]{1})([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))$" } }, "com.amazonaws.bedrock#EvaluationModelIdentifiers": { @@ -3795,7 +3962,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide.

", + "smithy.api#documentation": "

Gets information about an inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "GET", @@ -3810,7 +3977,7 @@ "inferenceProfileIdentifier": { "target": "com.amazonaws.bedrock#InferenceProfileIdentifier", "traits": { - "smithy.api#documentation": "

The unique identifier of the inference profile.

", + "smithy.api#documentation": "

The ID or Amazon Resource Name (ARN) of the inference profile.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3830,13 +3997,6 @@ "smithy.api#required": {} } }, - "models": { - "target": "com.amazonaws.bedrock#InferenceProfileModels", - "traits": { - "smithy.api#documentation": "

A list of information about each model in the inference profile.

", - "smithy.api#required": {} - } - }, "description": { "target": "com.amazonaws.bedrock#InferenceProfileDescription", "traits": { @@ -3862,6 +4022,13 @@ "smithy.api#required": {} } }, + "models": { + "target": "com.amazonaws.bedrock#InferenceProfileModels", + "traits": { + "smithy.api#documentation": "

A list of information about each model in the inference profile.

", + "smithy.api#required": {} + } + }, "inferenceProfileId": { "target": "com.amazonaws.bedrock#InferenceProfileId", "traits": { @@ -3872,14 +4039,14 @@ "status": { "target": "com.amazonaws.bedrock#InferenceProfileStatus", "traits": { - "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is available to use.

", + "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.bedrock#InferenceProfileType", "traits": { - "smithy.api#documentation": "

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock.

", + "smithy.api#documentation": "

The type of the inference profile. The following types are possible:

\n
    \n
  • \n

    \n SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

    \n
  • \n
  • \n

    \n APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

    \n
  • \n
", "smithy.api#required": {} } } @@ -6226,7 +6393,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):inference-profile/[a-zA-Z0-9-:.]+$" + "smithy.api#pattern": "^arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$" } }, "com.amazonaws.bedrock#InferenceProfileDescription": { @@ -6234,9 +6401,10 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 500 + "max": 200 }, - "smithy.api#pattern": "^.+$" + "smithy.api#pattern": "^([0-9a-zA-Z:.][ _-]?)+$", + "smithy.api#sensitive": {} } }, "com.amazonaws.bedrock#InferenceProfileId": { @@ -6256,7 +6424,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):inference-profile/)?[a-zA-Z0-9-:.]+$" + "smithy.api#pattern": "^(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|application-inference-profile)/)?[a-zA-Z0-9-:.]+$" } }, "com.amazonaws.bedrock#InferenceProfileModel": { @@ -6273,6 +6441,30 @@ "smithy.api#documentation": "

Contains information about a model.

" } }, + "com.amazonaws.bedrock#InferenceProfileModelSource": { + "type": "union", + "members": { + "copyFrom": { + "target": "com.amazonaws.bedrock#InferenceProfileModelSourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the model or system-defined inference profile that is the source for the inference profile.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains information about the model or system-defined inference profile that is the source for an inference profile..

" + } + }, + "com.amazonaws.bedrock#InferenceProfileModelSourceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|foundation-model)/[a-zA-Z0-9-:.]+$" + } + }, "com.amazonaws.bedrock#InferenceProfileModels": { "type": "list", "member": { @@ -6302,11 +6494,22 @@ "target": "com.amazonaws.bedrock#InferenceProfileIdentifier" } }, + "create": { + "target": "com.amazonaws.bedrock#CreateInferenceProfile" + }, "read": { "target": "com.amazonaws.bedrock#GetInferenceProfile" }, + "delete": { + "target": "com.amazonaws.bedrock#DeleteInferenceProfile" + }, "list": { "target": "com.amazonaws.bedrock#ListInferenceProfiles" + }, + "traits": { + "aws.cloudformation#cfnResource": { + "name": "InferenceProfile" + } } }, "com.amazonaws.bedrock#InferenceProfileStatus": { @@ -6336,13 +6539,6 @@ "smithy.api#required": {} } }, - "models": { - "target": "com.amazonaws.bedrock#InferenceProfileModels", - "traits": { - "smithy.api#documentation": "

A list of information about each model in the inference profile.

", - "smithy.api#required": {} - } - }, "description": { "target": "com.amazonaws.bedrock#InferenceProfileDescription", "traits": { @@ -6368,6 +6564,13 @@ "smithy.api#required": {} } }, + "models": { + "target": "com.amazonaws.bedrock#InferenceProfileModels", + "traits": { + "smithy.api#documentation": "

A list of information about each model in the inference profile.

", + "smithy.api#required": {} + } + }, "inferenceProfileId": { "target": "com.amazonaws.bedrock#InferenceProfileId", "traits": { @@ -6378,14 +6581,14 @@ "status": { "target": "com.amazonaws.bedrock#InferenceProfileStatus", "traits": { - "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is available to use.

", + "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.bedrock#InferenceProfileType", "traits": { - "smithy.api#documentation": "

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock.

", + "smithy.api#documentation": "

The type of the inference profile. The following types are possible:

\n
    \n
  • \n

    \n SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

    \n
  • \n
  • \n

    \n APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

    \n
  • \n
", "smithy.api#required": {} } } @@ -6402,6 +6605,12 @@ "traits": { "smithy.api#enumValue": "SYSTEM_DEFINED" } + }, + "APPLICATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPLICATION" + } } } }, @@ -7051,7 +7260,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of inference profiles that you can use.

", + "smithy.api#documentation": "

Returns a list of inference profiles that you can use. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "GET", @@ -7082,6 +7291,13 @@ "smithy.api#documentation": "

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

", "smithy.api#httpQuery": "nextToken" } + }, + "typeEquals": { + "target": "com.amazonaws.bedrock#InferenceProfileType", + "traits": { + "smithy.api#documentation": "

Filters for inference profiles that match the type you specify.

\n
    \n
  • \n

    \n SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

    \n
  • \n
  • \n

    \n APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

    \n
  • \n
", + "smithy.api#httpQuery": "type" + } } }, "traits": { @@ -7768,7 +7984,7 @@ } ], "traits": { - "smithy.api#documentation": "

List the tags associated with the specified resource.

\n

For more information, see Tagging resources in the Amazon Bedrock User Guide.

", + "smithy.api#documentation": "

List the tags associated with the specified resource.

\n

For more information, see Tagging resources in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "POST", @@ -9470,7 +9686,7 @@ } ], "traits": { - "smithy.api#documentation": "

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

", + "smithy.api#documentation": "

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "POST", @@ -9524,7 +9740,7 @@ "min": 20, "max": 1011 }, - "smithy.api#pattern": "(^[a-zA-Z0-9][a-zA-Z0-9\\-]*$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:([0-9]{12}|)((:(fine-tuning-job|model-customization-job|custom-model)/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}(/[a-z0-9]{12})$)|(:guardrail/[a-z0-9]+$)|(:(provisioned-model|model-invocation-job|model-evaluation-job|evaluation-job|model-import-job|imported-model)/[a-z0-9]{12}$)))" + "smithy.api#pattern": "(^[a-zA-Z0-9][a-zA-Z0-9\\-]*$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:([0-9]{12}|)((:(fine-tuning-job|model-customization-job|custom-model)/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}(/[a-z0-9]{12})$)|(:guardrail/[a-z0-9]+$)|(:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$)|(:(provisioned-model|model-invocation-job|model-evaluation-job|evaluation-job|model-import-job|imported-model)/[a-z0-9]{12}$)))" } }, "com.amazonaws.bedrock#TaggingResource": { @@ -9651,7 +9867,7 @@ } ], "traits": { - "smithy.api#documentation": "

Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

", + "smithy.api#documentation": "

Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "POST",