Skip to content

create_code_interpreter

Operation

create_code_interpreter

create_code_interpreter(request: CreateCodeInterpreterInput | CreateCodeInterpreterInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateCodeInterpreterInputDict]) -> CreateCodeInterpreterOutput

Creates a custom code interpreter.

Parameters:

Name Type Description Default
request CreateCodeInterpreterInput | CreateCodeInterpreterInputDict | 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[CreateCodeInterpreterInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateCodeInterpreterOutput

An instance of CreateCodeInterpreterOutput.

create_code_interpreter async

create_code_interpreter(request: CreateCodeInterpreterInput | CreateCodeInterpreterInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateCodeInterpreterInputDict]) -> CreateCodeInterpreterOutput

Creates a custom code interpreter.

Parameters:

Name Type Description Default
request CreateCodeInterpreterInput | CreateCodeInterpreterInputDict | 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[CreateCodeInterpreterInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateCodeInterpreterOutput

An instance of CreateCodeInterpreterOutput.

Input

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

CreateCodeInterpreterInputDict

Bases: TypedDict

Dictionary form of CreateCodeInterpreterInput.

Attributes

certificates instance-attribute
certificates: Sequence[Certificate | CertificateDict] | None

A list of certificates to install in the code interpreter.

client_token instance-attribute
client_token: str | None

A unique, case-sensitive identifier to ensure that the operation 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 field is autopopulated if not provided.

description instance-attribute
description: str | None

The description of the code interpreter.

execution_role_arn instance-attribute
execution_role_arn: str | None

The Amazon Resource Name (ARN) of the IAM role that provides permissions for the code interpreter to access Amazon Web Services services.

filesystem_configurations instance-attribute

The file system configurations to mount into the code interpreter. Use these configurations to mount your own Amazon Simple Storage Service (Amazon S3) Files or Amazon Elastic File System (Amazon EFS) access points. Your sessions can then access your data. If you don't specify this field, no file systems are mounted.

name instance-attribute
name: Required[str]

The name of the code interpreter. The name must be unique within your account.

network_configuration instance-attribute

The network configuration for the code interpreter. This configuration specifies the network mode for the code interpreter.

tags instance-attribute
tags: Mapping[str, str] | None

A map of tag keys and values to assign to the code interpreter. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.

CreateCodeInterpreterInput dataclass

Bases: _SerdeShape

Dataclass for CreateCodeInterpreterInput structure.

Attributes

certificates class-attribute instance-attribute
certificates: list[Certificate] | None = ...

A list of certificates to install in the code interpreter.

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

A unique, case-sensitive identifier to ensure that the operation 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 field is autopopulated if not provided.

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

The description of the code interpreter.

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

The Amazon Resource Name (ARN) of the IAM role that provides permissions for the code interpreter to access Amazon Web Services services.

filesystem_configurations class-attribute instance-attribute
filesystem_configurations: list[ToolsFileSystemConfiguration] | None = ...

The file system configurations to mount into the code interpreter. Use these configurations to mount your own Amazon Simple Storage Service (Amazon S3) Files or Amazon Elastic File System (Amazon EFS) access points. Your sessions can then access your data. If you don't specify this field, no file systems are mounted.

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

The name of the code interpreter. The name must be unique within your account.

network_configuration class-attribute instance-attribute
network_configuration: CodeInterpreterNetworkConfiguration | None = ...

The network configuration for the code interpreter. This configuration specifies the network mode for the code interpreter.

tags class-attribute instance-attribute
tags: dict[str, str] | None = ...

A map of tag keys and values to assign to the code interpreter. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.

Output

CreateCodeInterpreterOutput dataclass

Bases: _SerdeShape

Dataclass for CreateCodeInterpreterOutput structure.

Attributes

code_interpreter_arn instance-attribute
code_interpreter_arn: str

The Amazon Resource Name (ARN) of the created code interpreter.

code_interpreter_id instance-attribute
code_interpreter_id: str

The unique identifier of the created code interpreter.

created_at instance-attribute
created_at: datetime

The timestamp when the code interpreter was created.

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.

status instance-attribute
status: str

The current status of the code interpreter.