Class ComputeResources.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.batch.ComputeResources.Jsii$Proxy
All Implemented Interfaces:
ComputeResources, software.amazon.jsii.JsiiSerializable
Enclosing interface:
ComputeResources

@Stability(Experimental) @Internal public static final class ComputeResources.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ComputeResources
An implementation for ComputeResources
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.batch.ComputeResources

    ComputeResources.Builder, ComputeResources.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor that initializes the object based on literal property values passed by the ComputeResources.Builder.
    protected
    Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
    Constructor that initializes the object based on values retrieved from the JsiiObject.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JsonNode
     
    final boolean
     
    (experimental) The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated.
    final Number
    (experimental) This property will be ignored if you set the environment type to ON_DEMAND.
    (experimental) Key-value pair tags to be applied to resources that are launched in the compute environment.
    final Number
    (experimental) The desired number of EC2 vCPUS in the compute environment.
    final String
    (experimental) The EC2 key pair that is used for instances launched in the compute environment.
    (experimental) The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
    final String
    (experimental) The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.
    (experimental) The types of EC2 instances that may be launched in the compute environment.
    (experimental) An optional launch template to associate with your compute resources.
    final Number
    (experimental) The maximum number of EC2 vCPUs that an environment can reach.
    final Number
    (experimental) The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment state is DISABLED).
    final String
    (experimental) The Amazon EC2 placement group to associate with your compute resources.
    (experimental) The EC2 security group(s) associated with instances launched in the compute environment.
    final IRole
    (experimental) This property will be ignored if you set the environment type to ON_DEMAND.
    (experimental) The type of compute environment: ON_DEMAND, SPOT, FARGATE, or FARGATE_SPOT.
    final IVpc
    (experimental) The VPC network that all compute resources will be connected to.
    (experimental) The VPC subnets into which the compute resources are launched.
    final int
     

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
      Constructor that initializes the object based on values retrieved from the JsiiObject.
      Parameters:
      objRef - Reference to the JSII managed object.
    • Jsii$Proxy

      protected Jsii$Proxy(ComputeResources.Builder builder)
      Constructor that initializes the object based on literal property values passed by the ComputeResources.Builder.
  • Method Details

    • getVpc

      public final IVpc getVpc()
      Description copied from interface: ComputeResources
      (experimental) The VPC network that all compute resources will be connected to.
      Specified by:
      getVpc in interface ComputeResources
    • getAllocationStrategy

      public final AllocationStrategy getAllocationStrategy()
      Description copied from interface: ComputeResources
      (experimental) The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated.

      This could be due to availability of the instance type in the region or Amazon EC2 service limits. If this is not specified, the default for the EC2 ComputeResourceType is BEST_FIT, which will use only the best fitting instance type, waiting for additional capacity if it's not available. This allocation strategy keeps costs lower but can limit scaling. If you are using Spot Fleets with BEST_FIT then the Spot Fleet IAM Role must be specified. BEST_FIT_PROGRESSIVE will select an additional instance type that is large enough to meet the requirements of the jobs in the queue, with a preference for an instance type with a lower cost. The default value for the SPOT instance type is SPOT_CAPACITY_OPTIMIZED, which is only available for for this type of compute resources and will select an additional instance type that is large enough to meet the requirements of the jobs in the queue, with a preference for an instance type that is less likely to be interrupted.

      Default: AllocationStrategy.BEST_FIT

      Specified by:
      getAllocationStrategy in interface ComputeResources
    • getBidPercentage

      public final Number getBidPercentage()
      Description copied from interface: ComputeResources
      (experimental) This property will be ignored if you set the environment type to ON_DEMAND.

      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%, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. You always pay the lowest (market) price and never more than your maximum percentage. If you leave this field empty, the default value is 100% of the On-Demand price.

      Default: 100

      Specified by:
      getBidPercentage in interface ComputeResources
    • getComputeResourcesTags

      public final Map<String,String> getComputeResourcesTags()
      Description copied from interface: ComputeResources
      (experimental) Key-value pair tags to be applied to resources that are launched in the compute environment.

      For AWS Batch, these take the form of "String1": "String2", where String1 is the tag key and String2 is the tag value—for example, { "Name": "AWS Batch Instance - C4OnDemand" }.

      Default: - no tags will be assigned on compute resources.

      Specified by:
      getComputeResourcesTags in interface ComputeResources
    • getDesiredvCpus

      public final Number getDesiredvCpus()
      Description copied from interface: ComputeResources
      (experimental) The desired number of EC2 vCPUS in the compute environment.

      Default: - no desired vcpu value will be used.

      Specified by:
      getDesiredvCpus in interface ComputeResources
    • getEc2KeyPair

      public final String getEc2KeyPair()
      Description copied from interface: ComputeResources
      (experimental) The EC2 key pair that is used for instances launched in the compute environment.

      If no key is defined, then SSH access is not allowed to provisioned compute resources.

      Default: - no SSH access will be possible.

      Specified by:
      getEc2KeyPair in interface ComputeResources
    • getImage

      public final IMachineImage getImage()
      Description copied from interface: ComputeResources
      (experimental) The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.

      Default: - no image will be used.

      Specified by:
      getImage in interface ComputeResources
    • getInstanceRole

      public final String getInstanceRole()
      Description copied from interface: ComputeResources
      (experimental) The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.

      You can specify the short name or full Amazon Resource Name (ARN) of an instance profile. For example, ecsInstanceRole or arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole . For more information, see Amazon ECS Instance Role in the AWS Batch User Guide.

      Default: - a new role will be created.

      Specified by:
      getInstanceRole in interface ComputeResources
    • getInstanceTypes

      public final List<InstanceType> getInstanceTypes()
      Description copied from interface: ComputeResources
      (experimental) The types of EC2 instances that may be launched in the compute environment.

      You can specify instance families to launch any instance type within those families (for example, c4 or p3), or you can specify specific sizes within a family (such as c4.8xlarge). You can also choose optimal to pick instance types (from the C, M, and R instance families) on the fly that match the demand of your job queues.

      Default: optimal

      Specified by:
      getInstanceTypes in interface ComputeResources
    • getLaunchTemplate

      public final LaunchTemplateSpecification getLaunchTemplate()
      Description copied from interface: ComputeResources
      (experimental) An optional launch template to associate with your compute resources.

      For more information, see README file.

      Default: - no custom launch template will be used

      Specified by:
      getLaunchTemplate in interface ComputeResources
    • getMaxvCpus

      public final Number getMaxvCpus()
      Description copied from interface: ComputeResources
      (experimental) The maximum number of EC2 vCPUs that an environment can reach.

      Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU.

      Default: 256

      Specified by:
      getMaxvCpus in interface ComputeResources
    • getMinvCpus

      public final Number getMinvCpus()
      Description copied from interface: ComputeResources
      (experimental) The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment state is DISABLED).

      Each vCPU is equivalent to 1,024 CPU shares. By keeping this set to 0 you will not have instance time wasted when there is no work to be run. If you set this above zero you will maintain that number of vCPUs at all times.

      Default: 0

      Specified by:
      getMinvCpus in interface ComputeResources
    • getPlacementGroup

      public final String getPlacementGroup()
      Description copied from interface: ComputeResources
      (experimental) The Amazon EC2 placement group to associate with your compute resources.

      Default: - No placement group will be used.

      Specified by:
      getPlacementGroup in interface ComputeResources
    • getSecurityGroups

      public final List<ISecurityGroup> getSecurityGroups()
      Description copied from interface: ComputeResources
      (experimental) The EC2 security group(s) associated with instances launched in the compute environment.

      Default: - AWS default security group.

      Specified by:
      getSecurityGroups in interface ComputeResources
    • getSpotFleetRole

      public final IRole getSpotFleetRole()
      Description copied from interface: ComputeResources
      (experimental) This property will be ignored if you set the environment type to ON_DEMAND.

      The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment. For more information, see Amazon EC2 Spot Fleet Role in the AWS Batch User Guide.

      Default: - no fleet role will be used.

      Specified by:
      getSpotFleetRole in interface ComputeResources
    • getType

      public final ComputeResourceType getType()
      Description copied from interface: ComputeResources
      (experimental) The type of compute environment: ON_DEMAND, SPOT, FARGATE, or FARGATE_SPOT.

      Default: ON_DEMAND

      Specified by:
      getType in interface ComputeResources
    • getVpcSubnets

      public final SubnetSelection getVpcSubnets()
      Description copied from interface: ComputeResources
      (experimental) The VPC subnets into which the compute resources are launched.

      Default: - private subnets of the supplied VPC.

      Specified by:
      getVpcSubnets in interface ComputeResources
    • $jsii$toJson

      @Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
      Specified by:
      $jsii$toJson in interface software.amazon.jsii.JsiiSerializable
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object