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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forManagedEc2ComputeEnvironmentPropsstatic final classAn implementation forManagedEc2ComputeEnvironmentProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default List<InstanceClass> The instance classes that this Compute Environment can launch.default List<InstanceType> The instance types that this Compute Environment can launch.Methods inherited from interface software.amazon.awscdk.services.batch.ComputeEnvironmentProps
getComputeEnvironmentName, getEnabled, getServiceRoleMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.batch.ManagedComputeEnvironmentProps
getMaxvCpus, getReplaceComputeEnvironment, getSecurityGroups, getSpot, getTerminateOnUpdate, getUpdateTimeout, getUpdateToLatestImageVersion, getVpc, getVpcSubnets
-
Method Details
-
getInstanceClasses
The instance classes that this Compute Environment can launch.Which one is chosen depends on the
AllocationStrategyused. Batch will automatically choose the instance size.Default: - the instances Batch considers will be used (currently C4, M4, and R4)
-
getInstanceTypes
The instance types that this Compute Environment can launch.Which one is chosen depends on the
AllocationStrategyused.Default: - the instances Batch considers will be used (currently C4, M4, and R4)
-
builder
-