public class ComputeResource extends Object implements Serializable, Cloneable
An object representing an AWS Batch compute resource.
Constructor and Description |
---|
ComputeResource() |
Modifier and Type | Method and Description |
---|---|
ComputeResource |
addTagsEntry(String key,
String value) |
ComputeResource |
clearTagsEntries()
Removes all the entries added into Tags.
|
ComputeResource |
clone() |
boolean |
equals(Object obj) |
Integer |
getBidPercentage()
The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that
instance type before instances are launched.
|
Integer |
getDesiredvCpus()
The desired number of EC2 vCPUS in the compute environment.
|
String |
getEc2KeyPair()
The EC2 key pair that is used for instances launched in the compute environment.
|
String |
getInstanceRole()
The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment.
|
List<String> |
getInstanceTypes()
The instances types that may launched.
|
Integer |
getMaxvCpus()
The maximum number of EC2 vCPUs that an environment can reach.
|
Integer |
getMinvCpus()
The minimum number of EC2 vCPUs that an environment should maintain.
|
List<String> |
getSecurityGroupIds()
The EC2 security group that is associated with instances launched in the compute environment.
|
String |
getSpotIamFleetRole()
The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a
SPOT compute
environment. |
List<String> |
getSubnets()
The VPC subnets into which the compute resources are launched.
|
Map<String,String> |
getTags()
Key-value pair tags to be applied to resources that are launched in the compute environment.
|
String |
getType()
The type of compute environment.
|
int |
hashCode() |
void |
setBidPercentage(Integer bidPercentage)
The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that
instance type before instances are launched.
|
void |
setDesiredvCpus(Integer desiredvCpus)
The desired number of EC2 vCPUS in the compute environment.
|
void |
setEc2KeyPair(String ec2KeyPair)
The EC2 key pair that is used for instances launched in the compute environment.
|
void |
setInstanceRole(String instanceRole)
The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment.
|
void |
setInstanceTypes(Collection<String> instanceTypes)
The instances types that may launched.
|
void |
setMaxvCpus(Integer maxvCpus)
The maximum number of EC2 vCPUs that an environment can reach.
|
void |
setMinvCpus(Integer minvCpus)
The minimum number of EC2 vCPUs that an environment should maintain.
|
void |
setSecurityGroupIds(Collection<String> securityGroupIds)
The EC2 security group that is associated with instances launched in the compute environment.
|
void |
setSpotIamFleetRole(String spotIamFleetRole)
The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a
SPOT compute
environment. |
void |
setSubnets(Collection<String> subnets)
The VPC subnets into which the compute resources are launched.
|
void |
setTags(Map<String,String> tags)
Key-value pair tags to be applied to resources that are launched in the compute environment.
|
void |
setType(CRType type)
The type of compute environment.
|
void |
setType(String type)
The type of compute environment.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
ComputeResource |
withBidPercentage(Integer bidPercentage)
The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that
instance type before instances are launched.
|
ComputeResource |
withDesiredvCpus(Integer desiredvCpus)
The desired number of EC2 vCPUS in the compute environment.
|
ComputeResource |
withEc2KeyPair(String ec2KeyPair)
The EC2 key pair that is used for instances launched in the compute environment.
|
ComputeResource |
withInstanceRole(String instanceRole)
The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment.
|
ComputeResource |
withInstanceTypes(Collection<String> instanceTypes)
The instances types that may launched.
|
ComputeResource |
withInstanceTypes(String... instanceTypes)
The instances types that may launched.
|
ComputeResource |
withMaxvCpus(Integer maxvCpus)
The maximum number of EC2 vCPUs that an environment can reach.
|
ComputeResource |
withMinvCpus(Integer minvCpus)
The minimum number of EC2 vCPUs that an environment should maintain.
|
ComputeResource |
withSecurityGroupIds(Collection<String> securityGroupIds)
The EC2 security group that is associated with instances launched in the compute environment.
|
ComputeResource |
withSecurityGroupIds(String... securityGroupIds)
The EC2 security group that is associated with instances launched in the compute environment.
|
ComputeResource |
withSpotIamFleetRole(String spotIamFleetRole)
The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a
SPOT compute
environment. |
ComputeResource |
withSubnets(Collection<String> subnets)
The VPC subnets into which the compute resources are launched.
|
ComputeResource |
withSubnets(String... subnets)
The VPC subnets into which the compute resources are launched.
|
ComputeResource |
withTags(Map<String,String> tags)
Key-value pair tags to be applied to resources that are launched in the compute environment.
|
ComputeResource |
withType(CRType type)
The type of compute environment.
|
ComputeResource |
withType(String type)
The type of compute environment.
|
public void setType(String type)
The type of compute environment.
type
- The type of compute environment.CRType
public String getType()
The type of compute environment.
CRType
public ComputeResource withType(String type)
The type of compute environment.
type
- The type of compute environment.CRType
public void setType(CRType type)
The type of compute environment.
type
- The type of compute environment.CRType
public ComputeResource withType(CRType type)
The type of compute environment.
type
- The type of compute environment.CRType
public void setMinvCpus(Integer minvCpus)
The minimum number of EC2 vCPUs that an environment should maintain.
minvCpus
- The minimum number of EC2 vCPUs that an environment should maintain.public Integer getMinvCpus()
The minimum number of EC2 vCPUs that an environment should maintain.
public ComputeResource withMinvCpus(Integer minvCpus)
The minimum number of EC2 vCPUs that an environment should maintain.
minvCpus
- The minimum number of EC2 vCPUs that an environment should maintain.public void setMaxvCpus(Integer maxvCpus)
The maximum number of EC2 vCPUs that an environment can reach.
maxvCpus
- The maximum number of EC2 vCPUs that an environment can reach.public Integer getMaxvCpus()
The maximum number of EC2 vCPUs that an environment can reach.
public ComputeResource withMaxvCpus(Integer maxvCpus)
The maximum number of EC2 vCPUs that an environment can reach.
maxvCpus
- The maximum number of EC2 vCPUs that an environment can reach.public void setDesiredvCpus(Integer desiredvCpus)
The desired number of EC2 vCPUS in the compute environment.
desiredvCpus
- The desired number of EC2 vCPUS in the compute environment.public Integer getDesiredvCpus()
The desired number of EC2 vCPUS in the compute environment.
public ComputeResource withDesiredvCpus(Integer desiredvCpus)
The desired number of EC2 vCPUS in the compute environment.
desiredvCpus
- The desired number of EC2 vCPUS in the compute environment.public List<String> getInstanceTypes()
The instances types that may launched.
public void setInstanceTypes(Collection<String> instanceTypes)
The instances types that may launched.
instanceTypes
- The instances types that may launched.public ComputeResource withInstanceTypes(String... instanceTypes)
The instances types that may launched.
NOTE: This method appends the values to the existing list (if any). Use
setInstanceTypes(java.util.Collection)
or withInstanceTypes(java.util.Collection)
if you want
to override the existing values.
instanceTypes
- The instances types that may launched.public ComputeResource withInstanceTypes(Collection<String> instanceTypes)
The instances types that may launched.
instanceTypes
- The instances types that may launched.public List<String> getSubnets()
The VPC subnets into which the compute resources are launched.
public void setSubnets(Collection<String> subnets)
The VPC subnets into which the compute resources are launched.
subnets
- The VPC subnets into which the compute resources are launched.public ComputeResource withSubnets(String... subnets)
The VPC subnets into which the compute resources are launched.
NOTE: This method appends the values to the existing list (if any). Use
setSubnets(java.util.Collection)
or withSubnets(java.util.Collection)
if you want to override
the existing values.
subnets
- The VPC subnets into which the compute resources are launched.public ComputeResource withSubnets(Collection<String> subnets)
The VPC subnets into which the compute resources are launched.
subnets
- The VPC subnets into which the compute resources are launched.public List<String> getSecurityGroupIds()
The EC2 security group that is associated with instances launched in the compute environment.
public void setSecurityGroupIds(Collection<String> securityGroupIds)
The EC2 security group that is associated with instances launched in the compute environment.
securityGroupIds
- The EC2 security group that is associated with instances launched in the compute environment.public ComputeResource withSecurityGroupIds(String... securityGroupIds)
The EC2 security group that is associated with instances launched in the compute environment.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroupIds(java.util.Collection)
or withSecurityGroupIds(java.util.Collection)
if you
want to override the existing values.
securityGroupIds
- The EC2 security group that is associated with instances launched in the compute environment.public ComputeResource withSecurityGroupIds(Collection<String> securityGroupIds)
The EC2 security group that is associated with instances launched in the compute environment.
securityGroupIds
- The EC2 security group that is associated with instances launched in the compute environment.public void setEc2KeyPair(String ec2KeyPair)
The EC2 key pair that is used for instances launched in the compute environment.
ec2KeyPair
- The EC2 key pair that is used for instances launched in the compute environment.public String getEc2KeyPair()
The EC2 key pair that is used for instances launched in the compute environment.
public ComputeResource withEc2KeyPair(String ec2KeyPair)
The EC2 key pair that is used for instances launched in the compute environment.
ec2KeyPair
- The EC2 key pair that is used for instances launched in the compute environment.public void setInstanceRole(String instanceRole)
The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment.
instanceRole
- The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment.public String getInstanceRole()
The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment.
public ComputeResource withInstanceRole(String instanceRole)
The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment.
instanceRole
- The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment.public Map<String,String> getTags()
Key-value pair tags to be applied to resources that are launched in the compute environment.
public void setTags(Map<String,String> tags)
Key-value pair tags to be applied to resources that are launched in the compute environment.
tags
- Key-value pair tags to be applied to resources that are launched in the compute environment.public ComputeResource withTags(Map<String,String> tags)
Key-value pair tags to be applied to resources that are launched in the compute environment.
tags
- Key-value pair tags to be applied to resources that are launched in the compute environment.public ComputeResource addTagsEntry(String key, String value)
public ComputeResource clearTagsEntries()
public void setBidPercentage(Integer bidPercentage)
The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance.
bidPercentage
- The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that
instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot
price must be below 20% of the current On-Demand price for that EC2 instance.public Integer getBidPercentage()
The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance.
public ComputeResource withBidPercentage(Integer bidPercentage)
The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance.
bidPercentage
- The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that
instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot
price must be below 20% of the current On-Demand price for that EC2 instance.public void setSpotIamFleetRole(String spotIamFleetRole)
The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT
compute
environment.
spotIamFleetRole
- The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT
compute environment.public String getSpotIamFleetRole()
The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT
compute
environment.
SPOT
compute environment.public ComputeResource withSpotIamFleetRole(String spotIamFleetRole)
The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT
compute
environment.
spotIamFleetRole
- The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT
compute environment.public String toString()
toString
in class Object
Object.toString()
public ComputeResource clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.