ListImportedModels - Amazon Bedrock

ListImportedModels

Returns a list of models you've imported. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.

Request Syntax

GET /imported-models?creationTimeAfter=creationTimeAfter&creationTimeBefore=creationTimeBefore&maxResults=maxResults&nameContains=nameContains&nextToken=nextToken&sortBy=sortBy&sortOrder=sortOrder HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

creationTimeAfter

Return imported models that were created after the specified time.

creationTimeBefore

Return imported models that created before the specified time.

maxResults

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

Valid Range: Minimum value of 1. Maximum value of 1000.

nameContains

Return imported models only if the model name contains these characters.

Length Constraints: Minimum length of 1. Maximum length of 63.

Pattern: ^([0-9a-zA-Z][_-]?)+$

nextToken

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

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: ^\S*$

sortBy

The field to sort by in the returned list of imported models.

Valid Values: CreationTime

sortOrder

Specifies whetehr to sort the results in ascending or descending order.

Valid Values: Ascending | Descending

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "modelSummaries": [ { "creationTime": "string", "instructSupported": boolean, "modelArchitecture": "string", "modelArn": "string", "modelName": "string" } ], "nextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

modelSummaries

Model summaries.

Type: Array of ImportedModelSummary objects

nextToken

If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: ^\S*$

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

The request is denied because of missing access permissions.

HTTP Status Code: 403

InternalServerException

An internal server error occurred. Retry your request.

HTTP Status Code: 500

ThrottlingException

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

HTTP Status Code: 429

ValidationException

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

HTTP Status Code: 400

Examples

List the imported models

Lists the models that you have imported.

GET /imported-models/ HTTP/1.1 Content-type: application/json

Example response

Response for the above request.

HTTP/1.1 200 Content-type: application/json { "modelSummaries": [ { "modelArn": "arn:aws:bedrock:us-east-1:111122223333:imported-model/s4dt0wly5gud", "modelName": "SomeImportedModelName", "creationTime": "2024-08-13T19:20:14.058Z" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: