Skip to content

ListCodeInterpreterSessions

Source: src/AWS/BedrockAgentCore/ListCodeInterpreterSessions.ts

Lists the code interpreter’s sessions.

Bind a CodeInterpreter inside a function runtime to call the AgentCore data-plane API against it. Provide AgentCore.ListCodeInterpreterSessionsHttp on the Function effect to implement the binding.

// init
const listCodeInterpreterSessions = yield* AgentCore.ListCodeInterpreterSessions(codeInterpreter);
return {
fetch: Effect.gen(function* () {
// runtime
const result = yield* listCodeInterpreterSessions({});
return HttpServerResponse.json({ count: result.items?.length ?? 0 });
}),
};