interface ICodeInterpreterCustom
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.ICodeInterpreterCustom |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#ICodeInterpreterCustom |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.ICodeInterpreterCustom |
Python | aws_cdk.aws_bedrock_agentcore_alpha.ICodeInterpreterCustom |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป ICodeInterpreterCustom |
Implemented by
Code
Obtainable from
Code.fromCodeInterpreterCustomAttributes()
Interface for CodeInterpreterCustom resources.
Properties
| Name | Type | Description |
|---|---|---|
| code | string | The ARN of the code interpreter resource. |
| code | string | The id of the code interpreter. |
| connections | Connections | The network connections associated with this resource. |
| env | Resource | The environment this resource belongs to. |
| execution | IRole | The IAM role that provides permissions for the code interpreter to access AWS services. |
| grant | IPrincipal | The principal to grant permissions to. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| created | string | Timestamp when the code interpreter was created. |
| last | string | Timestamp when the code interpreter was last updated. |
| status? | string | The status of the code interpreter. |
codeInterpreterArn
Type:
string
The ARN of the code interpreter resource.
codeInterpreterId
Type:
string
The id of the code interpreter.
connections
Type:
Connections
The network connections associated with this resource.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
executionRole
Type:
IRole
The IAM role that provides permissions for the code interpreter to access AWS services.
grantPrincipal
Type:
IPrincipal
The principal to grant permissions to.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
createdAt?
Type:
string
(optional)
Timestamp when the code interpreter was created.
lastUpdatedAt?
Type:
string
(optional)
Timestamp when the code interpreter was last updated.
status?
Type:
string
(optional)
The status of the code interpreter.
Methods
| Name | Description |
|---|---|
| apply | Apply the given removal policy to this resource. |
| grant(grantee, ...actions) | Grants IAM actions to the IAM Principal. |
| grant | Grants Get and List actions on the Code Interpreter. |
| grant | Grants Invoke, Start, and Stop actions on the Code Interpreter. |
| metric(metricName, dimensions, props?) | Return the given named metric for this code interpreter. |
| metric | Return a metric containing the number of errors for a specific API operation performed on this code interpreter. |
| metric | Return the given named metric related to the API operation performed on this code interpreter. |
| metric | Return a metric containing the total number of API requests made for a specific code interpreter operation. |
| metric | Return a metric measuring the latency of a specific API operation performed on this code interpreter. |
| metric | Return a metric measuring the duration of code interpreter sessions. |
| metric | Return a metric containing the number of system errors for a specific API operation performed on this code interpreter. |
| metric | Return a metric containing the number of throttled requests for a specific API operation performed on this code interpreter. |
| metric | Return a metric containing the number of user errors for a specific API operation performed on this code interpreter. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable - actions
string
Returns
Grants IAM actions to the IAM Principal.
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grants Get and List actions on the Code Interpreter.
grantUse(grantee)
public grantUse(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grants Invoke, Start, and Stop actions on the Code Interpreter.
metric(metricName, dimensions, props?)
public metric(metricName: string, dimensions: { [string]: string }, props?: MetricOptions): Metric
Parameters
- metricName
string - dimensions
{ [string]: string } - props
MetricOptions
Returns
Return the given named metric for this code interpreter.
metricErrorsForApiOperation(operation, props?)
public metricErrorsForApiOperation(operation: string, props?: MetricOptions): Metric
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric containing the number of errors for a specific API operation performed on this code interpreter.
metricForApiOperation(metricName, operation, props?)
public metricForApiOperation(metricName: string, operation: string, props?: MetricOptions): Metric
Parameters
- metricName
string - operation
string - props
MetricOptions
Returns
Return the given named metric related to the API operation performed on this code interpreter.
metricInvocationsForApiOperation(operation, props?)
public metricInvocationsForApiOperation(operation: string, props?: MetricOptions): Metric
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric containing the total number of API requests made for a specific code interpreter operation.
metricLatencyForApiOperation(operation, props?)
public metricLatencyForApiOperation(operation: string, props?: MetricOptions): Metric
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric measuring the latency of a specific API operation performed on this code interpreter.
metricSessionDuration(props?)
public metricSessionDuration(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Return a metric measuring the duration of code interpreter sessions.
metricSystemErrorsForApiOperation(operation, props?)
public metricSystemErrorsForApiOperation(operation: string, props?: MetricOptions): Metric
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric containing the number of system errors for a specific API operation performed on this code interpreter.
metricThrottlesForApiOperation(operation, props?)
public metricThrottlesForApiOperation(operation: string, props?: MetricOptions): Metric
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric containing the number of throttled requests for a specific API operation performed on this code interpreter.
metricUserErrorsForApiOperation(operation, props?)
public metricUserErrorsForApiOperation(operation: string, props?: MetricOptions): Metric
Parameters
- operation
string - props
MetricOptions
Returns
Return a metric containing the number of user errors for a specific API operation performed on this code interpreter.

.NET
Go
Java
Python
TypeScript (