class CodeInterpreterNetworkConfiguration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.CodeInterpreterNetworkConfiguration |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#CodeInterpreterNetworkConfiguration |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.CodeInterpreterNetworkConfiguration |
Python | aws_cdk.aws_bedrock_agentcore_alpha.CodeInterpreterNetworkConfiguration |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป CodeInterpreterNetworkConfiguration |
Extends
Network
Network configuration for the Code Interpreter tool.
Example
// Create a custom execution role
const executionRole = new iam.Role(this, "CodeInterpreterExecutionRole", {
assumedBy: new iam.ServicePrincipal("bedrock-agentcore.amazonaws.com"),
});
// Create code interpreter with custom execution role
const codeInterpreter = new agentcore.CodeInterpreterCustom(this, "MyCodeInterpreter", {
codeInterpreterCustomName: "my_code_interpreter",
description: "Code interpreter with custom execution role",
networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingPublicNetwork(),
executionRole: executionRole,
});
Initializer (protected)
super(mode: string, scope?: Construct, vpcConfig?: VpcConfigProps)
Parameters
- mode
stringโ - the network mode to use for the tool. - scope
Construct - vpcConfig
VpcConfig Props
Creates a new network configuration.
Properties
| Name | Type | Description |
|---|---|---|
| network | string | The network mode to use. |
| connections? | Connections | The connections object to the network. |
| scope? | Construct | The scope to create the resource in. |
| vpc | Subnet | The VPC subnets to use. |
networkMode
Type:
string
The network mode to use.
Configure the security level for agent execution to control access, isolate resources, and protect sensitive data.
connections?
Type:
Connections
(optional)
The connections object to the network.
scope?
Type:
Construct
(optional)
The scope to create the resource in.
vpcSubnets?
Type:
Subnet
(optional)
The VPC subnets to use.
Methods
| Name | Description |
|---|---|
| static using | Creates a public network configuration. |
| static using | Creates a sandbox network configuration. |
| static using | Creates a network configuration from a VPC configuration. |
static usingPublicNetwork()
public static usingPublicNetwork(): CodeInterpreterNetworkConfiguration
Returns
Creates a public network configuration.
static usingSandboxNetwork()
public static usingSandboxNetwork(): CodeInterpreterNetworkConfiguration
Returns
Creates a sandbox network configuration.
static usingVpc(scope, vpcConfig)
public static usingVpc(scope: Construct, vpcConfig: VpcConfigProps): CodeInterpreterNetworkConfiguration
Parameters
- scope
Construct - vpcConfig
Vpcโ - The VPC configuration.Config Props
Returns
Creates a network configuration from a VPC configuration.

.NET
Go
Java
Python
TypeScript (