Bedrock / Client / list_custom_models

list_custom_models

Bedrock.Client.list_custom_models(**kwargs)

Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation.

For more information, see Custom models in the Amazon Bedrock User Guide.

See also: AWS API Documentation

Request Syntax

response = client.list_custom_models(
    creationTimeBefore=datetime(2015, 1, 1),
    creationTimeAfter=datetime(2015, 1, 1),
    nameContains='string',
    baseModelArnEquals='string',
    foundationModelArnEquals='string',
    maxResults=123,
    nextToken='string',
    sortBy='CreationTime',
    sortOrder='Ascending'|'Descending',
    isOwned=True|False,
    modelStatus='Active'|'Creating'|'Failed'
)
Parameters:
  • creationTimeBefore (datetime) – Return custom models created before the specified time.

  • creationTimeAfter (datetime) – Return custom models created after the specified time.

  • nameContains (string) – Return custom models only if the job name contains these characters.

  • baseModelArnEquals (string) – Return custom models only if the base model Amazon Resource Name (ARN) matches this parameter.

  • foundationModelArnEquals (string) – Return custom models only if the foundation model Amazon Resource Name (ARN) matches this parameter.

  • maxResults (integer) – 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.

  • nextToken (string) – 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.

  • sortBy (string) – The field to sort by in the returned list of models.

  • sortOrder (string) – The sort order of the results.

  • isOwned (boolean) – Return custom models depending on if the current account owns them ( true) or if they were shared with the current account ( false).

  • modelStatus (string) –

    The status of them model to filter results by. Possible values include:

    • Creating - Include only models that are currently being created and validated.

    • Active - Include only models that have been successfully created and are ready for use.

    • Failed - Include only models where the creation process failed.

    If you don’t specify a status, the API returns models in all states.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'modelSummaries': [
        {
            'modelArn': 'string',
            'modelName': 'string',
            'creationTime': datetime(2015, 1, 1),
            'baseModelArn': 'string',
            'baseModelName': 'string',
            'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION'|'IMPORTED',
            'ownerAccountId': 'string',
            'modelStatus': 'Active'|'Creating'|'Failed'
        },
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      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.

    • modelSummaries (list) –

      Model summaries.

      • (dict) –

        Summary information for a custom model.

        • modelArn (string) –

          The Amazon Resource Name (ARN) of the custom model.

        • modelName (string) –

          The name of the custom model.

        • creationTime (datetime) –

          Creation time of the model.

        • baseModelArn (string) –

          The base model Amazon Resource Name (ARN).

        • baseModelName (string) –

          The base model name.

        • customizationType (string) –

          Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models.

        • ownerAccountId (string) –

          The unique identifier of the account that owns the model.

        • modelStatus (string) –

          The current status of the custom model. Possible values include:

          • Creating - The model is being created and validated.

          • Active - The model has been successfully created and is ready for use.

          • Failed - The model creation process failed.

Exceptions