:doc:`AgentsforBedrock <../../bedrock-agent>` / Client / prepare_agent

*************
prepare_agent
*************



.. py:method:: AgentsforBedrock.Client.prepare_agent(**kwargs)

  

  Creates a ``DRAFT`` version of the agent that can be used for internal testing.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/PrepareAgent>`_  


  **Request Syntax**
  ::

    response = client.prepare_agent(
        agentId='string'
    )
    
  :type agentId: string
  :param agentId: **[REQUIRED]** 

    The unique identifier of the agent for which to create a ``DRAFT`` version.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'agentId': 'string',
          'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING',
          'agentVersion': 'string',
          'preparedAt': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **agentId** *(string) --* 

        The unique identifier of the agent for which the ``DRAFT`` version was created.

        
      

      - **agentStatus** *(string) --* 

        The status of the ``DRAFT`` version and whether it is ready for use.

        
      

      - **agentVersion** *(string) --* 

        The version of the agent.

        
      

      - **preparedAt** *(datetime) --* 

        The time at which the ``DRAFT`` version of the agent was last prepared.

        
  
  **Exceptions**
  
  *   :py:class:`AgentsforBedrock.Client.exceptions.ThrottlingException`

  
  *   :py:class:`AgentsforBedrock.Client.exceptions.AccessDeniedException`

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

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

  
  *   :py:class:`AgentsforBedrock.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`AgentsforBedrock.Client.exceptions.ConflictException`

  
  *   :py:class:`AgentsforBedrock.Client.exceptions.ServiceQuotaExceededException`

  