Interface IManagedEc2EcsComputeEnvironment.Jsii$Default

All Superinterfaces:
IComputeEnvironment, IComputeEnvironment.Jsii$Default, IComputeEnvironmentRef, IComputeEnvironmentRef.Jsii$Default, IConnectable, IConnectable.Jsii$Default, software.constructs.IConstruct, software.constructs.IConstruct.Jsii$Default, software.constructs.IDependable, software.constructs.IDependable.Jsii$Default, IEnvironmentAware, IEnvironmentAware.Jsii$Default, IManagedComputeEnvironment, IManagedComputeEnvironment.Jsii$Default, IManagedEc2EcsComputeEnvironment, IResource, IResource.Jsii$Default, ITaggable, ITaggable.Jsii$Default, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
IManagedEc2EcsComputeEnvironment.Jsii$Proxy
Enclosing interface:
IManagedEc2EcsComputeEnvironment

@Internal public static interface IManagedEc2EcsComputeEnvironment.Jsii$Default extends IManagedEc2EcsComputeEnvironment, IManagedComputeEnvironment.Jsii$Default
Internal default implementation for IManagedEc2EcsComputeEnvironment.
  • Method Details

    • getInstanceClasses

      @Stability(Stable) @NotNull 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 size.

      Specified by:
      getInstanceClasses in interface IManagedEc2EcsComputeEnvironment
    • getInstanceTypes

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

      Which one is chosen depends on the AllocationStrategy used.

      Specified by:
      getInstanceTypes in interface IManagedEc2EcsComputeEnvironment
    • getAllocationStrategy

      @Stability(Stable) @Nullable default AllocationStrategy 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_PRICE_CAPACITY_OPTIMIZED` if using Spot instances.

      Specified by:
      getAllocationStrategy in interface IManagedEc2EcsComputeEnvironment
    • getImages

      @Stability(Stable) @Nullable default List<EcsMachineImage> getImages()
      Configure which AMIs this Compute Environment can launch.

      Leave this undefined to 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

      Specified by:
      getImages in interface IManagedEc2EcsComputeEnvironment
    • getInstanceRole

      @Stability(Stable) @Nullable default IRole getInstanceRole()
      The execution Role that instances launched by this Compute Environment will use.

      Default: - a role will be created

      Specified by:
      getInstanceRole in interface IManagedEc2EcsComputeEnvironment
    • getLaunchTemplate

      @Stability(Stable) @Nullable default ILaunchTemplate 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, **the securityGroups on the Compute Environment override the ones on the launch template.

      Default: no launch template

      Specified by:
      getLaunchTemplate in interface IManagedEc2EcsComputeEnvironment
    • getMinvCpus

      @Stability(Stable) @Nullable default Number getMinvCpus()
      The minimum vCPUs that an environment should maintain, even if the compute environment is DISABLED.

      Default: 0

      Specified by:
      getMinvCpus in interface IManagedEc2EcsComputeEnvironment
    • getPlacementGroup

      @Stability(Stable) @Nullable default IPlacementGroup 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

      Specified by:
      getPlacementGroup in interface IManagedEc2EcsComputeEnvironment
      See Also:
    • getSpotBidPercentage

      @Stability(Stable) @Nullable default Number 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%

      Specified by:
      getSpotBidPercentage in interface IManagedEc2EcsComputeEnvironment
    • getSpotFleetRole

      @Stability(Stable) @Nullable default IRole getSpotFleetRole()
      The service-linked role that Spot Fleet needs to launch instances on your behalf.

      Default: - a new Role will be created

      Specified by:
      getSpotFleetRole in interface IManagedEc2EcsComputeEnvironment
      See Also:
    • getUseOptimalInstanceClasses

      @Stability(Stable) @Nullable default Boolean 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

      Specified by:
      getUseOptimalInstanceClasses in interface IManagedEc2EcsComputeEnvironment
    • addInstanceClass

      @Stability(Stable) default void addInstanceClass(@NotNull InstanceClass instanceClass)
      Add an instance class to this compute environment.

      Specified by:
      addInstanceClass in interface IManagedEc2EcsComputeEnvironment
      Parameters:
      instanceClass - This parameter is required.
    • addInstanceType

      @Stability(Stable) default void addInstanceType(@NotNull InstanceType instanceType)
      Add an instance type to this compute environment.

      Specified by:
      addInstanceType in interface IManagedEc2EcsComputeEnvironment
      Parameters:
      instanceType - This parameter is required.