@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ComputeResource extends Object implements Serializable, Cloneable, StructuredPojo
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 |
getImageId()
The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
|
String |
getInstanceRole()
The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.
|
List<String> |
getInstanceTypes()
The instances types that may be 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 |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
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 |
setImageId(String imageId)
The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
|
void |
setInstanceRole(String instanceRole)
The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.
|
void |
setInstanceTypes(Collection<String> instanceTypes)
The instances types that may be 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 |
withImageId(String imageId)
The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
|
ComputeResource |
withInstanceRole(String instanceRole)
The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.
|
ComputeResource |
withInstanceTypes(Collection<String> instanceTypes)
The instances types that may be launched.
|
ComputeResource |
withInstanceTypes(String... instanceTypes)
The instances types that may be 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 be launched. 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 latest C, M, and R instance families) on the fly that match the demand of your job queues.
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 latest C, M, and R instance families) on the fly that match the demand of your
job queues.public void setInstanceTypes(Collection<String> instanceTypes)
The instances types that may be launched. 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 latest C, M, and R instance families) on the fly that match the demand of your job queues.
instanceTypes
- The instances types that may be launched. 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 latest C, M, and R instance families) on the fly that match the demand of your
job queues.public ComputeResource withInstanceTypes(String... instanceTypes)
The instances types that may be launched. 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 latest C, M, and R instance families) on the fly that match the demand of your job queues.
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 be launched. 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 latest C, M, and R instance families) on the fly that match the demand of your
job queues.public ComputeResource withInstanceTypes(Collection<String> instanceTypes)
The instances types that may be launched. 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 latest C, M, and R instance families) on the fly that match the demand of your job queues.
instanceTypes
- The instances types that may be launched. 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 latest C, M, and R instance families) on the fly that match the demand of your
job queues.public void setImageId(String imageId)
The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
imageId
- The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.public String getImageId()
The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
public ComputeResource withImageId(String imageId)
The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
imageId
- The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.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 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.
instanceRole
- 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.public String getInstanceRole()
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.
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.public ComputeResource withInstanceRole(String instanceRole)
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.
instanceRole
- 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.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()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.