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

*******************
get_invocation_step
*******************



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

  

  Retrieves the details of a specific invocation step within an invocation in a session. 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>`__.

  

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


  **Request Syntax**
  ::

    response = client.get_invocation_step(
        invocationIdentifier='string',
        invocationStepId='string',
        sessionIdentifier='string'
    )
    
  :type invocationIdentifier: string
  :param invocationIdentifier: **[REQUIRED]** 

    The unique identifier for the invocation in UUID format.

    

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

    The unique identifier (in UUID format) for the specific invocation step to retrieve.

    

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

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

    

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

    
    ::

      {
          'invocationStep': {
              'invocationId': 'string',
              'invocationStepId': 'string',
              'invocationStepTime': datetime(2015, 1, 1),
              'payload': {
                  'contentBlocks': [
                      {
                          'image': {
                              'format': 'png'|'jpeg'|'gif'|'webp',
                              'source': {
                                  'bytes': b'bytes',
                                  's3Location': {
                                      'uri': 'string'
                                  }
                              }
                          },
                          'text': 'string'
                      },
                  ]
              },
              'sessionId': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **invocationStep** *(dict) --* 

        The complete details of the requested invocation step.

        
        

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

          The unique identifier (in UUID format) for the invocation that includes the invocation step.

          
        

        - **invocationStepId** *(string) --* 

          The unique identifier (in UUID format) for the invocation step.

          
        

        - **invocationStepTime** *(datetime) --* 

          The timestamp for when the invocation step was created.

          
        

        - **payload** *(dict) --* 

          Payload content, such as text and images, for the invocation step.

          .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``contentBlocks``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


        
          

          - **contentBlocks** *(list) --* 

            The content for the invocation step.

            
            

            - *(dict) --* 

              A block of content that you pass to, or receive from, a Amazon Bedrock session in an invocation step. You pass the content to a session in the ``payLoad`` of the `PutInvocationStep <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_PutInvocationStep.html>`__ API operation. You retrieve the content with the `GetInvocationStep <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_GetInvocationStep.html>`__ API operation.

               

              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>`__.

              .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``image``, ``text``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


            
              

              - **image** *(dict) --* 

                The image in the invocation step.

                
                

                - **format** *(string) --* 

                  The format of the image.

                  
                

                - **source** *(dict) --* 

                  The source for the image.

                  .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``bytes``, ``s3Location``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


                
                  

                  - **bytes** *(bytes) --* 

                    The raw image bytes for the image. If you use an Amazon Web Services SDK, you don't need to encode the image bytes in base64.

                    
                  

                  - **s3Location** *(dict) --* 

                    The path to the Amazon S3 bucket where the image is stored.

                    
                    

                    - **uri** *(string) --* 

                      The path to the Amazon S3 bucket where the image is stored.

                      
                
              
            
              

              - **text** *(string) --* 

                The text in the invocation step.

                
          
        
      
        

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

          The unique identifier of the session containing the invocation step.

          
    
  
  **Exceptions**
  
  *   :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`

  