Class CfnCodeInterpreterCustom

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.bedrockagentcore.CfnCodeInterpreterCustom
All Implemented Interfaces:
IInspectable, ITaggableV2, ICodeInterpreterCustomRef, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)", date="2025-10-29T11:15:33.769Z") @Stability(Stable) public class CfnCodeInterpreterCustom extends CfnResource implements IInspectable, ICodeInterpreterCustomRef, ITaggableV2
The AgentCore Code Interpreter tool enables agents to securely execute code in isolated sandbox environments.

It offers advanced configuration support and seamless integration with popular frameworks.

For more information about using the custom code interpreter, see Execute code and analyze data using Amazon Bedrock AgentCore Code Interpreter .

See the Properties section below for descriptions of both the required and optional properties.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.bedrockagentcore.*;
 CfnCodeInterpreterCustom cfnCodeInterpreterCustom = CfnCodeInterpreterCustom.Builder.create(this, "MyCfnCodeInterpreterCustom")
         .name("name")
         .networkConfiguration(CodeInterpreterNetworkConfigurationProperty.builder()
                 .networkMode("networkMode")
                 // the properties below are optional
                 .vpcConfig(VpcConfigProperty.builder()
                         .securityGroups(List.of("securityGroups"))
                         .subnets(List.of("subnets"))
                         .build())
                 .build())
         // the properties below are optional
         .description("description")
         .executionRoleArn("executionRoleArn")
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnCodeInterpreterCustom

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

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

      @Stability(Stable) public CfnCodeInterpreterCustom(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCodeInterpreterCustomProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • fromCodeInterpreterId

      @Stability(Stable) @NotNull public static ICodeInterpreterCustomRef fromCodeInterpreterId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String codeInterpreterId)
      Creates a new ICodeInterpreterCustomRef from a codeInterpreterId.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      codeInterpreterId - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCodeInterpreterArn

      @Stability(Stable) @NotNull public String getAttrCodeInterpreterArn()
      The code interpreter Amazon Resource Name (ARN).
    • getAttrCodeInterpreterId

      @Stability(Stable) @NotNull public String getAttrCodeInterpreterId()
      The ID of the code interpreter.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The time at which the code interpreter was created.
    • getAttrFailureReason

      @Stability(Stable) @NotNull public String getAttrFailureReason()
      The reason for failure if the code interpreter creation or operation failed.
    • getAttrLastUpdatedAt

      @Stability(Stable) @NotNull public String getAttrLastUpdatedAt()
      The time at which the code interpreter was last updated.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the custom code interpreter.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCodeInterpreterCustomRef

      @Stability(Stable) @NotNull public CodeInterpreterCustomReference getCodeInterpreterCustomRef()
      A reference to a CodeInterpreterCustom resource.
      Specified by:
      getCodeInterpreterCustomRef in interface ICodeInterpreterCustomRef
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the code interpreter.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the code interpreter.
    • getNetworkConfiguration

      @Stability(Stable) @NotNull public Object getNetworkConfiguration()
      The network configuration for a code interpreter.

      Returns union: either IResolvable or CfnCodeInterpreterCustom.CodeInterpreterNetworkConfigurationProperty

    • setNetworkConfiguration

      @Stability(Stable) public void setNetworkConfiguration(@NotNull IResolvable value)
      The network configuration for a code interpreter.
    • setNetworkConfiguration

      @Stability(Stable) public void setNetworkConfiguration(@NotNull CfnCodeInterpreterCustom.CodeInterpreterNetworkConfigurationProperty value)
      The network configuration for a code interpreter.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The code interpreter description.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The code interpreter description.
    • getExecutionRoleArn

      @Stability(Stable) @Nullable public String getExecutionRoleArn()
      The Amazon Resource Name (ARN) of the execution role.
    • setExecutionRoleArn

      @Stability(Stable) public void setExecutionRoleArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the execution role.
    • getTags

      @Stability(Stable) @Nullable public Map<String,String> getTags()
      The tags for the code interpreter.
    • setTags

      @Stability(Stable) public void setTags(@Nullable Map<String,String> value)
      The tags for the code interpreter.