BedrockAgentCoreDataPlaneFrontingLayer / Client / stop_code_interpreter_session

stop_code_interpreter_session

BedrockAgentCoreDataPlaneFrontingLayer.Client.stop_code_interpreter_session(**kwargs)

Terminates an active code interpreter session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.

To stop a code interpreter session, you must specify both the code interpreter identifier and the session ID. Once stopped, a session cannot be restarted; you must create a new session using StartCodeInterpreterSession.

The following operations are related to StopCodeInterpreterSession:

See also: AWS API Documentation

Request Syntax

response = client.stop_code_interpreter_session(
    codeInterpreterIdentifier='string',
    sessionId='string',
    clientToken='string'
)
Parameters:
  • codeInterpreterIdentifier (string) –

    [REQUIRED]

    The unique identifier of the code interpreter associated with the session.

  • sessionId (string) –

    [REQUIRED]

    The unique identifier of the code interpreter session to stop.

  • clientToken (string) –

    A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'codeInterpreterIdentifier': 'string',
    'sessionId': 'string',
    'lastUpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • codeInterpreterIdentifier (string) –

      The identifier of the code interpreter.

    • sessionId (string) –

      The identifier of the code interpreter session.

    • lastUpdatedAt (datetime) –

      The timestamp when the code interpreter session was last updated.

Exceptions

  • BedrockAgentCoreDataPlaneFrontingLayer.Client.exceptions.ServiceQuotaExceededException

  • BedrockAgentCoreDataPlaneFrontingLayer.Client.exceptions.AccessDeniedException

  • BedrockAgentCoreDataPlaneFrontingLayer.Client.exceptions.ConflictException

  • BedrockAgentCoreDataPlaneFrontingLayer.Client.exceptions.ValidationException

  • BedrockAgentCoreDataPlaneFrontingLayer.Client.exceptions.ResourceNotFoundException

  • BedrockAgentCoreDataPlaneFrontingLayer.Client.exceptions.ThrottlingException

  • BedrockAgentCoreDataPlaneFrontingLayer.Client.exceptions.InternalServerException