@Stability(value=Experimental) @Internal public static final class ComputeResources.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ComputeResources
ComputeResourcessoftware.amazon.jsii.JsiiObject.InitializationModeComputeResources.Builder, ComputeResources.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Jsii$Proxy(IVpc vpc,
AllocationStrategy allocationStrategy,
Number bidPercentage,
Map<String,String> computeResourcesTags,
Number desiredvCpus,
String ec2KeyPair,
IMachineImage image,
String instanceRole,
List<? extends InstanceType> instanceTypes,
LaunchTemplateSpecification launchTemplate,
Number maxvCpus,
Number minvCpus,
String placementGroup,
List<? extends ISecurityGroup> securityGroups,
IRole spotFleetRole,
ComputeResourceType type,
SubnetSelection vpcSubnets)
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.
|
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(Object o) |
AllocationStrategy |
getAllocationStrategy()
(experimental) The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated.
|
Number |
getBidPercentage()
(experimental) This property will be ignored if you set the environment type to ON_DEMAND.
|
Map<String,String> |
getComputeResourcesTags()
(experimental) Key-value pair tags to be applied to resources that are launched in the compute environment.
|
Number |
getDesiredvCpus()
(experimental) The desired number of EC2 vCPUS in the compute environment.
|
String |
getEc2KeyPair()
(experimental) The EC2 key pair that is used for instances launched in the compute environment.
|
IMachineImage |
getImage()
(experimental) The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
|
String |
getInstanceRole()
(experimental) The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.
|
List<InstanceType> |
getInstanceTypes()
(experimental) The types of EC2 instances that may be launched in the compute environment.
|
LaunchTemplateSpecification |
getLaunchTemplate()
(experimental) An optional launch template to associate with your compute resources.
|
Number |
getMaxvCpus()
(experimental) The maximum number of EC2 vCPUs that an environment can reach.
|
Number |
getMinvCpus()
(experimental) The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment state is DISABLED).
|
String |
getPlacementGroup()
(experimental) The Amazon EC2 placement group to associate with your compute resources.
|
List<ISecurityGroup> |
getSecurityGroups()
(experimental) The EC2 security group(s) associated with instances launched in the compute environment.
|
IRole |
getSpotFleetRole()
(experimental) This property will be ignored if you set the environment type to ON_DEMAND.
|
ComputeResourceType |
getType()
(experimental) The type of compute environment: ON_DEMAND or SPOT.
|
IVpc |
getVpc()
(experimental) The VPC network that all compute resources will be connected to.
|
SubnetSelection |
getVpcSubnets()
(experimental) The VPC subnets into which the compute resources are launched.
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitbuilderprotected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef - Reference to the JSII managed object.protected Jsii$Proxy(IVpc vpc, AllocationStrategy allocationStrategy, Number bidPercentage, Map<String,String> computeResourcesTags, Number desiredvCpus, String ec2KeyPair, IMachineImage image, String instanceRole, List<? extends InstanceType> instanceTypes, LaunchTemplateSpecification launchTemplate, Number maxvCpus, Number minvCpus, String placementGroup, List<? extends ISecurityGroup> securityGroups, IRole spotFleetRole, ComputeResourceType type, SubnetSelection vpcSubnets)
ComputeResources.Builder.public final IVpc getVpc()
ComputeResourcesgetVpc in interface ComputeResourcespublic final AllocationStrategy getAllocationStrategy()
ComputeResourcesThis 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
getAllocationStrategy in interface ComputeResourcespublic final Number getBidPercentage()
ComputeResourcesThe 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
getBidPercentage in interface ComputeResourcespublic final Map<String,String> getComputeResourcesTags()
ComputeResourcesFor 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.
getComputeResourcesTags in interface ComputeResourcespublic final Number getDesiredvCpus()
ComputeResourcesDefault: - no desired vcpu value will be used.
getDesiredvCpus in interface ComputeResourcespublic final String getEc2KeyPair()
ComputeResourcesIf no key is defined, then SSH access is not allowed to provisioned compute resources.
Default: - no SSH access will be possible.
getEc2KeyPair in interface ComputeResourcespublic final IMachineImage getImage()
ComputeResourcesDefault: - no image will be used.
getImage in interface ComputeResourcespublic final String getInstanceRole()
ComputeResourcesYou 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.
getInstanceRole in interface ComputeResourcespublic final List<InstanceType> getInstanceTypes()
ComputeResourcesYou 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
getInstanceTypes in interface ComputeResourcespublic final LaunchTemplateSpecification getLaunchTemplate()
ComputeResourcesFor more information, see README file.
Default: - no custom launch template will be used
getLaunchTemplate in interface ComputeResourcespublic final Number getMaxvCpus()
ComputeResourcesEach vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU.
Default: 256
getMaxvCpus in interface ComputeResourcespublic final Number getMinvCpus()
ComputeResourcesEach 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
getMinvCpus in interface ComputeResourcespublic final String getPlacementGroup()
ComputeResourcesDefault: - No placement group will be used.
getPlacementGroup in interface ComputeResourcespublic final List<ISecurityGroup> getSecurityGroups()
ComputeResourcesDefault: - AWS default security group.
getSecurityGroups in interface ComputeResourcespublic final IRole getSpotFleetRole()
ComputeResourcesThe 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.
getSpotFleetRole in interface ComputeResourcespublic final ComputeResourceType getType()
ComputeResourcesDefault: ON_DEMAND
getType in interface ComputeResourcespublic final SubnetSelection getVpcSubnets()
ComputeResourcesDefault: - private subnets of the supplied VPC.
getVpcSubnets in interface ComputeResources@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson in interface software.amazon.jsii.JsiiSerializableCopyright © 2021. All rights reserved.