Class CodeInterpreterNetworkConfiguration

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.NetworkConfiguration
software.amazon.awscdk.services.bedrockagentcore.CodeInterpreterNetworkConfiguration
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)", date="2026-05-20T12:39:41.738Z") @Stability(Stable) public class CodeInterpreterNetworkConfiguration extends NetworkConfiguration
Network configuration for the Code Interpreter tool.

Example:

 // Create a custom execution role
 Role executionRole = Role.Builder.create(this, "CodeInterpreterExecutionRole")
         .assumedBy(new ServicePrincipal("bedrock-agentcore.amazonaws.com"))
         .build();
 // Create code interpreter with custom execution role
 CodeInterpreterCustom codeInterpreter = CodeInterpreterCustom.Builder.create(this, "MyCodeInterpreter")
         .codeInterpreterCustomName("my_code_interpreter")
         .description("Code interpreter with custom execution role")
         .networkConfiguration(CodeInterpreterNetworkConfiguration.usingPublicNetwork())
         .executionRole(executionRole)
         .build();
 
  • Constructor Details

    • CodeInterpreterNetworkConfiguration

      protected CodeInterpreterNetworkConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
    • CodeInterpreterNetworkConfiguration

      protected CodeInterpreterNetworkConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CodeInterpreterNetworkConfiguration

      @Stability(Stable) protected CodeInterpreterNetworkConfiguration(@NotNull String mode, @Nullable software.constructs.Construct scope, @Nullable VpcConfigProps vpcConfig)
      Creates a new network configuration.

      Parameters:
      mode -
      • the network mode to use for the tool.
      This parameter is required.
      scope -
      vpcConfig -
    • CodeInterpreterNetworkConfiguration

      @Stability(Stable) protected CodeInterpreterNetworkConfiguration(@NotNull String mode, @Nullable software.constructs.Construct scope)
      Creates a new network configuration.

      Parameters:
      mode -
      • the network mode to use for the tool.
      This parameter is required.
      scope -
    • CodeInterpreterNetworkConfiguration

      @Stability(Stable) protected CodeInterpreterNetworkConfiguration(@NotNull String mode)
      Creates a new network configuration.

      Parameters:
      mode -
      • the network mode to use for the tool.
      This parameter is required.
  • Method Details

    • usingPublicNetwork

      @Stability(Stable) @NotNull public static CodeInterpreterNetworkConfiguration usingPublicNetwork()
      Creates a public network configuration.

      Returns:
      A CodeInterpreterNetworkConfiguration. Run this tool to operate in a public environment with internet access, suitable for less sensitive or open-use scenarios.
    • usingSandboxNetwork

      @Stability(Stable) @NotNull public static CodeInterpreterNetworkConfiguration usingSandboxNetwork()
      Creates a sandbox network configuration.

      Returns:
      A CodeInterpreterNetworkConfiguration. Run this tool in a restricted environment with limited Permissions and Encryption to enhance safety and reduce potential risks.
    • usingVpc

      @Stability(Stable) @NotNull public static CodeInterpreterNetworkConfiguration usingVpc(@NotNull software.constructs.Construct scope, @NotNull VpcConfigProps vpcConfig)
      Creates a network configuration from a VPC configuration.

      Parameters:
      scope - This parameter is required.
      vpcConfig -
      • The VPC configuration.
      This parameter is required.
      Returns:
      A CodeInterpreterNetworkConfiguration.