:doc:`BedrockAgentCore <../../bedrock-agentcore>` / Client / stop_runtime_session

********************
stop_runtime_session
********************



.. py:method:: BedrockAgentCore.Client.stop_runtime_session(**kwargs)

  

  Stops a session that is running in an running AgentCore Runtime agent.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/StopRuntimeSession>`_  


  **Request Syntax**
  ::

    response = client.stop_runtime_session(
        runtimeSessionId='string',
        agentRuntimeArn='string',
        qualifier='string',
        clientToken='string'
    )
    
  :type runtimeSessionId: string
  :param runtimeSessionId: **[REQUIRED]** 

    The ID of the session that you want to stop.

    

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

    The ARN of the agent that contains the session that you want to stop.

    

  
  :type qualifier: string
  :param qualifier: 

    Optional qualifier to specify an agent alias, such as ``prod``code> or ``dev``. If you don't provide a value, the DEFAULT alias is used.

    

  
  :type clientToken: string
  :param clientToken: 

    Idempotent token used to identify the request. If you use the same token with multiple requests, the same response is returned. Use ClientToken to prevent the same request from being processed more than once.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'runtimeSessionId': 'string',
          'statusCode': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **runtimeSessionId** *(string) --* 

        The ID of the session that you requested to stop.

        
      

      - **statusCode** *(integer) --* 

        The status code of the request to stop the session.

        
  
  **Exceptions**
  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.UnauthorizedException`

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

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

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

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.RuntimeClientError`

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

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

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

  