Interface IManagedEc2EcsComputeEnvironment
- All Superinterfaces:
IComputeEnvironment,IConnectable,software.constructs.IConstruct,software.constructs.IDependable,IEnvironmentAware,IManagedComputeEnvironment,IResource,ITaggable,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IManagedEc2EcsComputeEnvironment.Jsii$Default
- All Known Implementing Classes:
IManagedEc2EcsComputeEnvironment.Jsii$Proxy,ManagedEc2EcsComputeEnvironment
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInternal default implementation forIManagedEc2EcsComputeEnvironment.static final classA proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInstanceClass(InstanceClass instanceClass) Add an instance class to this compute environment.voidaddInstanceType(InstanceType instanceType) Add an instance type to this compute environment.default AllocationStrategyThe 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.The instance classes that this Compute Environment can launch.default IRoleThe execution Role that instances launched by this Compute Environment will use.The instance types that this Compute Environment can launch.default ILaunchTemplateThe Launch Template that this Compute Environment will use to provision EC2 Instances.default NumberThe minimum vCPUs that an environment should maintain, even if the compute environment is DISABLED.default IPlacementGroupThe EC2 placement group to associate with your compute resources.default NumberThe 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 IRoleThe service-linked role that Spot Fleet needs to launch instances on your behalf.default BooleanWhether or not to use batch's optimal instance type.Methods inherited from interface software.amazon.awscdk.services.batch.IComputeEnvironment
getComputeEnvironmentArn, getComputeEnvironmentName, getEnabled, getServiceRoleMethods inherited from interface software.amazon.awscdk.services.ec2.IConnectable
getConnectionsMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.services.batch.IManagedComputeEnvironment
getMaxvCpus, getReplaceComputeEnvironment, getSecurityGroups, getSpot, getTerminateOnUpdate, getUpdateTimeout, getUpdateToLatestImageVersion, getVpcSubnetsMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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 size. -
getInstanceTypes
The instance types that this Compute Environment can launch.Which one is chosen depends on the
AllocationStrategyused. -
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.Leave this
undefinedto allow Batch to choose the latest AMIs it supports for each instance that it launches.Default: - ECS_AL2 compatible AMI ids for non-GPU instances, ECS_AL2_NVIDIA compatible AMI ids for GPU instances
-
getInstanceRole
The execution Role that instances launched by this Compute Environment will use.Default: - a role will be created
-
getLaunchTemplate
The Launch Template that this Compute Environment will use to provision EC2 Instances.Note: if
securityGroupsis specified on both your launch template and this Compute Environment, **thesecurityGroups 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.
Default: - 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
-
addInstanceClass
Add an instance class to this compute environment.- Parameters:
instanceClass- This parameter is required.
-
addInstanceType
Add an instance type to this compute environment.- Parameters:
instanceType- This parameter is required.
-