BedrockAgentCore / Client / get_code_interpreter_session

get_code_interpreter_session

BedrockAgentCore.Client.get_code_interpreter_session(**kwargs)

Retrieves detailed information about a specific code interpreter session in Amazon Bedrock AgentCore. This operation returns the session’s configuration, current status, and metadata.

To get a code interpreter session, you must specify both the code interpreter identifier and the session ID. The response includes information about the session’s timeout settings and current status.

The following operations are related to GetCodeInterpreterSession:

See also: AWS API Documentation

Request Syntax

response = client.get_code_interpreter_session(
    codeInterpreterIdentifier='string',
    sessionId='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 retrieve.

Return type:

dict

Returns:

Response Syntax

{
    'codeInterpreterIdentifier': 'string',
    'sessionId': 'string',
    'name': 'string',
    'createdAt': datetime(2015, 1, 1),
    'sessionTimeoutSeconds': 123,
    'status': 'READY'|'TERMINATED',
    'certificates': [
        {
            'location': {
                'secretsManager': {
                    'secretArn': 'string'
                }
            }
        },
    ]
}

Response Structure

  • (dict) –

    • codeInterpreterIdentifier (string) –

      The identifier of the code interpreter.

    • sessionId (string) –

      The identifier of the code interpreter session.

    • name (string) –

      The name of the code interpreter session.

    • createdAt (datetime) –

      The time at which the code interpreter session was created.

    • sessionTimeoutSeconds (integer) –

      The timeout period for the code interpreter session in seconds.

    • status (string) –

      The current status of the code interpreter session. Possible values include ACTIVE, STOPPING, and STOPPED.

    • certificates (list) –

      The list of certificates installed in the code interpreter session.

      • (dict) –

        A certificate to install in the browser or code interpreter session.

        • location (dict) –

          The location of the certificate.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: secretsManager. 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'}
          
          • secretsManager (dict) –

            The Amazon Web Services Secrets Manager location of the certificate.

            • secretArn (string) –

              The ARN of the Amazon Web Services Secrets Manager secret containing the certificate.

Exceptions