All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
VpcConfigProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.125.0 (build fdbe357)", date="2026-01-09T10:20:42.406Z") @Stability(Experimental) public interface VpcConfigProps extends software.amazon.jsii.JsiiSerializable
(experimental) VPC configuration properties.

Only used when network mode is VPC.

Example:

 Vpc vpc = new Vpc(this, "testVPC");
 CodeInterpreterCustom codeInterpreter = CodeInterpreterCustom.Builder.create(this, "MyCodeInterpreter")
         .codeInterpreterCustomName("my_sandbox_interpreter")
         .description("Code interpreter with isolated network access")
         .networkConfiguration(BrowserNetworkConfiguration.usingVpc(this, VpcConfigProps.builder()
                 .vpc(vpc)
                 .build()))
         .build();
 codeInterpreter.connections.addSecurityGroup(SecurityGroup.Builder.create(this, "AdditionalGroup").vpc(vpc).build());
 
  • Method Details

    • getVpc

      @Stability(Experimental) @NotNull IVpc getVpc()
      (experimental) The VPC to deploy the resource to.
    • getAllowAllOutbound

      @Stability(Experimental) @Nullable default Boolean getAllowAllOutbound()
      (experimental) Whether to allow the resource to send all network traffic (except ipv6).

      If set to false, you must individually add traffic rules to allow the resource to connect to network targets.

      Do not specify this property if the securityGroups property is set. Instead, configure allowAllOutbound directly on the security group.

      Default: true

    • getSecurityGroups

      @Stability(Experimental) @Nullable default List<ISecurityGroup> getSecurityGroups()
      (experimental) The list of security groups to associate with the resource's network interfaces.

      Only used if 'vpc' is supplied.

      Default: - If the resource is placed within a VPC and a security group is not specified by this prop, a dedicated security group will be created for this resource.

    • getVpcSubnets

      @Stability(Experimental) @Nullable default SubnetSelection getVpcSubnets()
      (experimental) Where to place the network interfaces within the VPC.

      This requires vpc to be specified in order for interfaces to actually be placed in the subnets. If vpc is not specify, this will raise an error.

      Default: - the Vpc default strategy if not specified

    • builder

      @Stability(Experimental) static VpcConfigProps.Builder builder()
      Returns:
      a VpcConfigProps.Builder of VpcConfigProps