:doc:`Bedrock <../../bedrock>` / Client / list_custom_models

******************
list_custom_models
******************



.. py:method:: 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 <https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html>`__ in the `Amazon Bedrock User Guide <https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListCustomModels>`_  


  **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'
    )
    
  :type creationTimeBefore: datetime
  :param creationTimeBefore: 

    Return custom models created before the specified time.

    

  
  :type creationTimeAfter: datetime
  :param creationTimeAfter: 

    Return custom models created after the specified time.

    

  
  :type nameContains: string
  :param nameContains: 

    Return custom models only if the job name contains these characters.

    

  
  :type baseModelArnEquals: string
  :param baseModelArnEquals: 

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

    

  
  :type foundationModelArnEquals: string
  :param foundationModelArnEquals: 

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

    

  
  :type maxResults: integer
  :param 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.

    

  
  :type nextToken: string
  :param 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.

    

  
  :type sortBy: string
  :param sortBy: 

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

    

  
  :type sortOrder: string
  :param sortOrder: 

    The sort order of the results.

    

  
  :type isOwned: boolean
  :param isOwned: 

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

    

  
  :type modelStatus: string
  :param modelStatus: 

    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.

    

  
  
  :rtype: 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'|'REINFORCEMENT_FINE_TUNING'|'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 <https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html>`__.

            
          

          - **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**
  
  *   :py:class:`Bedrock.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Bedrock.Client.exceptions.ValidationException`

  
  *   :py:class:`Bedrock.Client.exceptions.InternalServerException`

  
  *   :py:class:`Bedrock.Client.exceptions.ThrottlingException`

  