Skip to content

list_code_interpreter_sessions

Operation

list_code_interpreter_sessions

list_code_interpreter_sessions(request: ListCodeInterpreterSessionsInput | ListCodeInterpreterSessionsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListCodeInterpreterSessionsInputDict]) -> ListCodeInterpreterSessionsOutput

Retrieves a list of code interpreter sessions in Amazon Bedrock AgentCore that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.

You can filter the results by code interpreter identifier and session status. The operation supports pagination to handle large result sets efficiently.

We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.

The following operations are related to ListCodeInterpreterSessions:

Parameters:

Name Type Description Default
request ListCodeInterpreterSessionsInput | ListCodeInterpreterSessionsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[ListCodeInterpreterSessionsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ListCodeInterpreterSessionsOutput

An instance of ListCodeInterpreterSessionsOutput.

list_code_interpreter_sessions async

list_code_interpreter_sessions(request: ListCodeInterpreterSessionsInput | ListCodeInterpreterSessionsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListCodeInterpreterSessionsInputDict]) -> ListCodeInterpreterSessionsOutput

Retrieves a list of code interpreter sessions in Amazon Bedrock AgentCore that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.

You can filter the results by code interpreter identifier and session status. The operation supports pagination to handle large result sets efficiently.

We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.

The following operations are related to ListCodeInterpreterSessions:

Parameters:

Name Type Description Default
request ListCodeInterpreterSessionsInput | ListCodeInterpreterSessionsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[ListCodeInterpreterSessionsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ListCodeInterpreterSessionsOutput

An instance of ListCodeInterpreterSessionsOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

ListCodeInterpreterSessionsInputDict

Bases: TypedDict

Dictionary form of ListCodeInterpreterSessionsInput.

Attributes

code_interpreter_identifier instance-attribute
code_interpreter_identifier: Required[str]

The unique identifier of the code interpreter to list sessions for. If specified, only sessions for this code interpreter are returned. If not specified, sessions for all code interpreters are returned.

max_results instance-attribute
max_results: int | None

The maximum number of results to return in a single call. The default value is 10. Valid values range from 1 to 100. To retrieve the remaining results, make another call with the returned nextToken value.

next_token instance-attribute
next_token: str | None

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. If not specified, Amazon Bedrock AgentCore returns the first page of results.

status instance-attribute
status: str | None

The status of the code interpreter sessions to list. Valid values include ACTIVE, STOPPING, and STOPPED. If not specified, sessions with any status are returned.

ListCodeInterpreterSessionsInput dataclass

Bases: _SerdeShape

Dataclass for ListCodeInterpreterSessionsInput structure.

Attributes

code_interpreter_identifier class-attribute instance-attribute
code_interpreter_identifier: str | None = ...

The unique identifier of the code interpreter to list sessions for. If specified, only sessions for this code interpreter are returned. If not specified, sessions for all code interpreters are returned.

max_results class-attribute instance-attribute
max_results: int | None = ...

The maximum number of results to return in a single call. The default value is 10. Valid values range from 1 to 100. To retrieve the remaining results, make another call with the returned nextToken value.

next_token class-attribute instance-attribute
next_token: str | None = ...

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. If not specified, Amazon Bedrock AgentCore returns the first page of results.

status class-attribute instance-attribute
status: str | None = ...

The status of the code interpreter sessions to list. Valid values include ACTIVE, STOPPING, and STOPPED. If not specified, sessions with any status are returned.

Output

ListCodeInterpreterSessionsOutput dataclass

Bases: _SerdeShape

Dataclass for ListCodeInterpreterSessionsOutput structure.

Attributes

items instance-attribute

The list of code interpreter sessions that match the specified criteria.

next_token class-attribute instance-attribute
next_token: str | None = ...

The token to use in a subsequent ListCodeInterpreterSessions request to get the next set of results.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.