diff --git a/clients/client-bedrock/.gitignore b/clients/client-bedrock/.gitignore new file mode 100644 index 0000000000000..54f14c9aef253 --- /dev/null +++ b/clients/client-bedrock/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-bedrock/LICENSE b/clients/client-bedrock/LICENSE new file mode 100644 index 0000000000000..5001cd317c44a --- /dev/null +++ b/clients/client-bedrock/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-bedrock/README.md b/clients/client-bedrock/README.md new file mode 100644 index 0000000000000..a39002afe2a3f --- /dev/null +++ b/clients/client-bedrock/README.md @@ -0,0 +1,325 @@ + + +# @aws-sdk/client-bedrock + +## Description + +AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native. + +
Describes the API operations for creating and managing Bedrock models.
+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-bedrock +using your favorite package manager: + +- `npm install @aws-sdk/client-bedrock` +- `yarn add @aws-sdk/client-bedrock` +- `pnpm add @aws-sdk/client-bedrock` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `BedrockClient` and +the commands you need, for example `ListCustomModelsCommand`: + +```js +// ES5 example +const { BedrockClient, ListCustomModelsCommand } = require("@aws-sdk/client-bedrock"); +``` + +```ts +// ES6+ example +import { BedrockClient, ListCustomModelsCommand } from "@aws-sdk/client-bedrock"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new BedrockClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListCustomModelsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-bedrock"; +const client = new AWS.Bedrock({ region: "REGION" }); + +// async/await. +try { + const data = await client.listCustomModels(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listCustomModels(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listCustomModels(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-bedrock` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +Describes the API operations for creating and managing Bedrock models.
+ */ +export class Bedrock extends BedrockClient implements Bedrock {} +createAggregatedClient(commands, Bedrock); diff --git a/clients/client-bedrock/src/BedrockClient.ts b/clients/client-bedrock/src/BedrockClient.ts new file mode 100644 index 0000000000000..35ea394a938d3 --- /dev/null +++ b/clients/client-bedrock/src/BedrockClient.ts @@ -0,0 +1,358 @@ +// smithy-typescript generated code +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { Credentials as __Credentials } from "@aws-sdk/types"; +import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + Checksum as __Checksum, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + EndpointV2 as __EndpointV2, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; + +import { + CreateModelCustomizationJobCommandInput, + CreateModelCustomizationJobCommandOutput, +} from "./commands/CreateModelCustomizationJobCommand"; +import { DeleteCustomModelCommandInput, DeleteCustomModelCommandOutput } from "./commands/DeleteCustomModelCommand"; +import { + DeleteModelInvocationLoggingConfigurationCommandInput, + DeleteModelInvocationLoggingConfigurationCommandOutput, +} from "./commands/DeleteModelInvocationLoggingConfigurationCommand"; +import { GetCustomModelCommandInput, GetCustomModelCommandOutput } from "./commands/GetCustomModelCommand"; +import { GetFoundationModelCommandInput, GetFoundationModelCommandOutput } from "./commands/GetFoundationModelCommand"; +import { + GetModelCustomizationJobCommandInput, + GetModelCustomizationJobCommandOutput, +} from "./commands/GetModelCustomizationJobCommand"; +import { + GetModelInvocationLoggingConfigurationCommandInput, + GetModelInvocationLoggingConfigurationCommandOutput, +} from "./commands/GetModelInvocationLoggingConfigurationCommand"; +import { ListCustomModelsCommandInput, ListCustomModelsCommandOutput } from "./commands/ListCustomModelsCommand"; +import { + ListFoundationModelsCommandInput, + ListFoundationModelsCommandOutput, +} from "./commands/ListFoundationModelsCommand"; +import { + ListModelCustomizationJobsCommandInput, + ListModelCustomizationJobsCommandOutput, +} from "./commands/ListModelCustomizationJobsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + PutModelInvocationLoggingConfigurationCommandInput, + PutModelInvocationLoggingConfigurationCommandOutput, +} from "./commands/PutModelInvocationLoggingConfigurationCommand"; +import { + StopModelCustomizationJobCommandInput, + StopModelCustomizationJobCommandOutput, +} from "./commands/StopModelCustomizationJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | CreateModelCustomizationJobCommandInput + | DeleteCustomModelCommandInput + | DeleteModelInvocationLoggingConfigurationCommandInput + | GetCustomModelCommandInput + | GetFoundationModelCommandInput + | GetModelCustomizationJobCommandInput + | GetModelInvocationLoggingConfigurationCommandInput + | ListCustomModelsCommandInput + | ListFoundationModelsCommandInput + | ListModelCustomizationJobsCommandInput + | ListTagsForResourceCommandInput + | PutModelInvocationLoggingConfigurationCommandInput + | StopModelCustomizationJobCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | CreateModelCustomizationJobCommandOutput + | DeleteCustomModelCommandOutput + | DeleteModelInvocationLoggingConfigurationCommandOutput + | GetCustomModelCommandOutput + | GetFoundationModelCommandOutput + | GetModelCustomizationJobCommandOutput + | GetModelInvocationLoggingConfigurationCommandOutput + | ListCustomModelsCommandOutput + | ListFoundationModelsCommandOutput + | ListModelCustomizationJobsCommandOutput + | ListTagsForResourceCommandOutput + | PutModelInvocationLoggingConfigurationCommandOutput + | StopModelCustomizationJobCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput; + +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __ProviderDescribes the API operations for creating and managing Bedrock models.
+ */ +export class BedrockClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + BedrockClientResolvedConfig +> { + /** + * The resolved configuration of BedrockClient class. This is resolved and normalized from the {@link BedrockClientConfig | constructor configuration interface}. + */ + readonly config: BedrockClientResolvedConfig; + + constructor(...[configuration]: __CheckOptionalClientConfigCreates a fine-tuning job to customize a base model.
+ *You specify the base foundation model and the location of the training data. + * After the model-customization job completes successfully, your custom model resource will be ready to use. Training data + * contains input and output text for each record in a JSONL format. Optionally, you can specify validation data + * in the same format as the training data. Bedrock returns validation loss metrics and output generations + * after the job completes. + *
+ *
+ * Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size.
+ * To monitor a job, use the GetModelCustomizationJob
operation to retrieve the job status.
For more information, see Custom models in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, CreateModelCustomizationJobCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, CreateModelCustomizationJobCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // CreateModelCustomizationJobRequest + * jobName: "STRING_VALUE", // required + * customModelName: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", // required + * clientRequestToken: "STRING_VALUE", + * baseModelIdentifier: "STRING_VALUE", // required + * customModelKmsKeyId: "STRING_VALUE", + * jobTags: [ // TagList + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * customModelTags: [ + * { + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * trainingDataConfig: { // TrainingDataConfig + * s3Uri: "STRING_VALUE", // required + * }, + * validationDataConfig: { // ValidationDataConfig + * validators: [ // Validators // required + * { // Validator + * s3Uri: "STRING_VALUE", // required + * }, + * ], + * }, + * outputDataConfig: { // OutputDataConfig + * s3Uri: "STRING_VALUE", // required + * }, + * hyperParameters: { // ModelCustomizationHyperParameters // required + * "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 ARN was not found. Check the 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.
+ * + */ +export class CreateModelCustomizationJobCommand extends $Command< + CreateModelCustomizationJobCommandInput, + CreateModelCustomizationJobCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateModelCustomizationJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDeletes a custom model that you created earlier. For more information, see Custom models in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, DeleteCustomModelCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, DeleteCustomModelCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // DeleteCustomModelRequest + * modelIdentifier: "STRING_VALUE", // required + * }; + * const command = new DeleteCustomModelCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteCustomModelCommandInput - {@link DeleteCustomModelCommandInput} + * @returns {@link DeleteCustomModelCommandOutput} + * @see {@link DeleteCustomModelCommandInput} for command's `input` shape. + * @see {@link DeleteCustomModelCommandOutput} 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 ARN was not found. Check the 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.
+ * + */ +export class DeleteCustomModelCommand extends $Command< + DeleteCustomModelCommandInput, + DeleteCustomModelCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteCustomModelCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDelete the invocation logging.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, DeleteModelInvocationLoggingConfigurationCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, DeleteModelInvocationLoggingConfigurationCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = {}; + * const command = new DeleteModelInvocationLoggingConfigurationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteModelInvocationLoggingConfigurationCommandInput - {@link DeleteModelInvocationLoggingConfigurationCommandInput} + * @returns {@link DeleteModelInvocationLoggingConfigurationCommandOutput} + * @see {@link DeleteModelInvocationLoggingConfigurationCommandInput} for command's `input` shape. + * @see {@link DeleteModelInvocationLoggingConfigurationCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link BedrockServiceException} + *Base exception class for all service exceptions from Bedrock service.
+ * + */ +export class DeleteModelInvocationLoggingConfigurationCommand extends $Command< + DeleteModelInvocationLoggingConfigurationCommandInput, + DeleteModelInvocationLoggingConfigurationCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteModelInvocationLoggingConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGet the properties associated with a Bedrock custom model that you have created.For more information, see Custom models in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, GetCustomModelCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, GetCustomModelCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // GetCustomModelRequest + * modelIdentifier: "STRING_VALUE", // required + * }; + * const command = new GetCustomModelCommand(input); + * const response = await client.send(command); + * // { // GetCustomModelResponse + * // modelArn: "STRING_VALUE", // required + * // modelName: "STRING_VALUE", // required + * // jobName: "STRING_VALUE", + * // jobArn: "STRING_VALUE", // required + * // baseModelArn: "STRING_VALUE", // required + * // modelKmsKeyArn: "STRING_VALUE", + * // hyperParameters: { // ModelCustomizationHyperParameters + * // "The request is denied because of missing access permissions.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource ARN was not found. Check the 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.
+ * + */ +export class GetCustomModelCommand extends $Command< + GetCustomModelCommandInput, + GetCustomModelCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetCustomModelCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGet details about a Bedrock foundation model.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, GetFoundationModelCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, GetFoundationModelCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // GetFoundationModelRequest + * modelIdentifier: "STRING_VALUE", // required + * }; + * const command = new GetFoundationModelCommand(input); + * const response = await client.send(command); + * // { // GetFoundationModelResponse + * // modelDetails: { // FoundationModelDetails + * // modelArn: "STRING_VALUE", // required + * // modelId: "STRING_VALUE", // required + * // modelName: "STRING_VALUE", + * // providerName: "STRING_VALUE", + * // inputModalities: [ // ModelModalityList + * // "TEXT" || "IMAGE" || "EMBEDDING", + * // ], + * // outputModalities: [ + * // "TEXT" || "IMAGE" || "EMBEDDING", + * // ], + * // responseStreamingSupported: true || false, + * // customizationsSupported: [ // ModelCustomizationList + * // "FINE_TUNING", + * // ], + * // inferenceTypesSupported: [ // InferenceTypeList + * // "ON_DEMAND" || "PROVISIONED", + * // ], + * // }, + * // }; + * + * ``` + * + * @param GetFoundationModelCommandInput - {@link GetFoundationModelCommandInput} + * @returns {@link GetFoundationModelCommandOutput} + * @see {@link GetFoundationModelCommandInput} for command's `input` shape. + * @see {@link GetFoundationModelCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource ARN was not found. Check the 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.
+ * + */ +export class GetFoundationModelCommand extends $Command< + GetFoundationModelCommandInput, + GetFoundationModelCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetFoundationModelCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackRetrieves the properties associated with a model-customization job, including the status of the job. + * For more information, see Custom models in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, GetModelCustomizationJobCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, GetModelCustomizationJobCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // GetModelCustomizationJobRequest + * jobIdentifier: "STRING_VALUE", // required + * }; + * const command = new GetModelCustomizationJobCommand(input); + * const response = await client.send(command); + * // { // GetModelCustomizationJobResponse + * // jobArn: "STRING_VALUE", // required + * // jobName: "STRING_VALUE", // required + * // outputModelName: "STRING_VALUE", // required + * // outputModelArn: "STRING_VALUE", + * // clientRequestToken: "STRING_VALUE", + * // roleArn: "STRING_VALUE", // required + * // status: "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped", + * // failureMessage: "STRING_VALUE", + * // creationTime: new Date("TIMESTAMP"), // required + * // lastModifiedTime: new Date("TIMESTAMP"), + * // endTime: new Date("TIMESTAMP"), + * // baseModelArn: "STRING_VALUE", // required + * // hyperParameters: { // ModelCustomizationHyperParameters // required + * // "The request is denied because of missing access permissions.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource ARN was not found. Check the 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.
+ * + */ +export class GetModelCustomizationJobCommand extends $Command< + GetModelCustomizationJobCommandInput, + GetModelCustomizationJobCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetModelCustomizationJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGet the current configuration values for model invocation logging.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, GetModelInvocationLoggingConfigurationCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, GetModelInvocationLoggingConfigurationCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = {}; + * const command = new GetModelInvocationLoggingConfigurationCommand(input); + * const response = await client.send(command); + * // { // GetModelInvocationLoggingConfigurationResponse + * // loggingConfig: { // LoggingConfig + * // cloudWatchConfig: { // CloudWatchConfig + * // logGroupName: "STRING_VALUE", // required + * // roleArn: "STRING_VALUE", // required + * // largeDataDeliveryS3Config: { // S3Config + * // bucketName: "STRING_VALUE", // required + * // keyPrefix: "STRING_VALUE", + * // }, + * // }, + * // s3Config: { + * // bucketName: "STRING_VALUE", // required + * // keyPrefix: "STRING_VALUE", + * // }, + * // textDataDeliveryEnabled: true || false, + * // imageDataDeliveryEnabled: true || false, + * // embeddingDataDeliveryEnabled: true || false, + * // }, + * // }; + * + * ``` + * + * @param GetModelInvocationLoggingConfigurationCommandInput - {@link GetModelInvocationLoggingConfigurationCommandInput} + * @returns {@link GetModelInvocationLoggingConfigurationCommandOutput} + * @see {@link GetModelInvocationLoggingConfigurationCommandInput} for command's `input` shape. + * @see {@link GetModelInvocationLoggingConfigurationCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link BedrockServiceException} + *Base exception class for all service exceptions from Bedrock service.
+ * + */ +export class GetModelInvocationLoggingConfigurationCommand extends $Command< + GetModelInvocationLoggingConfigurationCommandInput, + GetModelInvocationLoggingConfigurationCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetModelInvocationLoggingConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackReturns a list of the custom models that you have created with the CreateModelCustomizationJob
operation.
For more information, see Custom models in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, ListCustomModelsCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, ListCustomModelsCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // ListCustomModelsRequest + * creationTimeBefore: new Date("TIMESTAMP"), + * creationTimeAfter: new Date("TIMESTAMP"), + * nameContains: "STRING_VALUE", + * baseModelArnEquals: "STRING_VALUE", + * foundationModelArnEquals: "STRING_VALUE", + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * sortBy: "CreationTime", + * sortOrder: "Ascending" || "Descending", + * }; + * const command = new ListCustomModelsCommand(input); + * const response = await client.send(command); + * // { // ListCustomModelsResponse + * // nextToken: "STRING_VALUE", + * // modelSummaries: [ // CustomModelSummaryList + * // { // CustomModelSummary + * // modelArn: "STRING_VALUE", // required + * // modelName: "STRING_VALUE", // required + * // creationTime: new Date("TIMESTAMP"), // required + * // baseModelArn: "STRING_VALUE", // required + * // baseModelName: "STRING_VALUE", // required + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListCustomModelsCommandInput - {@link ListCustomModelsCommandInput} + * @returns {@link ListCustomModelsCommandOutput} + * @see {@link ListCustomModelsCommandInput} for command's `input` shape. + * @see {@link ListCustomModelsCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @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.
+ * + */ +export class ListCustomModelsCommand extends $Command< + ListCustomModelsCommandInput, + ListCustomModelsCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListCustomModelsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackList of Bedrock foundation models that you can use. For more information, see Foundation models in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, ListFoundationModelsCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, ListFoundationModelsCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // ListFoundationModelsRequest + * byProvider: "STRING_VALUE", + * byCustomizationType: "FINE_TUNING", + * byOutputModality: "TEXT" || "IMAGE" || "EMBEDDING", + * byInferenceType: "ON_DEMAND" || "PROVISIONED", + * }; + * const command = new ListFoundationModelsCommand(input); + * const response = await client.send(command); + * // { // ListFoundationModelsResponse + * // modelSummaries: [ // FoundationModelSummaryList + * // { // FoundationModelSummary + * // modelArn: "STRING_VALUE", // required + * // modelId: "STRING_VALUE", // required + * // modelName: "STRING_VALUE", + * // providerName: "STRING_VALUE", + * // inputModalities: [ // ModelModalityList + * // "TEXT" || "IMAGE" || "EMBEDDING", + * // ], + * // outputModalities: [ + * // "TEXT" || "IMAGE" || "EMBEDDING", + * // ], + * // responseStreamingSupported: true || false, + * // customizationsSupported: [ // ModelCustomizationList + * // "FINE_TUNING", + * // ], + * // inferenceTypesSupported: [ // InferenceTypeList + * // "ON_DEMAND" || "PROVISIONED", + * // ], + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListFoundationModelsCommandInput - {@link ListFoundationModelsCommandInput} + * @returns {@link ListFoundationModelsCommandOutput} + * @see {@link ListFoundationModelsCommandInput} for command's `input` shape. + * @see {@link ListFoundationModelsCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @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.
+ * + */ +export class ListFoundationModelsCommand extends $Command< + ListFoundationModelsCommandInput, + ListFoundationModelsCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListFoundationModelsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackReturns a list of model customization jobs that you have submitted. You can filter the jobs to return based on + * one or more criteria.
+ *For more information, see Custom models in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, ListModelCustomizationJobsCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, ListModelCustomizationJobsCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // ListModelCustomizationJobsRequest + * creationTimeAfter: new Date("TIMESTAMP"), + * creationTimeBefore: new Date("TIMESTAMP"), + * statusEquals: "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped", + * nameContains: "STRING_VALUE", + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * sortBy: "CreationTime", + * sortOrder: "Ascending" || "Descending", + * }; + * const command = new ListModelCustomizationJobsCommand(input); + * const response = await client.send(command); + * // { // ListModelCustomizationJobsResponse + * // nextToken: "STRING_VALUE", + * // modelCustomizationJobSummaries: [ // ModelCustomizationJobSummaries + * // { // ModelCustomizationJobSummary + * // jobArn: "STRING_VALUE", // required + * // baseModelArn: "STRING_VALUE", // required + * // jobName: "STRING_VALUE", // required + * // status: "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped", // required + * // lastModifiedTime: new Date("TIMESTAMP"), + * // creationTime: new Date("TIMESTAMP"), // required + * // endTime: new Date("TIMESTAMP"), + * // customModelArn: "STRING_VALUE", + * // customModelName: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListModelCustomizationJobsCommandInput - {@link ListModelCustomizationJobsCommandInput} + * @returns {@link ListModelCustomizationJobsCommandOutput} + * @see {@link ListModelCustomizationJobsCommandInput} for command's `input` shape. + * @see {@link ListModelCustomizationJobsCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @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.
+ * + */ +export class ListModelCustomizationJobsCommand extends $Command< + ListModelCustomizationJobsCommandInput, + ListModelCustomizationJobsCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListModelCustomizationJobsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackList the tags associated with the specified resource.
+ *For more information, see Tagging resources in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, ListTagsForResourceCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, ListTagsForResourceCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // ListTagsForResourceRequest + * resourceARN: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // tags: [ // TagList + * // { // Tag + * // key: "STRING_VALUE", // required + * // value: "STRING_VALUE", // required + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource ARN was not found. Check the 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.
+ * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackSet the configuration values for model invocation logging.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, PutModelInvocationLoggingConfigurationCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, PutModelInvocationLoggingConfigurationCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // PutModelInvocationLoggingConfigurationRequest + * loggingConfig: { // LoggingConfig + * cloudWatchConfig: { // CloudWatchConfig + * logGroupName: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", // required + * largeDataDeliveryS3Config: { // S3Config + * bucketName: "STRING_VALUE", // required + * keyPrefix: "STRING_VALUE", + * }, + * }, + * s3Config: { + * bucketName: "STRING_VALUE", // required + * keyPrefix: "STRING_VALUE", + * }, + * textDataDeliveryEnabled: true || false, + * imageDataDeliveryEnabled: true || false, + * embeddingDataDeliveryEnabled: true || false, + * }, + * }; + * const command = new PutModelInvocationLoggingConfigurationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param PutModelInvocationLoggingConfigurationCommandInput - {@link PutModelInvocationLoggingConfigurationCommandInput} + * @returns {@link PutModelInvocationLoggingConfigurationCommandOutput} + * @see {@link PutModelInvocationLoggingConfigurationCommandInput} for command's `input` shape. + * @see {@link PutModelInvocationLoggingConfigurationCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @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.
+ * + */ +export class PutModelInvocationLoggingConfigurationCommand extends $Command< + PutModelInvocationLoggingConfigurationCommandInput, + PutModelInvocationLoggingConfigurationCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: PutModelInvocationLoggingConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackStops an active model customization job. For more information, see Custom models in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, StopModelCustomizationJobCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, StopModelCustomizationJobCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // StopModelCustomizationJobRequest + * jobIdentifier: "STRING_VALUE", // required + * }; + * const command = new StopModelCustomizationJobCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param StopModelCustomizationJobCommandInput - {@link StopModelCustomizationJobCommandInput} + * @returns {@link StopModelCustomizationJobCommandOutput} + * @see {@link StopModelCustomizationJobCommandInput} for command's `input` shape. + * @see {@link StopModelCustomizationJobCommandOutput} 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 ARN was not found. Check the 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.
+ * + */ +export class StopModelCustomizationJobCommand extends $Command< + StopModelCustomizationJobCommandInput, + StopModelCustomizationJobCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StopModelCustomizationJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackAssociate tags with a resource. For more information, see Tagging resources in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, TagResourceCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, TagResourceCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // TagResourceRequest + * resourceARN: "STRING_VALUE", // required + * tags: [ // TagList // required + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource ARN was not found. Check the ARN and try your request again.
+ * + * @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.
+ * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackRemove one or more tags from a resource. For more information, see Tagging resources in the Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockClient, UntagResourceCommand } from "@aws-sdk/client-bedrock"; // ES Modules import + * // const { BedrockClient, UntagResourceCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import + * const client = new BedrockClient(config); + * const input = { // UntagResourceRequest + * resourceARN: "STRING_VALUE", // required + * tagKeys: [ // TagKeyList // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} 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 InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource ARN was not found. Check the 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.
+ * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + BedrockClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDescribes the API operations for creating and managing Bedrock models.
+ * + * @packageDocumentation + */ +export * from "./BedrockClient"; +export * from "./Bedrock"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +export { BedrockServiceException } from "./models/BedrockServiceException"; diff --git a/clients/client-bedrock/src/models/BedrockServiceException.ts b/clients/client-bedrock/src/models/BedrockServiceException.ts new file mode 100644 index 0000000000000..b07e57a4658ba --- /dev/null +++ b/clients/client-bedrock/src/models/BedrockServiceException.ts @@ -0,0 +1,22 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export { __ServiceException, __ServiceExceptionOptions }; + +/** + * @public + * + * Base exception class for all service exceptions from Bedrock service. + */ +export class BedrockServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, BedrockServiceException.prototype); + } +} diff --git a/clients/client-bedrock/src/models/index.ts b/clients/client-bedrock/src/models/index.ts new file mode 100644 index 0000000000000..9eaceb12865f8 --- /dev/null +++ b/clients/client-bedrock/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-bedrock/src/models/models_0.ts b/clients/client-bedrock/src/models/models_0.ts new file mode 100644 index 0000000000000..5c287918a3135 --- /dev/null +++ b/clients/client-bedrock/src/models/models_0.ts @@ -0,0 +1,1368 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; + +import { BedrockServiceException as __BaseException } from "./BedrockServiceException"; + +/** + * @public + *The request is denied because of missing access permissions.
+ */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeAn internal server error occurred. Retry your request.
+ */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThe number of requests exceeds the limit. Resubmit your request later.
+ */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeS3 configuration for storing log data.
+ */ +export interface S3Config { + /** + * @public + *S3 bucket name.
+ */ + bucketName: string | undefined; + + /** + * @public + *S3 prefix.
+ */ + keyPrefix?: string; +} + +/** + * @public + *CloudWatch logging configuration.
+ */ +export interface CloudWatchConfig { + /** + * @public + *The log group name.
+ */ + logGroupName: string | undefined; + + /** + * @public + *The role ARN.
+ */ + roleArn: string | undefined; + + /** + * @public + *S3 configuration for delivering a large amount of data.
+ */ + largeDataDeliveryS3Config?: S3Config; +} + +/** + * @public + *Configuration fields for invokation logging.
+ */ +export interface LoggingConfig { + /** + * @public + *CloudWatch logging configuration.
+ */ + cloudWatchConfig?: CloudWatchConfig; + + /** + * @public + *S3 configuration for storing log data.
+ */ + s3Config?: S3Config; + + /** + * @public + *Set to include text data in the log delivery.
+ */ + textDataDeliveryEnabled?: boolean; + + /** + * @public + *Set to include image data in the log delivery.
+ */ + imageDataDeliveryEnabled?: boolean; + + /** + * @public + *Set to include embeddings data in the log delivery.
+ */ + embeddingDataDeliveryEnabled?: boolean; +} + +/** + * @public + */ +export interface GetModelInvocationLoggingConfigurationResponse { + /** + * @public + *The current configuration values.
+ */ + loggingConfig?: LoggingConfig; +} + +/** + * @public + */ +export interface PutModelInvocationLoggingConfigurationRequest { + /** + * @public + *The logging configuration values to set.
+ */ + loggingConfig: LoggingConfig | undefined; +} + +/** + * @public + */ +export interface PutModelInvocationLoggingConfigurationResponse {} + +/** + * @public + *Input validation failed. Check your request parameters and retry the request.
+ */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeError occurred because of a conflict while performing an operation.
+ */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeName of the model to delete.
+ */ + modelIdentifier: string | undefined; +} + +/** + * @public + */ +export interface DeleteCustomModelResponse {} + +/** + * @public + *The specified resource ARN was not found. Check the ARN and try your request again.
+ */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeName or ARN of the custom model.
+ */ + modelIdentifier: string | undefined; +} + +/** + * @public + *S3 Location of the output data.
+ */ +export interface OutputDataConfig { + /** + * @public + *The S3 URI where the output data is stored.
+ */ + s3Uri: string | undefined; +} + +/** + * @public + *S3 Location of the training data.
+ */ +export interface TrainingDataConfig { + /** + * @public + *The S3 URI where the training data is stored.
+ */ + s3Uri: string | undefined; +} + +/** + * @public + *Metrics associated with the custom job.
+ */ +export interface TrainingMetrics { + /** + * @public + *Loss metric associated with the custom job.
+ */ + trainingLoss?: number; +} + +/** + * @public + *Information about a validator.
+ */ +export interface Validator { + /** + * @public + *The S3 URI where the validation data is stored.
+ */ + s3Uri: string | undefined; +} + +/** + * @public + *Array of up to 10 validators.
+ */ +export interface ValidationDataConfig { + /** + * @public + *Information about the validators.
+ */ + validators: Validator[] | undefined; +} + +/** + * @public + *The metric for the validator.
+ */ +export interface ValidatorMetric { + /** + * @public + *The validation loss associated with this validator.
+ */ + validationLoss?: number; +} + +/** + * @public + */ +export interface GetCustomModelResponse { + /** + * @public + *ARN associated with this model.
+ */ + modelArn: string | undefined; + + /** + * @public + *Model name associated with this model.
+ */ + modelName: string | undefined; + + /** + * @public + *Job name associated with this model.
+ */ + jobName?: string; + + /** + * @public + *Job ARN associated with this model.
+ */ + jobArn: string | undefined; + + /** + * @public + *ARN of the base model.
+ */ + baseModelArn: string | undefined; + + /** + * @public + *The custom model is encrypted at rest using this key.
+ */ + modelKmsKeyArn?: string; + + /** + * @public + *Hyperparameter values associated with this model.
+ */ + hyperParameters?: RecordInformation about the training dataset.
+ */ + trainingDataConfig: TrainingDataConfig | undefined; + + /** + * @public + *Array of up to 10 validators.
+ */ + validationDataConfig?: ValidationDataConfig; + + /** + * @public + *Output data configuration associated with this custom model.
+ */ + outputDataConfig: OutputDataConfig | undefined; + + /** + * @public + *The training metrics from the job creation.
+ */ + trainingMetrics?: TrainingMetrics; + + /** + * @public + *The validation metrics from the job creation.
+ */ + validationMetrics?: ValidatorMetric[]; + + /** + * @public + *Creation time of the model.
+ */ + creationTime: Date | undefined; +} + +/** + * @public + */ +export interface GetFoundationModelRequest { + /** + * @public + *The model identifier.
+ */ + modelIdentifier: string | undefined; +} + +/** + * @public + * @enum + */ +export const ModelCustomization = { + FINE_TUNING: "FINE_TUNING", +} as const; + +/** + * @public + */ +export type ModelCustomization = (typeof ModelCustomization)[keyof typeof ModelCustomization]; + +/** + * @public + * @enum + */ +export const InferenceType = { + ON_DEMAND: "ON_DEMAND", + PROVISIONED: "PROVISIONED", +} as const; + +/** + * @public + */ +export type InferenceType = (typeof InferenceType)[keyof typeof InferenceType]; + +/** + * @public + * @enum + */ +export const ModelModality = { + EMBEDDING: "EMBEDDING", + IMAGE: "IMAGE", + TEXT: "TEXT", +} as const; + +/** + * @public + */ +export type ModelModality = (typeof ModelModality)[keyof typeof ModelModality]; + +/** + * @public + *Information about a foundation model.
+ */ +export interface FoundationModelDetails { + /** + * @public + *The model ARN.
+ */ + modelArn: string | undefined; + + /** + * @public + *The model identifier.
+ */ + modelId: string | undefined; + + /** + * @public + *The model name.
+ */ + modelName?: string; + + /** + * @public + *he model's provider name.
+ */ + providerName?: string; + + /** + * @public + *The input modalities that the model supports.
+ */ + inputModalities?: (ModelModality | string)[]; + + /** + * @public + *The output modalities that the model supports.
+ */ + outputModalities?: (ModelModality | string)[]; + + /** + * @public + *Indicates whether the model supports streaming.
+ */ + responseStreamingSupported?: boolean; + + /** + * @public + *The customization that the model supports.
+ */ + customizationsSupported?: (ModelCustomization | string)[]; + + /** + * @public + *The inference types that the model supports.
+ */ + inferenceTypesSupported?: (InferenceType | string)[]; +} + +/** + * @public + */ +export interface GetFoundationModelResponse { + /** + * @public + *Information about the foundation model.
+ */ + modelDetails?: FoundationModelDetails; +} + +/** + * @public + * @enum + */ +export const SortModelsBy = { + CREATION_TIME: "CreationTime", +} as const; + +/** + * @public + */ +export type SortModelsBy = (typeof SortModelsBy)[keyof typeof SortModelsBy]; + +/** + * @public + * @enum + */ +export const SortOrder = { + ASCENDING: "Ascending", + DESCENDING: "Descending", +} as const; + +/** + * @public + */ +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]; + +/** + * @public + */ +export interface ListCustomModelsRequest { + /** + * @public + *Return custom models created before the specified time.
+ */ + creationTimeBefore?: Date; + + /** + * @public + *Return custom models created after the specified time.
+ */ + creationTimeAfter?: Date; + + /** + * @public + *Return custom models only if the job name contains these characters.
+ */ + nameContains?: string; + + /** + * @public + *Return custom models only if the base model ARN matches this parameter.
+ */ + baseModelArnEquals?: string; + + /** + * @public + *Return custom models only if the foundation model ARN matches this parameter.
+ */ + foundationModelArnEquals?: string; + + /** + * @public + *Maximum number of results to return in the response.
+ */ + maxResults?: number; + + /** + * @public + *Continuation token from the previous response, for Bedrock to list the next set of results.
+ */ + nextToken?: string; + + /** + * @public + *The field to sort by in the returned list of models.
+ */ + sortBy?: SortModelsBy | string; + + /** + * @public + *The sort order of the results.
+ */ + sortOrder?: SortOrder | string; +} + +/** + * @public + *Summary information for a custom model.
+ */ +export interface CustomModelSummary { + /** + * @public + *The ARN of the custom model.
+ */ + modelArn: string | undefined; + + /** + * @public + *The name of the custom model.
+ */ + modelName: string | undefined; + + /** + * @public + *Creation time of the model.
+ */ + creationTime: Date | undefined; + + /** + * @public + *The base model ARN.
+ */ + baseModelArn: string | undefined; + + /** + * @public + *The base model name.
+ */ + baseModelName: string | undefined; +} + +/** + * @public + */ +export interface ListCustomModelsResponse { + /** + * @public + *Continuation token for the next request to list the next set of results.
+ */ + nextToken?: string; + + /** + * @public + *Model summaries.
+ */ + modelSummaries?: CustomModelSummary[]; +} + +/** + * @public + */ +export interface ListFoundationModelsRequest { + /** + * @public + *A Bedrock model provider.
+ */ + byProvider?: string; + + /** + * @public + *List by customization type.
+ */ + byCustomizationType?: ModelCustomization | string; + + /** + * @public + *List by output modality type.
+ */ + byOutputModality?: ModelModality | string; + + /** + * @public + *List by inference type.
+ */ + byInferenceType?: InferenceType | string; +} + +/** + * @public + *Summary information for a foundation model.
+ */ +export interface FoundationModelSummary { + /** + * @public + *The ARN of the foundation model.
+ */ + modelArn: string | undefined; + + /** + * @public + *The model Id of the foundation model.
+ */ + modelId: string | undefined; + + /** + * @public + *The name of the model.
+ */ + modelName?: string; + + /** + * @public + *The model's provider name.
+ */ + providerName?: string; + + /** + * @public + *The input modalities that the model supports.
+ */ + inputModalities?: (ModelModality | string)[]; + + /** + * @public + *The output modalities that the model supports.
+ */ + outputModalities?: (ModelModality | string)[]; + + /** + * @public + *Indicates whether the model supports streaming.
+ */ + responseStreamingSupported?: boolean; + + /** + * @public + *Whether the model supports fine-tuning or continual pre-training.
+ */ + customizationsSupported?: (ModelCustomization | string)[]; + + /** + * @public + *The inference types that the model supports.
+ */ + inferenceTypesSupported?: (InferenceType | string)[]; +} + +/** + * @public + */ +export interface ListFoundationModelsResponse { + /** + * @public + *A list of bedrock foundation models.
+ */ + modelSummaries?: FoundationModelSummary[]; +} + +/** + * @public + */ +export interface ListTagsForResourceRequest { + /** + * @public + *The ARN of the resource.
+ */ + resourceARN: string | undefined; +} + +/** + * @public + *Definition of the key/value pair for a tag.
+ */ +export interface Tag { + /** + * @public + *Key for the tag.
+ */ + key: string | undefined; + + /** + * @public + *Value for the tag.
+ */ + value: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + * @public + *An array of the tags associated with this resource.
+ */ + tags?: Tag[]; +} + +/** + * @public + */ +export interface TagResourceRequest { + /** + * @public + *The ARN of the resource to tag.
+ */ + resourceARN: string | undefined; + + /** + * @public + *Tags to associate with the resource.
+ */ + tags: Tag[] | undefined; +} + +/** + * @public + */ +export interface TagResourceResponse {} + +/** + * @public + *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.
+ */ +export class TooManyTagsException extends __BaseException { + readonly name: "TooManyTagsException" = "TooManyTagsException"; + readonly $fault: "client" = "client"; + /** + * @public + *The name of the resource with too many tags.
+ */ + resourceName?: string; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThe ARN of the resource to untag.
+ */ + resourceARN: string | undefined; + + /** + * @public + *Tag keys of the tags to remove from the resource.
+ */ + tagKeys: string[] | undefined; +} + +/** + * @public + */ +export interface UntagResourceResponse {} + +/** + * @public + *VPC configuration.
+ */ +export interface VpcConfig { + /** + * @public + *VPC configuration subnets.
+ */ + subnetIds: string[] | undefined; + + /** + * @public + *VPC configuration security group Ids.
+ */ + securityGroupIds: string[] | undefined; +} + +/** + * @public + */ +export interface CreateModelCustomizationJobRequest { + /** + * @public + *Enter a unique name for the fine-tuning job.
+ */ + jobName: string | undefined; + + /** + * @public + *Enter a name for the custom model.
+ */ + customModelName: string | undefined; + + /** + * @public + *The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
+ * For example, during model training, Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket.
+ * To pass this role to Bedrock, the caller of this API must have the iam:PassRole
permission.
+ *
Unique token value that you can provide. The GetModelCustomizationJob response includes the same token value.
+ */ + clientRequestToken?: string; + + /** + * @public + *Name of the base model.
+ */ + baseModelIdentifier: string | undefined; + + /** + * @public + *The custom model is encrypted at rest using this key.
+ */ + customModelKmsKeyId?: string; + + /** + * @public + *Assign tags to the job.
+ */ + jobTags?: Tag[]; + + /** + * @public + *Assign tags to the custom model.
+ */ + customModelTags?: Tag[]; + + /** + * @public + *Information about the training dataset.
+ */ + trainingDataConfig: TrainingDataConfig | undefined; + + /** + * @public + *Information about the validation dataset.
+ */ + validationDataConfig?: ValidationDataConfig; + + /** + * @public + *S3 location for the output data.
+ */ + outputDataConfig: OutputDataConfig | undefined; + + /** + * @public + *Parameters related to tuning the model.
+ */ + hyperParameters: RecordVPC configuration (optional). Configuration parameters for the + * private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
+ */ + vpcConfig?: VpcConfig; +} + +/** + * @public + */ +export interface CreateModelCustomizationJobResponse { + /** + * @public + *ARN of the fine tuning job
+ */ + jobArn: string | undefined; +} + +/** + * @public + *The number of requests exceeds the service quota. Resubmit your request later.
+ */ +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeIdentifier for the customization job.
+ */ + jobIdentifier: string | undefined; +} + +/** + * @public + * @enum + */ +export const ModelCustomizationJobStatus = { + COMPLETED: "Completed", + FAILED: "Failed", + IN_PROGRESS: "InProgress", + STOPPED: "Stopped", + STOPPING: "Stopping", +} as const; + +/** + * @public + */ +export type ModelCustomizationJobStatus = + (typeof ModelCustomizationJobStatus)[keyof typeof ModelCustomizationJobStatus]; + +/** + * @public + */ +export interface GetModelCustomizationJobResponse { + /** + * @public + *The ARN of the customization job.
+ */ + jobArn: string | undefined; + + /** + * @public + *The name of the customization job.
+ */ + jobName: string | undefined; + + /** + * @public + *The name of the output model.
+ */ + outputModelName: string | undefined; + + /** + * @public + *The ARN of the output model.
+ */ + outputModelArn?: string; + + /** + * @public + *The token that you specified in the CreateCustomizationJob request.
+ */ + clientRequestToken?: string; + + /** + * @public + *The ARN of the IAM role.
+ */ + roleArn: string | undefined; + + /** + * @public + *The status of the job. A successful job transitions from in-progress to completed when the output model is ready to use. + * If the job failed, the failure message contains information about why the job failed.
+ */ + status?: ModelCustomizationJobStatus | string; + + /** + * @public + *Information about why the job failed.
+ */ + failureMessage?: string; + + /** + * @public + *Time that the resource was created.
+ */ + creationTime: Date | undefined; + + /** + * @public + *Time that the resource was last modified.
+ */ + lastModifiedTime?: Date; + + /** + * @public + *Time that the resource transitioned to terminal state.
+ */ + endTime?: Date; + + /** + * @public + *ARN of the base model.
+ */ + baseModelArn: string | undefined; + + /** + * @public + *The hyperparameter values for the job.
+ */ + hyperParameters: RecordS3 Location of the training data.
+ */ + trainingDataConfig: TrainingDataConfig | undefined; + + /** + * @public + *Array of up to 10 validators.
+ */ + validationDataConfig: ValidationDataConfig | undefined; + + /** + * @public + *Output data configuration
+ */ + outputDataConfig: OutputDataConfig | undefined; + + /** + * @public + *The custom model is encrypted at rest using this key.
+ */ + outputModelKmsKeyArn?: string; + + /** + * @public + *Metrics associated with the custom job.
+ */ + trainingMetrics?: TrainingMetrics; + + /** + * @public + *The loss metric for each validator that you provided in the createjob request.
+ */ + validationMetrics?: ValidatorMetric[]; + + /** + * @public + *VPC configuration for the custom model job.
+ */ + vpcConfig?: VpcConfig; +} + +/** + * @public + * @enum + */ +export const SortJobsBy = { + CREATION_TIME: "CreationTime", +} as const; + +/** + * @public + */ +export type SortJobsBy = (typeof SortJobsBy)[keyof typeof SortJobsBy]; + +/** + * @public + * @enum + */ +export const FineTuningJobStatus = { + COMPLETED: "Completed", + FAILED: "Failed", + IN_PROGRESS: "InProgress", + STOPPED: "Stopped", + STOPPING: "Stopping", +} as const; + +/** + * @public + */ +export type FineTuningJobStatus = (typeof FineTuningJobStatus)[keyof typeof FineTuningJobStatus]; + +/** + * @public + */ +export interface ListModelCustomizationJobsRequest { + /** + * @public + *Return customization jobs created after the specified time.
+ */ + creationTimeAfter?: Date; + + /** + * @public + *Return customization jobs created before the specified time.
+ */ + creationTimeBefore?: Date; + + /** + * @public + *Return customization jobs with the specified status.
+ */ + statusEquals?: FineTuningJobStatus | string; + + /** + * @public + *Return customization jobs only if the job name contains these characters.
+ */ + nameContains?: string; + + /** + * @public + *Maximum number of results to return in the response.
+ */ + maxResults?: number; + + /** + * @public + *Continuation token from the previous response, for Bedrock to list the next set of results.
+ */ + nextToken?: string; + + /** + * @public + *The field to sort by in the returned list of jobs.
+ */ + sortBy?: SortJobsBy | string; + + /** + * @public + *The sort order of the results.
+ */ + sortOrder?: SortOrder | string; +} + +/** + * @public + *Information about one customization job
+ */ +export interface ModelCustomizationJobSummary { + /** + * @public + *ARN of the customization job.
+ */ + jobArn: string | undefined; + + /** + * @public + *ARN of the base model.
+ */ + baseModelArn: string | undefined; + + /** + * @public + *Name of the customization job.
+ */ + jobName: string | undefined; + + /** + * @public + *Status of the customization job.
+ */ + status: ModelCustomizationJobStatus | string | undefined; + + /** + * @public + *Time that the customization job was last modified.
+ */ + lastModifiedTime?: Date; + + /** + * @public + *Creation time of the custom model.
+ */ + creationTime: Date | undefined; + + /** + * @public + *Time that the customization job ended.
+ */ + endTime?: Date; + + /** + * @public + *ARN of the custom model.
+ */ + customModelArn?: string; + + /** + * @public + *Name of the custom model.
+ */ + customModelName?: string; +} + +/** + * @public + */ +export interface ListModelCustomizationJobsResponse { + /** + * @public + *Page continuation token to use in the next request.
+ */ + nextToken?: string; + + /** + * @public + *Job summaries.
+ */ + modelCustomizationJobSummaries?: ModelCustomizationJobSummary[]; +} + +/** + * @public + */ +export interface StopModelCustomizationJobRequest { + /** + * @public + *Job identifier of the job to stop.
+ */ + jobIdentifier: string | undefined; +} + +/** + * @public + */ +export interface StopModelCustomizationJobResponse {} diff --git a/clients/client-bedrock/src/pagination/Interfaces.ts b/clients/client-bedrock/src/pagination/Interfaces.ts new file mode 100644 index 0000000000000..ec1f942315e03 --- /dev/null +++ b/clients/client-bedrock/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { BedrockClient } from "../BedrockClient"; + +/** + * @public + */ +export interface BedrockPaginationConfiguration extends PaginationConfiguration { + client: BedrockClient; +} diff --git a/clients/client-bedrock/src/pagination/ListCustomModelsPaginator.ts b/clients/client-bedrock/src/pagination/ListCustomModelsPaginator.ts new file mode 100644 index 0000000000000..012945120e6b3 --- /dev/null +++ b/clients/client-bedrock/src/pagination/ListCustomModelsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { BedrockClient } from "../BedrockClient"; +import { + ListCustomModelsCommand, + ListCustomModelsCommandInput, + ListCustomModelsCommandOutput, +} from "../commands/ListCustomModelsCommand"; +import { BedrockPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: BedrockClient, + input: ListCustomModelsCommandInput, + ...args: any +): PromiseThe request is denied because of missing access permissions.
", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.bedrock#AmazonBedrockControlPlaneService": { + "type": "service", + "version": "2023-04-20", + "resources": [ + { + "target": "com.amazonaws.bedrock#LoggingResource" + }, + { + "target": "com.amazonaws.bedrock#ModelResource" + }, + { + "target": "com.amazonaws.bedrock#ProvisionedModelThroughputResource" + }, + { + "target": "com.amazonaws.bedrock#SubscriptionResource" + }, + { + "target": "com.amazonaws.bedrock#TaggingResource" + }, + { + "target": "com.amazonaws.bedrock#TrainingResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Bedrock", + "endpointPrefix": "bedrock" + }, + "aws.auth#sigv4": { + "name": "bedrock" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Describes the API operations for creating and managing Bedrock models.
", + "smithy.api#title": "Amazon Bedrock", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + } + ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.bedrock#BaseModelIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-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-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|(([0-9a-zA-Z][_-]?)+)$" + } + }, + "com.amazonaws.bedrock#BedrockModelId": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 140 + }, + "smithy.api#pattern": "^[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}|)$" + } + }, + "com.amazonaws.bedrock#BrandedName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + }, + "smithy.api#pattern": "^.*$" + } + }, + "com.amazonaws.bedrock#BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + } + } + }, + "com.amazonaws.bedrock#CloudWatchConfig": { + "type": "structure", + "members": { + "logGroupName": { + "target": "com.amazonaws.bedrock#LogGroupName", + "traits": { + "smithy.api#documentation": "The log group name.
", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.bedrock#RoleArn", + "traits": { + "smithy.api#documentation": "The role ARN.
", + "smithy.api#required": {} + } + }, + "largeDataDeliveryS3Config": { + "target": "com.amazonaws.bedrock#S3Config", + "traits": { + "smithy.api#documentation": "S3 configuration for delivering a large amount of data.
" + } + } + }, + "traits": { + "smithy.api#documentation": "CloudWatch logging configuration.
" + } + }, + "com.amazonaws.bedrock#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "Error occurred because of a conflict while performing an operation.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrock#CreateModelCustomizationJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#CreateModelCustomizationJobRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#CreateModelCustomizationJobResponse" + }, + "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 a fine-tuning job to customize a base model.
\nYou specify the base foundation model and the location of the training data.\n After the model-customization job completes successfully, your custom model resource will be ready to use. Training data\n contains input and output text for each record in a JSONL format. Optionally, you can specify validation data\n in the same format as the training data. Bedrock returns validation loss metrics and output generations \n after the job completes.\n
\n\n Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size.\n To monitor a job, use the GetModelCustomizationJob
operation to retrieve the job status.
For more information, see Custom models in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 201, + "method": "POST", + "uri": "/model-customization-jobs" + }, + "smithy.api#idempotent": {}, + "smithy.api#tags": ["model-customization"] + } + }, + "com.amazonaws.bedrock#CreateModelCustomizationJobRequest": { + "type": "structure", + "members": { + "jobName": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "Enter a unique name for the fine-tuning job.
", + "smithy.api#required": {} + } + }, + "customModelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "Enter a name for the custom model.
", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.bedrock#RoleArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.\n For example, during model training, Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket.\n To pass this role to Bedrock, the caller of this API must have the iam:PassRole
permission.\n
Unique token value that you can provide. The GetModelCustomizationJob response includes the same token value.
", + "smithy.api#idempotencyToken": {} + } + }, + "baseModelIdentifier": { + "target": "com.amazonaws.bedrock#BaseModelIdentifier", + "traits": { + "smithy.api#documentation": "Name of the base model.
", + "smithy.api#required": {} + } + }, + "customModelKmsKeyId": { + "target": "com.amazonaws.bedrock#KmsKeyId", + "traits": { + "smithy.api#documentation": "The custom model is encrypted at rest using this key.
", + "smithy.api#tags": ["customer-managed-key"] + } + }, + "jobTags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "Assign tags to the job.
" + } + }, + "customModelTags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "Assign tags to the custom model.
" + } + }, + "trainingDataConfig": { + "target": "com.amazonaws.bedrock#TrainingDataConfig", + "traits": { + "smithy.api#documentation": "Information about the training dataset.
", + "smithy.api#required": {} + } + }, + "validationDataConfig": { + "target": "com.amazonaws.bedrock#ValidationDataConfig", + "traits": { + "smithy.api#documentation": "Information about the validation dataset.
" + } + }, + "outputDataConfig": { + "target": "com.amazonaws.bedrock#OutputDataConfig", + "traits": { + "smithy.api#documentation": "S3 location for the output data.
", + "smithy.api#required": {} + } + }, + "hyperParameters": { + "target": "com.amazonaws.bedrock#ModelCustomizationHyperParameters", + "traits": { + "smithy.api#documentation": "Parameters related to tuning the model.
", + "smithy.api#required": {} + } + }, + "vpcConfig": { + "target": "com.amazonaws.bedrock#VpcConfig", + "traits": { + "smithy.api#documentation": "VPC configuration (optional). Configuration parameters for the\n private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
", + "smithy.api#tags": ["model-customization-vpc"] + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#CreateModelCustomizationJobResponse": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobArn", + "traits": { + "smithy.api#documentation": "ARN of the fine tuning job
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#CustomModelArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}: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}$" + } + }, + "com.amazonaws.bedrock#CustomModelName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + }, + "smithy.api#pattern": "^([0-9a-zA-Z][_-]?)+$" + } + }, + "com.amazonaws.bedrock#CustomModelSummary": { + "type": "structure", + "members": { + "modelArn": { + "target": "com.amazonaws.bedrock#CustomModelArn", + "traits": { + "smithy.api#documentation": "The ARN of the custom model.
", + "smithy.api#required": {} + } + }, + "modelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "The name of the custom model.
", + "smithy.api#required": {} + } + }, + "creationTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Creation time of the model.
", + "smithy.api#required": {} + } + }, + "baseModelArn": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "The base model ARN.
", + "smithy.api#required": {} + } + }, + "baseModelName": { + "target": "com.amazonaws.bedrock#ModelName", + "traits": { + "smithy.api#documentation": "The base model name.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Summary information for a custom model.
" + } + }, + "com.amazonaws.bedrock#CustomModelSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#CustomModelSummary" + } + }, + "com.amazonaws.bedrock#DeleteCustomModel": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#DeleteCustomModelRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#DeleteCustomModelResponse" + }, + "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 a custom model that you created earlier. For more information, see Custom models in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/custom-models/{modelIdentifier}" + }, + "smithy.api#idempotent": {}, + "smithy.api#tags": ["model-customization"] + } + }, + "com.amazonaws.bedrock#DeleteCustomModelRequest": { + "type": "structure", + "members": { + "modelIdentifier": { + "target": "com.amazonaws.bedrock#ModelIdentifier", + "traits": { + "smithy.api#documentation": "Name of the model to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#DeleteCustomModelResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Delete the invocation logging.
", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/logging/modelinvocations" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfigurationRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfigurationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + } + } + }, + "com.amazonaws.bedrock#FineTuningJobStatus": { + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InProgress" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "STOPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopping" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopped" + } + } + } + }, + "com.amazonaws.bedrock#FoundationModelArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}$" + } + }, + "com.amazonaws.bedrock#FoundationModelDetails": { + "type": "structure", + "members": { + "modelArn": { + "target": "com.amazonaws.bedrock#FoundationModelArn", + "traits": { + "smithy.api#documentation": "The model ARN.
", + "smithy.api#required": {} + } + }, + "modelId": { + "target": "com.amazonaws.bedrock#BedrockModelId", + "traits": { + "smithy.api#documentation": "The model identifier.
", + "smithy.api#required": {} + } + }, + "modelName": { + "target": "com.amazonaws.bedrock#BrandedName", + "traits": { + "smithy.api#documentation": "The model name.
" + } + }, + "providerName": { + "target": "com.amazonaws.bedrock#BrandedName", + "traits": { + "smithy.api#documentation": "he model's provider name.
" + } + }, + "inputModalities": { + "target": "com.amazonaws.bedrock#ModelModalityList", + "traits": { + "smithy.api#documentation": "The input modalities that the model supports.
" + } + }, + "outputModalities": { + "target": "com.amazonaws.bedrock#ModelModalityList", + "traits": { + "smithy.api#documentation": "The output modalities that the model supports.
" + } + }, + "responseStreamingSupported": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether the model supports streaming.
" + } + }, + "customizationsSupported": { + "target": "com.amazonaws.bedrock#ModelCustomizationList", + "traits": { + "smithy.api#documentation": "The customization that the model supports.
" + } + }, + "inferenceTypesSupported": { + "target": "com.amazonaws.bedrock#InferenceTypeList", + "traits": { + "smithy.api#documentation": "The inference types that the model supports.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a foundation model.
" + } + }, + "com.amazonaws.bedrock#FoundationModelSummary": { + "type": "structure", + "members": { + "modelArn": { + "target": "com.amazonaws.bedrock#FoundationModelArn", + "traits": { + "smithy.api#documentation": "The ARN of the foundation model.
", + "smithy.api#required": {} + } + }, + "modelId": { + "target": "com.amazonaws.bedrock#BedrockModelId", + "traits": { + "smithy.api#documentation": "The model Id of the foundation model.
", + "smithy.api#required": {} + } + }, + "modelName": { + "target": "com.amazonaws.bedrock#BrandedName", + "traits": { + "smithy.api#documentation": "The name of the model.
" + } + }, + "providerName": { + "target": "com.amazonaws.bedrock#BrandedName", + "traits": { + "smithy.api#documentation": "The model's provider name.
" + } + }, + "inputModalities": { + "target": "com.amazonaws.bedrock#ModelModalityList", + "traits": { + "smithy.api#documentation": "The input modalities that the model supports.
" + } + }, + "outputModalities": { + "target": "com.amazonaws.bedrock#ModelModalityList", + "traits": { + "smithy.api#documentation": "The output modalities that the model supports.
" + } + }, + "responseStreamingSupported": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether the model supports streaming.
" + } + }, + "customizationsSupported": { + "target": "com.amazonaws.bedrock#ModelCustomizationList", + "traits": { + "smithy.api#documentation": "Whether the model supports fine-tuning or continual pre-training.
" + } + }, + "inferenceTypesSupported": { + "target": "com.amazonaws.bedrock#InferenceTypeList", + "traits": { + "smithy.api#documentation": "The inference types that the model supports.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Summary information for a foundation model.
" + } + }, + "com.amazonaws.bedrock#FoundationModelSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#FoundationModelSummary" + } + }, + "com.amazonaws.bedrock#GetCustomModel": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#GetCustomModelRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#GetCustomModelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get the properties associated with a Bedrock custom model that you have created.For more information, see Custom models in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/custom-models/{modelIdentifier}" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": ["model-customization"] + } + }, + "com.amazonaws.bedrock#GetCustomModelRequest": { + "type": "structure", + "members": { + "modelIdentifier": { + "target": "com.amazonaws.bedrock#ModelIdentifier", + "traits": { + "smithy.api#documentation": "Name or ARN of the custom model.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#GetCustomModelResponse": { + "type": "structure", + "members": { + "modelArn": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "ARN associated with this model.
", + "smithy.api#required": {} + } + }, + "modelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "Model name associated with this model.
", + "smithy.api#required": {} + } + }, + "jobName": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "Job name associated with this model.
" + } + }, + "jobArn": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobArn", + "traits": { + "smithy.api#documentation": "Job ARN associated with this model.
", + "smithy.api#required": {} + } + }, + "baseModelArn": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "ARN of the base model.
", + "smithy.api#required": {} + } + }, + "modelKmsKeyArn": { + "target": "com.amazonaws.bedrock#KmsKeyArn", + "traits": { + "smithy.api#documentation": "The custom model is encrypted at rest using this key.
", + "smithy.api#tags": ["customer-managed-key"] + } + }, + "hyperParameters": { + "target": "com.amazonaws.bedrock#ModelCustomizationHyperParameters", + "traits": { + "smithy.api#documentation": "Hyperparameter values associated with this model.
" + } + }, + "trainingDataConfig": { + "target": "com.amazonaws.bedrock#TrainingDataConfig", + "traits": { + "smithy.api#documentation": "Information about the training dataset.
", + "smithy.api#required": {} + } + }, + "validationDataConfig": { + "target": "com.amazonaws.bedrock#ValidationDataConfig" + }, + "outputDataConfig": { + "target": "com.amazonaws.bedrock#OutputDataConfig", + "traits": { + "smithy.api#documentation": "Output data configuration associated with this custom model.
", + "smithy.api#required": {} + } + }, + "trainingMetrics": { + "target": "com.amazonaws.bedrock#TrainingMetrics", + "traits": { + "smithy.api#documentation": "The training metrics from the job creation.
" + } + }, + "validationMetrics": { + "target": "com.amazonaws.bedrock#ValidationMetrics", + "traits": { + "smithy.api#documentation": "The validation metrics from the job creation.
" + } + }, + "creationTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Creation time of the model.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#GetFoundationModel": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#GetFoundationModelRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#GetFoundationModelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get details about a Bedrock foundation model.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/foundation-models/{modelIdentifier}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrock#GetFoundationModelRequest": { + "type": "structure", + "members": { + "modelIdentifier": { + "target": "com.amazonaws.bedrock#ModelIdentifier", + "traits": { + "smithy.api#documentation": "The model identifier.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#GetFoundationModelResponse": { + "type": "structure", + "members": { + "modelDetails": { + "target": "com.amazonaws.bedrock#FoundationModelDetails", + "traits": { + "smithy.api#documentation": "Information about the foundation model.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#GetModelCustomizationJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#GetModelCustomizationJobRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#GetModelCustomizationJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the properties associated with a model-customization job, including the status of the job.\n For more information, see Custom models in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/model-customization-jobs/{jobIdentifier}" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": ["model-customization"] + } + }, + "com.amazonaws.bedrock#GetModelCustomizationJobRequest": { + "type": "structure", + "members": { + "jobIdentifier": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobIdentifier", + "traits": { + "smithy.api#documentation": "Identifier for the customization job.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#GetModelCustomizationJobResponse": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobArn", + "traits": { + "smithy.api#documentation": "The ARN of the customization job.
", + "smithy.api#required": {} + } + }, + "jobName": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "The name of the customization job.
", + "smithy.api#required": {} + } + }, + "outputModelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "The name of the output model.
", + "smithy.api#required": {} + } + }, + "outputModelArn": { + "target": "com.amazonaws.bedrock#CustomModelArn", + "traits": { + "smithy.api#documentation": "The ARN of the output model.
" + } + }, + "clientRequestToken": { + "target": "com.amazonaws.bedrock#IdempotencyToken", + "traits": { + "smithy.api#documentation": "The token that you specified in the CreateCustomizationJob request.
" + } + }, + "roleArn": { + "target": "com.amazonaws.bedrock#RoleArn", + "traits": { + "smithy.api#documentation": "The ARN of the IAM role.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobStatus", + "traits": { + "smithy.api#documentation": "The status of the job. A successful job transitions from in-progress to completed when the output model is ready to use.\n If the job failed, the failure message contains information about why the job failed.
" + } + }, + "failureMessage": { + "target": "com.amazonaws.bedrock#ErrorMessage", + "traits": { + "smithy.api#documentation": "Information about why the job failed.
" + } + }, + "creationTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Time that the resource was created.
", + "smithy.api#required": {} + } + }, + "lastModifiedTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Time that the resource was last modified.
" + } + }, + "endTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Time that the resource transitioned to terminal state.
" + } + }, + "baseModelArn": { + "target": "com.amazonaws.bedrock#FoundationModelArn", + "traits": { + "smithy.api#documentation": "ARN of the base model.
", + "smithy.api#required": {} + } + }, + "hyperParameters": { + "target": "com.amazonaws.bedrock#ModelCustomizationHyperParameters", + "traits": { + "smithy.api#documentation": "The hyperparameter values for the job.
", + "smithy.api#required": {} + } + }, + "trainingDataConfig": { + "target": "com.amazonaws.bedrock#TrainingDataConfig", + "traits": { + "smithy.api#required": {} + } + }, + "validationDataConfig": { + "target": "com.amazonaws.bedrock#ValidationDataConfig", + "traits": { + "smithy.api#required": {} + } + }, + "outputDataConfig": { + "target": "com.amazonaws.bedrock#OutputDataConfig", + "traits": { + "smithy.api#documentation": "Output data configuration
", + "smithy.api#required": {} + } + }, + "outputModelKmsKeyArn": { + "target": "com.amazonaws.bedrock#KmsKeyArn", + "traits": { + "smithy.api#documentation": "The custom model is encrypted at rest using this key.
", + "smithy.api#tags": ["customer-managed-key"] + } + }, + "trainingMetrics": { + "target": "com.amazonaws.bedrock#TrainingMetrics" + }, + "validationMetrics": { + "target": "com.amazonaws.bedrock#ValidationMetrics", + "traits": { + "smithy.api#documentation": "The loss metric for each validator that you provided in the createjob request.
" + } + }, + "vpcConfig": { + "target": "com.amazonaws.bedrock#VpcConfig", + "traits": { + "smithy.api#documentation": "VPC configuration for the custom model job.
", + "smithy.api#tags": ["model-customization-vpc"] + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#GetModelInvocationLoggingConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#GetModelInvocationLoggingConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#GetModelInvocationLoggingConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Get the current configuration values for model invocation logging.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/logging/modelinvocations" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrock#GetModelInvocationLoggingConfigurationRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#GetModelInvocationLoggingConfigurationResponse": { + "type": "structure", + "members": { + "loggingConfig": { + "target": "com.amazonaws.bedrock#LoggingConfig", + "traits": { + "smithy.api#documentation": "The current configuration values.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#IdempotencyToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$" + } + }, + "com.amazonaws.bedrock#InferenceType": { + "type": "enum", + "members": { + "ON_DEMAND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ON_DEMAND" + } + }, + "PROVISIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROVISIONED" + } + } + } + }, + "com.amazonaws.bedrock#InferenceTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#InferenceType" + } + }, + "com.amazonaws.bedrock#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "An internal server error occurred. Retry your request.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.bedrock#JobName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + }, + "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9\\+\\-\\.])*$" + } + }, + "com.amazonaws.bedrock#KeyPrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1024 + } + } + }, + "com.amazonaws.bedrock#KmsKeyArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}$" + } + }, + "com.amazonaws.bedrock#KmsKeyId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:((key/[a-zA-Z0-9-]{36})|(alias/[a-zA-Z0-9-_/]+))$" + } + }, + "com.amazonaws.bedrock#ListCustomModels": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#ListCustomModelsRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#ListCustomModelsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns a list of the custom models that you have created with the CreateModelCustomizationJob
operation.
For more information, see Custom models in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/custom-models" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "modelSummaries" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": ["model-customization"] + } + }, + "com.amazonaws.bedrock#ListCustomModelsRequest": { + "type": "structure", + "members": { + "creationTimeBefore": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Return custom models created before the specified time.
", + "smithy.api#httpQuery": "creationTimeBefore" + } + }, + "creationTimeAfter": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Return custom models created after the specified time.
", + "smithy.api#httpQuery": "creationTimeAfter" + } + }, + "nameContains": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "Return custom models only if the job name contains these characters.
", + "smithy.api#httpQuery": "nameContains" + } + }, + "baseModelArnEquals": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "Return custom models only if the base model ARN matches this parameter.
", + "smithy.api#httpQuery": "baseModelArnEquals" + } + }, + "foundationModelArnEquals": { + "target": "com.amazonaws.bedrock#FoundationModelArn", + "traits": { + "smithy.api#documentation": "Return custom models only if the foundation model ARN matches this parameter.
", + "smithy.api#httpQuery": "foundationModelArnEquals" + } + }, + "maxResults": { + "target": "com.amazonaws.bedrock#MaxResults", + "traits": { + "smithy.api#documentation": "Maximum number of results to return in the response.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.bedrock#PaginationToken", + "traits": { + "smithy.api#documentation": "Continuation token from the previous response, for Bedrock to list the next set of results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "sortBy": { + "target": "com.amazonaws.bedrock#SortModelsBy", + "traits": { + "smithy.api#documentation": "The field to sort by in the returned list of models.
", + "smithy.api#httpQuery": "sortBy" + } + }, + "sortOrder": { + "target": "com.amazonaws.bedrock#SortOrder", + "traits": { + "smithy.api#documentation": "The sort order of the results.
", + "smithy.api#httpQuery": "sortOrder" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#ListCustomModelsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.bedrock#PaginationToken", + "traits": { + "smithy.api#documentation": "Continuation token for the next request to list the next set of results.
" + } + }, + "modelSummaries": { + "target": "com.amazonaws.bedrock#CustomModelSummaryList", + "traits": { + "smithy.api#documentation": "Model summaries.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ListFoundationModels": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#ListFoundationModelsRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#ListFoundationModelsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List of Bedrock foundation models that you can use. For more information, see Foundation models in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/foundation-models" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrock#ListFoundationModelsRequest": { + "type": "structure", + "members": { + "byProvider": { + "target": "com.amazonaws.bedrock#Provider", + "traits": { + "smithy.api#documentation": "A Bedrock model provider.
", + "smithy.api#httpQuery": "byProvider" + } + }, + "byCustomizationType": { + "target": "com.amazonaws.bedrock#ModelCustomization", + "traits": { + "smithy.api#documentation": "List by customization type.
", + "smithy.api#httpQuery": "byCustomizationType" + } + }, + "byOutputModality": { + "target": "com.amazonaws.bedrock#ModelModality", + "traits": { + "smithy.api#documentation": "List by output modality type.
", + "smithy.api#httpQuery": "byOutputModality" + } + }, + "byInferenceType": { + "target": "com.amazonaws.bedrock#InferenceType", + "traits": { + "smithy.api#documentation": "List by inference type.
", + "smithy.api#httpQuery": "byInferenceType" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#ListFoundationModelsResponse": { + "type": "structure", + "members": { + "modelSummaries": { + "target": "com.amazonaws.bedrock#FoundationModelSummaryList", + "traits": { + "smithy.api#documentation": "A list of bedrock foundation models.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ListModelCustomizationJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#ListModelCustomizationJobsRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#ListModelCustomizationJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on\n one or more criteria.
\nFor more information, see Custom models in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/model-customization-jobs" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "modelCustomizationJobSummaries" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": ["model-customization"] + } + }, + "com.amazonaws.bedrock#ListModelCustomizationJobsRequest": { + "type": "structure", + "members": { + "creationTimeAfter": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Return customization jobs created after the specified time.
", + "smithy.api#httpQuery": "creationTimeAfter" + } + }, + "creationTimeBefore": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Return customization jobs created before the specified time.
", + "smithy.api#httpQuery": "creationTimeBefore" + } + }, + "statusEquals": { + "target": "com.amazonaws.bedrock#FineTuningJobStatus", + "traits": { + "smithy.api#documentation": "Return customization jobs with the specified status.
", + "smithy.api#httpQuery": "statusEquals" + } + }, + "nameContains": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "Return customization jobs only if the job name contains these characters.
", + "smithy.api#httpQuery": "nameContains" + } + }, + "maxResults": { + "target": "com.amazonaws.bedrock#MaxResults", + "traits": { + "smithy.api#documentation": "Maximum number of results to return in the response.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.bedrock#PaginationToken", + "traits": { + "smithy.api#documentation": "Continuation token from the previous response, for Bedrock to list the next set of results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "sortBy": { + "target": "com.amazonaws.bedrock#SortJobsBy", + "traits": { + "smithy.api#documentation": "The field to sort by in the returned list of jobs.
", + "smithy.api#httpQuery": "sortBy" + } + }, + "sortOrder": { + "target": "com.amazonaws.bedrock#SortOrder", + "traits": { + "smithy.api#documentation": "The sort order of the results.
", + "smithy.api#httpQuery": "sortOrder" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#ListModelCustomizationJobsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.bedrock#PaginationToken", + "traits": { + "smithy.api#documentation": "Page continuation token to use in the next request.
" + } + }, + "modelCustomizationJobSummaries": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobSummaries", + "traits": { + "smithy.api#documentation": "Job summaries.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List the tags associated with the specified resource.
\nFor more information, see Tagging resources in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/listTagsForResource" + }, + "smithy.api#tags": ["tagging"] + } + }, + "com.amazonaws.bedrock#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.bedrock#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "The ARN of the resource.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "An array of the tags associated with this resource.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#LogGroupName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + } + } + }, + "com.amazonaws.bedrock#LoggingConfig": { + "type": "structure", + "members": { + "cloudWatchConfig": { + "target": "com.amazonaws.bedrock#CloudWatchConfig", + "traits": { + "smithy.api#documentation": "CloudWatch logging configuration.
" + } + }, + "s3Config": { + "target": "com.amazonaws.bedrock#S3Config", + "traits": { + "smithy.api#documentation": "S3 configuration for storing log data.
" + } + }, + "textDataDeliveryEnabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Set to include text data in the log delivery.
" + } + }, + "imageDataDeliveryEnabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Set to include image data in the log delivery.
" + } + }, + "embeddingDataDeliveryEnabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Set to include embeddings data in the log delivery.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration fields for invokation logging.
" + } + }, + "com.amazonaws.bedrock#LoggingResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfiguration" + }, + { + "target": "com.amazonaws.bedrock#GetModelInvocationLoggingConfiguration" + }, + { + "target": "com.amazonaws.bedrock#PutModelInvocationLoggingConfiguration" + } + ] + }, + "com.amazonaws.bedrock#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.bedrock#MetricFloat": { + "type": "float" + }, + "com.amazonaws.bedrock#ModelArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}))$" + } + }, + "com.amazonaws.bedrock#ModelCustomization": { + "type": "enum", + "members": { + "FINE_TUNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FINE_TUNING" + } + } + } + }, + "com.amazonaws.bedrock#ModelCustomizationHyperParameters": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-customization-job/[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}$" + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1011 + }, + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-customization-job/[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})|([a-zA-Z0-9](-*[a-zA-Z0-9\\+\\-\\.])*)$" + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobStatus": { + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InProgress" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "STOPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopping" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopped" + } + } + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobSummary" + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobSummary": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobArn", + "traits": { + "smithy.api#documentation": "ARN of the customization job.
", + "smithy.api#required": {} + } + }, + "baseModelArn": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "ARN of the base model.
", + "smithy.api#required": {} + } + }, + "jobName": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "Name of the customization job.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobStatus", + "traits": { + "smithy.api#documentation": "Status of the customization job.
", + "smithy.api#required": {} + } + }, + "lastModifiedTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Time that the customization job was last modified.
" + } + }, + "creationTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Creation time of the custom model.
", + "smithy.api#required": {} + } + }, + "endTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "Time that the customization job ended.
" + } + }, + "customModelArn": { + "target": "com.amazonaws.bedrock#CustomModelArn", + "traits": { + "smithy.api#documentation": "ARN of the custom model.
" + } + }, + "customModelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "Name of the custom model.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about one customization job
" + } + }, + "com.amazonaws.bedrock#ModelCustomizationList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#ModelCustomization" + } + }, + "com.amazonaws.bedrock#ModelIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:amazon-bedrock:[a-zA-Z0-9-]*:(([0-9]{12})|(aws))?:(custom|built-in)-model/.+)|(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2}))))|(([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2}))|(([0-9a-zA-Z][_-]?)+)$" + } + }, + "com.amazonaws.bedrock#ModelModality": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEXT" + } + }, + "IMAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IMAGE" + } + }, + "EMBEDDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EMBEDDING" + } + } + } + }, + "com.amazonaws.bedrock#ModelModalityList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#ModelModality" + } + }, + "com.amazonaws.bedrock#ModelName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + }, + "smithy.api#pattern": "^([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63})$" + } + }, + "com.amazonaws.bedrock#ModelResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrock#DeleteCustomModel" + }, + { + "target": "com.amazonaws.bedrock#GetCustomModel" + }, + { + "target": "com.amazonaws.bedrock#GetFoundationModel" + }, + { + "target": "com.amazonaws.bedrock#ListCustomModels" + }, + { + "target": "com.amazonaws.bedrock#ListFoundationModels" + } + ] + }, + "com.amazonaws.bedrock#NonBlankString": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[\\s\\S]*$" + } + }, + "com.amazonaws.bedrock#OutputDataConfig": { + "type": "structure", + "members": { + "s3Uri": { + "target": "com.amazonaws.bedrock#S3Uri", + "traits": { + "smithy.api#documentation": "The S3 URI where the output data is stored.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "S3 Location of the output data.
" + } + }, + "com.amazonaws.bedrock#PaginationToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^\\S*$" + } + }, + "com.amazonaws.bedrock#Provider": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-z0-9-]{1,63}$" + } + }, + "com.amazonaws.bedrock#ProvisionedModelThroughputResource": { + "type": "resource" + }, + "com.amazonaws.bedrock#PutModelInvocationLoggingConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#PutModelInvocationLoggingConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#PutModelInvocationLoggingConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Set the configuration values for model invocation logging.
", + "smithy.api#http": { + "code": 200, + "method": "PUT", + "uri": "/logging/modelinvocations" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrock#PutModelInvocationLoggingConfigurationRequest": { + "type": "structure", + "members": { + "loggingConfig": { + "target": "com.amazonaws.bedrock#LoggingConfig", + "traits": { + "smithy.api#documentation": "The logging configuration values to set.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#PutModelInvocationLoggingConfigurationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "The specified resource ARN was not found. Check the ARN and try your request again.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.bedrock#RoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+$" + } + }, + "com.amazonaws.bedrock#S3Config": { + "type": "structure", + "members": { + "bucketName": { + "target": "com.amazonaws.bedrock#BucketName", + "traits": { + "smithy.api#documentation": "S3 bucket name.
", + "smithy.api#required": {} + } + }, + "keyPrefix": { + "target": "com.amazonaws.bedrock#KeyPrefix", + "traits": { + "smithy.api#documentation": "S3 prefix.
" + } + } + }, + "traits": { + "smithy.api#documentation": "S3 configuration for storing log data.
" + } + }, + "com.amazonaws.bedrock#S3Uri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$" + } + }, + "com.amazonaws.bedrock#SecurityGroupId": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 32 + }, + "smithy.api#pattern": "^[-0-9a-zA-Z]+$", + "smithy.api#tags": ["model-customization-vpc"] + } + }, + "com.amazonaws.bedrock#SecurityGroupIds": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#SecurityGroupId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + }, + "smithy.api#tags": ["model-customization-vpc"] + } + }, + "com.amazonaws.bedrock#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "The number of requests exceeds the service quota. Resubmit your request later.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrock#SortJobsBy": { + "type": "enum", + "members": { + "CREATION_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreationTime" + } + } + } + }, + "com.amazonaws.bedrock#SortModelsBy": { + "type": "enum", + "members": { + "CREATION_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreationTime" + } + } + } + }, + "com.amazonaws.bedrock#SortOrder": { + "type": "enum", + "members": { + "ASCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Ascending" + } + }, + "DESCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Descending" + } + } + } + }, + "com.amazonaws.bedrock#StopModelCustomizationJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#StopModelCustomizationJobRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#StopModelCustomizationJobResponse" + }, + "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": "Stops an active model customization job. For more information, see Custom models in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/model-customization-jobs/{jobIdentifier}/stop" + }, + "smithy.api#idempotent": {}, + "smithy.api#tags": ["model-customization"] + } + }, + "com.amazonaws.bedrock#StopModelCustomizationJobRequest": { + "type": "structure", + "members": { + "jobIdentifier": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobIdentifier", + "traits": { + "smithy.api#documentation": "Job identifier of the job to stop.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#StopModelCustomizationJobResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#SubnetId": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 32 + }, + "smithy.api#pattern": "^[-0-9a-zA-Z]+$", + "smithy.api#tags": ["model-customization-vpc"] + } + }, + "com.amazonaws.bedrock#SubnetIds": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#SubnetId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 16 + }, + "smithy.api#tags": ["model-customization-vpc"] + } + }, + "com.amazonaws.bedrock#SubscriptionResource": { + "type": "resource" + }, + "com.amazonaws.bedrock#Tag": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.bedrock#TagKey", + "traits": { + "smithy.api#documentation": "Key for the tag.
", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.bedrock#TagValue", + "traits": { + "smithy.api#documentation": "Value for the tag.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Definition of the key/value pair for a tag.
" + } + }, + "com.amazonaws.bedrock#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s._:/=+@-]*$" + } + }, + "com.amazonaws.bedrock#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.bedrock#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.bedrock#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#TooManyTagsException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Associate tags with a resource. For more information, see Tagging resources in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/tagResource" + }, + "smithy.api#tags": ["tagging"] + } + }, + "com.amazonaws.bedrock#TagResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.bedrock#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "The ARN of the resource to tag.
", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "Tags to associate with the resource.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s._:/=+@-]*$" + } + }, + "com.amazonaws.bedrock#TaggableResourcesArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 1011 + }, + "smithy.api#pattern": "(^arn:aws(-[^:]+)?:amazon-bedrock:[a-zA-Z0-9-]*:[0-9]{12}:(fine-tuning-job|custom-model)/.+$)|([a-zA-Z0-9][a-zA-Z0-9\\-]*$)|(^arn:aws(|-cn|-us-gov):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]{12})$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:provisioned-model/[a-z0-9]{12}$)" + } + }, + "com.amazonaws.bedrock#TaggingResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrock#ListTagsForResource" + }, + { + "target": "com.amazonaws.bedrock#TagResource" + }, + { + "target": "com.amazonaws.bedrock#UntagResource" + } + ] + }, + "com.amazonaws.bedrock#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "The number of requests exceeds the limit. Resubmit your request later.
", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.bedrock#Timestamp": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.bedrock#TooManyTagsException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + }, + "resourceName": { + "target": "com.amazonaws.bedrock#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "The name of the resource with too many tags.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The request contains more tags than can be associated with a resource (50 tags per resource). \n The maximum number of tags includes both existing tags and those included in your current request.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrock#TrainingDataConfig": { + "type": "structure", + "members": { + "s3Uri": { + "target": "com.amazonaws.bedrock#S3Uri", + "traits": { + "smithy.api#documentation": "The S3 URI where the training data is stored.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "S3 Location of the training data.
" + } + }, + "com.amazonaws.bedrock#TrainingMetrics": { + "type": "structure", + "members": { + "trainingLoss": { + "target": "com.amazonaws.bedrock#MetricFloat", + "traits": { + "smithy.api#documentation": "Loss metric associated with the custom job.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Metrics associated with the custom job.
" + } + }, + "com.amazonaws.bedrock#TrainingResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrock#CreateModelCustomizationJob" + }, + { + "target": "com.amazonaws.bedrock#GetModelCustomizationJob" + }, + { + "target": "com.amazonaws.bedrock#ListModelCustomizationJobs" + }, + { + "target": "com.amazonaws.bedrock#StopModelCustomizationJob" + } + ] + }, + "com.amazonaws.bedrock#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Remove one or more tags from a resource. For more information, see Tagging resources in the Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/untagResource" + }, + "smithy.api#tags": ["tagging"] + } + }, + "com.amazonaws.bedrock#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.bedrock#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "The ARN of the resource to untag.
", + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.bedrock#TagKeyList", + "traits": { + "smithy.api#documentation": "Tag keys of the tags to remove from the resource.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ValidationDataConfig": { + "type": "structure", + "members": { + "validators": { + "target": "com.amazonaws.bedrock#Validators", + "traits": { + "smithy.api#documentation": "Information about the validators.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Array of up to 10 validators.
" + } + }, + "com.amazonaws.bedrock#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "Input validation failed. Check your request parameters and retry the request.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrock#ValidationMetrics": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#ValidatorMetric" + } + }, + "com.amazonaws.bedrock#Validator": { + "type": "structure", + "members": { + "s3Uri": { + "target": "com.amazonaws.bedrock#S3Uri", + "traits": { + "smithy.api#documentation": "The S3 URI where the validation data is stored.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a validator.
" + } + }, + "com.amazonaws.bedrock#ValidatorMetric": { + "type": "structure", + "members": { + "validationLoss": { + "target": "com.amazonaws.bedrock#MetricFloat", + "traits": { + "smithy.api#documentation": "The validation loss associated with this validator.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The metric for the validator.
" + } + }, + "com.amazonaws.bedrock#Validators": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#Validator" + }, + "traits": { + "smithy.api#length": { + "max": 10 + } + } + }, + "com.amazonaws.bedrock#VpcConfig": { + "type": "structure", + "members": { + "subnetIds": { + "target": "com.amazonaws.bedrock#SubnetIds", + "traits": { + "smithy.api#documentation": "VPC configuration subnets.
", + "smithy.api#required": {} + } + }, + "securityGroupIds": { + "target": "com.amazonaws.bedrock#SecurityGroupIds", + "traits": { + "smithy.api#documentation": "VPC configuration security group Ids.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "VPC configuration.
", + "smithy.api#tags": ["model-customization-vpc"] + } + } + } +}