Interface ManagedEc2EcsComputeEnvironmentProps
- All Superinterfaces:
ComputeEnvironmentProps
,software.amazon.jsii.JsiiSerializable
,ManagedComputeEnvironmentProps
- All Known Implementing Classes:
ManagedEc2EcsComputeEnvironmentProps.Jsii$Proxy
Example:
IManagedEc2EcsComputeEnvironment computeEnv; Vpc vpc = new Vpc(this, "VPC"); computeEnv.addInstanceClass(InstanceClass.M5AD); // Or, specify it on the constructor: // Or, specify it on the constructor: ManagedEc2EcsComputeEnvironment.Builder.create(this, "myEc2ComputeEnv") .vpc(vpc) .instanceClasses(List.of(InstanceClass.R4)) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forManagedEc2EcsComputeEnvironmentProps
static final class
An implementation forManagedEc2EcsComputeEnvironmentProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default AllocationStrategy
The allocation strategy to use if not enough instances of the best fitting instance type can be allocated.default List<EcsMachineImage>
Configure which AMIs this Compute Environment can launch.default List<InstanceClass>
The instance classes that this Compute Environment can launch.default IRole
The execution Role that instances launched by this Compute Environment will use.default List<InstanceType>
The instance types that this Compute Environment can launch.default ILaunchTemplate
The Launch Template that this Compute Environment will use to provision EC2 Instances.default Number
The minimum vCPUs that an environment should maintain, even if the compute environment is DISABLED.default IPlacementGroup
The EC2 placement group to associate with your compute resources.default Number
The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.default IRole
The service-linked role that Spot Fleet needs to launch instances on your behalf.default Boolean
Whether or not to use batch's optimal instance type.Methods inherited from interface software.amazon.awscdk.services.batch.ComputeEnvironmentProps
getComputeEnvironmentName, getEnabled, getServiceRole
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.batch.ManagedComputeEnvironmentProps
getMaxvCpus, getReplaceComputeEnvironment, getSecurityGroups, getSpot, getTerminateOnUpdate, getUpdateTimeout, getUpdateToLatestImageVersion, getVpc, getVpcSubnets
-
Method Details
-
getAllocationStrategy
The allocation strategy to use if not enough instances of the best fitting instance type can be allocated.Default: - `BEST_FIT_PROGRESSIVE` if not using Spot instances, `SPOT_CAPACITY_OPTIMIZED` if using Spot instances.
-
getImages
Configure which AMIs this Compute Environment can launch.If you specify this property with only
image
specified, then theimageType
will default toECS_AL2
. If your image needs GPU resources, specifyECS_AL2_NVIDIA
; otherwise, the instances will not be able to properly join the ComputeEnvironment.Default: - ECS_AL2 for non-GPU instances, ECS_AL2_NVIDIA for GPU instances
-
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)
-
getInstanceRole
The execution Role that instances launched by this Compute Environment will use.Default: - a role will be created
-
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)
-
getLaunchTemplate
The Launch Template that this Compute Environment will use to provision EC2 Instances.Note: if
securityGroups
is specified on both your launch template and this Compute Environment, **thesecurityGroup
s on the Compute Environment override the ones on the launch template.Default: no launch template
-
getMinvCpus
The minimum vCPUs that an environment should maintain, even if the compute environment is DISABLED.Default: 0
-
getPlacementGroup
The EC2 placement group to associate with your compute resources.If you intend to submit multi-node parallel jobs to this Compute Environment, you should consider creating a cluster placement group and associate it with your compute resources. This keeps your multi-node parallel job on a logical grouping of instances within a single Availability Zone with high network flow potential.
Default: - no placement group
- See Also:
-
getSpotBidPercentage
The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.For example, if your maximum percentage is 20%, the Spot price must be less than 20% of the current On-Demand price for that Instance. You always pay the lowest market price and never more than your maximum percentage. For most use cases, Batch recommends leaving this field empty.
Implies
spot == true
if setDefault: 100%
-
getSpotFleetRole
The service-linked role that Spot Fleet needs to launch instances on your behalf.Default: - a new role will be created
- See Also:
-
getUseOptimalInstanceClasses
Whether or not to use batch's optimal instance type.The optimal instance type is equivalent to adding the C4, M4, and R4 instance classes. You can specify other instance classes (of the same architecture) in addition to the optimal instance classes.
Default: true
-
builder
-