BedrockAgentCoreClient.start_code_interpreter_session
rboto-bedrock-agentcore==0.4.0 · Service index · Types
Model summary (excerpt): Creates and initializes a code interpreter session in Amazon Bedrock AgentCore. The session enables agents to execute code as part of their response generation, supporting programming languages such as Python for data analysis, visualization, and computation tasks. To create a session, you must specify a code interpreter identifier and a name. The session remains active until it times out or...
Install and imports
from rboto import BedrockAgentCoreClient
from collections.abc import Sequence
from rboto_bedrock_agentcore.types import (
Certificate,
StartCodeInterpreterSessionOutput,
ToolsFileSystemConfiguration,
)
Signature
async def start_code_interpreter_session(
*,
code_interpreter_identifier: str,
trace_id: str | None = None,
trace_parent: str | None = None,
name: str | None = None,
session_timeout_seconds: int | None = None,
certificates: Sequence[Certificate] | None = None,
filesystem_configurations: Sequence[ToolsFileSystemConfiguration] | None = None,
client_token: str | None = None,
) -> StartCodeInterpreterSessionOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
code_interpreter_identifier |
Yes | The unique identifier of the code interpreter to use for this session. This identifier specifies which code interpreter environment to initialize for the session. |
trace_id |
No | The trace identifier for request tracking. |
trace_parent |
No | The parent trace information for distributed tracing. |
name |
No | The name of the code interpreter session. This name helps you identify and manage the session. The name does not need to be unique. |
session_timeout_seconds |
No | The duration in seconds (time-to-live) after which the session automatically terminates, regardless of ongoing activity. Defaults to 900 seconds (15 minutes). Recommended minimum: 60 seconds. Maximum allowed: 28,800 seconds (8 hours). |
certificates |
No | A list of certificates to install in the code interpreter session. |
filesystem_configurations |
No | The file system configurations to mount into the code interpreter session. Use these configurations to mount your own Amazon Simple Storage Service (Amazon S3) Files or Amazon Elastic File System (Amazon EFS) access points. Your session can then read and write your data. If you don't specify this field, no additional file systems are mounted. |
client_token |
No | 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 AgentCore ignores the request, but does not return an error. This parameter helps prevent the creation of duplicate sessions if there are temporary network issues. |
Output
StartCodeInterpreterSessionOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
code_interpreter_identifier |
str |
Always present | — |
session_id |
str |
Always present | — |
created_at |
str |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Certificate, StartCodeInterpreterSessionOutput, ToolsFileSystemConfiguration
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_bedrock_agentcore.exceptions:
AccessDeniedError, ConflictError, InternalServerError, ResourceNotFoundError, ServiceQuotaExceededError, ThrottlingError, ValidationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.