:doc:`AgentsforBedrockRuntime <../../bedrock-agent-runtime>` / Client / create_invocation

*****************
create_invocation
*****************



.. py:method:: AgentsforBedrockRuntime.Client.create_invocation(**kwargs)

  

  Creates a new invocation within a session. An invocation groups the related invocation steps that store the content from a conversation. For more information about sessions, see `Store and retrieve conversation history and context with Amazon Bedrock sessions <https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html>`__.

   

  Related APIs

   

  
  * `ListInvocations <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListInvocations.html>`__
   
  * `ListSessions <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListSessions.html>`__
   
  * `GetSession <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_GetSession.html>`__
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/CreateInvocation>`_  


  **Request Syntax**
  ::

    response = client.create_invocation(
        description='string',
        invocationId='string',
        sessionIdentifier='string'
    )
    
  :type description: string
  :param description: 

    A description for the interactions in the invocation. For example, "User asking about weather in Seattle".

    

  
  :type invocationId: string
  :param invocationId: 

    A unique identifier for the invocation in UUID format.

    

  
  :type sessionIdentifier: string
  :param sessionIdentifier: **[REQUIRED]** 

    The unique identifier for the associated session for the invocation. You can specify either the session's ``sessionId`` or its Amazon Resource Name (ARN).

    

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

    
    ::

      {
          'createdAt': datetime(2015, 1, 1),
          'invocationId': 'string',
          'sessionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **createdAt** *(datetime) --* 

        The timestamp for when the invocation was created.

        
      

      - **invocationId** *(string) --* 

        The unique identifier for the invocation.

        
      

      - **sessionId** *(string) --* 

        The unique identifier for the session associated with the invocation.

        
  
  **Exceptions**
  
  *   :py:class:`AgentsforBedrockRuntime.Client.exceptions.ConflictException`

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

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

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

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

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

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

  