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'
                }
            }
        },
    ],
    'filesystemConfigurations': [
        {
            's3FilesConfiguration': {
                'accessPointArn': 'string',
                'mountPath': 'string',
                'fileSystemArn': 'string'
            },
            'efsConfiguration': {
                'accessPointArn': 'string',
                'mountPath': 'string',
                'fileSystemArn': '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.

    • filesystemConfigurations (list) –

      The file system configurations for the code interpreter session. Each entry describes an access point and its mount path.

      • (dict) –

        Specifies a file system to mount into the session by providing exactly one of the following:

        • s3FilesConfiguration - Mounts an Amazon Simple Storage Service (Amazon S3) Files access point.

        • efsConfiguration - Mounts an Amazon Elastic File System (Amazon EFS) access point.

        Note

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

          The configuration for mounting your own Amazon Simple Storage Service (Amazon S3) Files access point into the session.

          • accessPointArn (string) –

            The Amazon Resource Name (ARN) of the Amazon Simple Storage Service (Amazon S3) Files access point to mount.

          • mountPath (string) –

            The absolute path within the session at which the access point is mounted, for example /mnt/s3data. Each mount path must be unique across all file system configurations in the session.

          • fileSystemArn (string) –

            The Amazon Resource Name (ARN) of the Amazon Simple Storage Service (Amazon S3) Files file system that owns the access point.

        • efsConfiguration (dict) –

          The configuration for mounting your own Amazon Elastic File System (Amazon EFS) access point into the session.

          • accessPointArn (string) –

            The Amazon Resource Name (ARN) of the Amazon Elastic File System (Amazon EFS) access point to mount.

          • mountPath (string) –

            The absolute path within the session at which the access point is mounted, for example /mnt/efs. Each mount path must be unique across all file system configurations in the session.

          • fileSystemArn (string) –

            The Amazon Resource Name (ARN) of the Amazon Elastic File System (Amazon EFS) file system that owns the access point.

Exceptions

  • BedrockAgentCore.Client.exceptions.AccessDeniedException

  • BedrockAgentCore.Client.exceptions.ValidationException

  • BedrockAgentCore.Client.exceptions.ResourceNotFoundException

  • BedrockAgentCore.Client.exceptions.ThrottlingException

  • BedrockAgentCore.Client.exceptions.InternalServerException