Interface ManagedEc2ComputeEnvironmentProps

All Superinterfaces:
ComputeEnvironmentProps, software.amazon.jsii.JsiiSerializable, ManagedComputeEnvironmentProps
All Known Subinterfaces:
ManagedEc2EcsComputeEnvironmentProps, ManagedEc2EksComputeEnvironmentProps
All Known Implementing Classes:
ManagedEc2ComputeEnvironmentProps.Jsii$Proxy, ManagedEc2EcsComputeEnvironmentProps.Jsii$Proxy, ManagedEc2EksComputeEnvironmentProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-04-14T18:31:49.680Z") @Stability(Stable) public interface ManagedEc2ComputeEnvironmentProps extends software.amazon.jsii.JsiiSerializable, ManagedComputeEnvironmentProps
Props for a ManagedEc2ComputeEnvironment.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.batch.*;
 import software.amazon.awscdk.services.ec2.*;
 import software.amazon.awscdk.services.iam.*;
 InstanceType instanceType;
 Role role;
 SecurityGroup securityGroup;
 Subnet subnet;
 SubnetFilter subnetFilter;
 Vpc vpc;
 ManagedEc2ComputeEnvironmentProps managedEc2ComputeEnvironmentProps = ManagedEc2ComputeEnvironmentProps.builder()
         .vpc(vpc)
         // the properties below are optional
         .computeEnvironmentName("computeEnvironmentName")
         .enabled(false)
         .instanceClasses(List.of(InstanceClass.STANDARD3))
         .instanceTypes(List.of(instanceType))
         .maxvCpus(123)
         .replaceComputeEnvironment(false)
         .securityGroups(List.of(securityGroup))
         .serviceRole(role)
         .spot(false)
         .terminateOnUpdate(false)
         .updateTimeout(Duration.minutes(30))
         .updateToLatestImageVersion(false)
         .vpcSubnets(SubnetSelection.builder()
                 .availabilityZones(List.of("availabilityZones"))
                 .onePerAz(false)
                 .subnetFilters(List.of(subnetFilter))
                 .subnetGroupName("subnetGroupName")
                 .subnets(List.of(subnet))
                 .subnetType(SubnetType.PRIVATE_ISOLATED)
                 .build())
         .build();
 
  • Method Details

    • getInstanceClasses

      @Stability(Stable) @Nullable default List<InstanceClass> getInstanceClasses()
      The instance classes that this Compute Environment can launch.

      Which one is chosen depends on the AllocationStrategy used. Batch will automatically choose the instance size.

      Default: - the instances Batch considers will be used (currently C4, M4, and R4)

    • getInstanceTypes

      @Stability(Stable) @Nullable default List<InstanceType> getInstanceTypes()
      The instance types that this Compute Environment can launch.

      Which one is chosen depends on the AllocationStrategy used.

      Default: - the instances Batch considers will be used (currently C4, M4, and R4)

    • builder

      @Stability(Stable) static ManagedEc2ComputeEnvironmentProps.Builder builder()
      Returns:
      a ManagedEc2ComputeEnvironmentProps.Builder of ManagedEc2ComputeEnvironmentProps