Skip to main content

code_interpreters

Creates, updates, deletes, gets or lists a code_interpreters resource.

Overview

Namecode_interpreters
TypeResource
Idaws.bedrock_agentcore_control.code_interpreters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the code interpreter. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}</code>)
certificatesarrayThe list of certificates configured for the code interpreter.
code_interpreter_arnstringThe Amazon Resource Name (ARN) of the code interpreter. (pattern: <code>arn:aws(-[^:]+)?:bedrock-agentcore:[a-z0-9-]+:(aws|[0-9]{12}):code-interpreter(-custom)?/(aws.codeinterpreter.v1|[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10})</code>)
code_interpreter_idstringThe unique identifier of the code interpreter. (pattern: <code>(aws.codeinterpreter.v1|[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10})</code>)
created_atstring (date-time)The timestamp when the code interpreter was created.
descriptionstringThe description of the code interpreter.
execution_role_arnstringThe IAM role ARN that provides permissions for the code interpreter. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>)
failure_reasonstringThe reason for failure if the code interpreter is in a failed state.
filesystem_configurationsarrayThe file system configurations to mount into the session. Each configuration maps an access point to a path inside the session. You can specify up to 4 configurations. The maximum is 2 Amazon Simple Storage Service (Amazon S3) Files access points and 2 Amazon Elastic File System (Amazon EFS) access points.
last_updated_atstring (date-time)The timestamp when the code interpreter was last updated.
network_configurationobjectThe network configuration for a code interpreter. This structure defines how the code interpreter connects to the network.
statusstringThe current status of the code interpreter. (CREATING, CREATE_FAILED, READY, DELETING, DELETE_FAILED, DELETED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_code_interpreterselectcode_interpreter_id, regionGets information about a custom code interpreter.
list_code_interpretersselectregionmaxResults, nextToken, typeLists all custom code interpreters in your account.
create_code_interpreterinsertregion, name, networkConfigurationCreates a custom code interpreter.
delete_code_interpreterdeletecode_interpreter_id, regionclientTokenDeletes a custom code interpreter.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
code_interpreter_idstringThe unique identifier of the code interpreter to delete.
regionstringAWS region (default: us-east-1)
clientTokenstringA unique, case-sensitive identifier to ensure idempotency of the request.
maxResultsintegerThe maximum number of results to return in the response.
nextTokenstringA token to retrieve the next page of results.
typestringThe type of code interpreters to list.

SELECT examples

Gets information about a custom code interpreter.

SELECT
name,
certificates,
code_interpreter_arn,
code_interpreter_id,
created_at,
description,
execution_role_arn,
failure_reason,
filesystem_configurations,
last_updated_at,
network_configuration,
status
FROM aws.bedrock_agentcore_control.code_interpreters
WHERE code_interpreter_id = '{{ code_interpreter_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a custom code interpreter.

INSERT INTO aws.bedrock_agentcore_control.code_interpreters (
name,
description,
executionRoleArn,
networkConfiguration,
certificates,
filesystemConfigurations,
clientToken,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ executionRoleArn }}',
'{{ networkConfiguration }}' /* required */,
'{{ certificates }}',
'{{ filesystemConfigurations }}',
'{{ clientToken }}',
'{{ tags }}',
'{{ region }}'
RETURNING
code_interpreter_arn,
code_interpreter_id,
created_at,
status
;

DELETE examples

Deletes a custom code interpreter.

DELETE FROM aws.bedrock_agentcore_control.code_interpreters
WHERE code_interpreter_id = '{{ code_interpreter_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;