code_interpreters
Creates, updates, deletes, gets or lists a code_interpreters resource.
Overview
| Name | code_interpreters |
| Type | Resource |
| Id | aws.bedrock_agentcore_control.code_interpreters |
Fields
The following fields are returned by SELECT queries:
- get_code_interpreter
- list_code_interpreters
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the code interpreter. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}</code>) |
certificates | array | The list of certificates configured for the code interpreter. |
code_interpreter_arn | string | The 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_id | string | The 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_at | string (date-time) | The timestamp when the code interpreter was created. |
description | string | The description of the code interpreter. |
execution_role_arn | string | The IAM role ARN that provides permissions for the code interpreter. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>) |
failure_reason | string | The reason for failure if the code interpreter is in a failed state. |
filesystem_configurations | array | The 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_at | string (date-time) | The timestamp when the code interpreter was last updated. |
network_configuration | object | The network configuration for a code interpreter. This structure defines how the code interpreter connects to the network. |
status | string | The current status of the code interpreter. (CREATING, CREATE_FAILED, READY, DELETING, DELETE_FAILED, DELETED) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the code interpreter. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}</code>) |
code_interpreter_arn | string | The 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_id | string | The 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_at | string (date-time) | The timestamp when the code interpreter was created. |
description | string | The description of the code interpreter. |
last_updated_at | string (date-time) | The timestamp when the code interpreter was last updated. |
status | string | The current status of the code interpreter. (CREATING, CREATE_FAILED, READY, DELETING, DELETE_FAILED, DELETED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_code_interpreter | select | code_interpreter_id, region | Gets information about a custom code interpreter. | |
list_code_interpreters | select | region | maxResults, nextToken, type | Lists all custom code interpreters in your account. |
create_code_interpreter | insert | region, name, networkConfiguration | Creates a custom code interpreter. | |
delete_code_interpreter | delete | code_interpreter_id, region | clientToken | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
code_interpreter_id | string | The unique identifier of the code interpreter to delete. |
region | string | AWS region (default: us-east-1) |
clientToken | string | A unique, case-sensitive identifier to ensure idempotency of the request. |
maxResults | integer | The maximum number of results to return in the response. |
nextToken | string | A token to retrieve the next page of results. |
type | string | The type of code interpreters to list. |
SELECT examples
- get_code_interpreter
- list_code_interpreters
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
;
Lists all custom code interpreters in your account.
SELECT
name,
code_interpreter_arn,
code_interpreter_id,
created_at,
description,
last_updated_at,
status
FROM aws.bedrock_agentcore_control.code_interpreters
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND type = '{{ type }}'
;
INSERT examples
- create_code_interpreter
- Manifest
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
;
# Description fields are for documentation purposes
- name: code_interpreters
props:
- name: region
value: "{{ region }}"
description: Required parameter for the code_interpreters resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: executionRoleArn
value: "{{ executionRoleArn }}"
- name: networkConfiguration
description: |
The network configuration for a code interpreter. This structure defines how the code interpreter connects to the network.
value:
networkMode: "{{ networkMode }}"
vpcConfig:
securityGroups:
- "{{ securityGroups }}"
subnets:
- "{{ subnets }}"
requireServiceS3Endpoint: {{ requireServiceS3Endpoint }}
- name: certificates
value:
- location:
secretsManager:
secretArn: "{{ secretArn }}"
- name: filesystemConfigurations
description: |
The 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.
value:
- s3FilesConfiguration:
accessPointArn: "{{ accessPointArn }}"
mountPath: "{{ mountPath }}"
fileSystemArn: "{{ fileSystemArn }}"
efsConfiguration:
accessPointArn: "{{ accessPointArn }}"
mountPath: "{{ mountPath }}"
fileSystemArn: "{{ fileSystemArn }}"
- name: clientToken
value: "{{ clientToken }}"
- name: tags
value: "{{ tags }}"
DELETE examples
- delete_code_interpreter
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 }}'
;