BedrockAgentCore / Client / stop_code_interpreter_session
stop_code_interpreter_session¶
- BedrockAgentCore.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( traceId='string', traceParent='string', codeInterpreterIdentifier='string', sessionId='string', clientToken='string' )
- Parameters:
traceId (string) – The trace identifier for request tracking.
traceParent (string) – The parent trace information for distributed tracing.
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
BedrockAgentCore.Client.exceptions.ServiceQuotaExceededExceptionBedrockAgentCore.Client.exceptions.AccessDeniedExceptionBedrockAgentCore.Client.exceptions.ConflictExceptionBedrockAgentCore.Client.exceptions.ValidationExceptionBedrockAgentCore.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCore.Client.exceptions.ThrottlingExceptionBedrockAgentCore.Client.exceptions.InternalServerException