@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 maximum percentage that a Spot Instance price can 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.
|
LaunchTemplateSpecification |
getLaunchTemplate()
The launch template to use for your compute resources.
|
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 (even if the compute environment is
DISABLED). |
String |
getPlacementGroup()
The Amazon EC2 placement group to associate with your compute resources.
|
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 maximum percentage that a Spot Instance price can 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 |
setLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use for your compute resources.
|
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 (even if the compute environment is
DISABLED). |
void |
setPlacementGroup(String placementGroup)
The Amazon EC2 placement group to associate with your compute resources.
|
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 maximum percentage that a Spot Instance price can 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 |
withLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use for your compute resources.
|
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 (even if the compute environment is
DISABLED). |
ComputeResource |
withPlacementGroup(String placementGroup)
The Amazon EC2 placement group to associate with your compute resources.
|
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.CRTypepublic String getType()
The type of compute environment.
CRTypepublic ComputeResource withType(String type)
The type of compute environment.
type - The type of compute environment.CRTypepublic void setType(CRType type)
The type of compute environment.
type - The type of compute environment.CRTypepublic ComputeResource withType(CRType type)
The type of compute environment.
type - The type of compute environment.CRTypepublic void setMinvCpus(Integer minvCpus)
The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment is
DISABLED).
minvCpus - The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment is
DISABLED).public Integer getMinvCpus()
The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment is
DISABLED).
DISABLED).public ComputeResource withMinvCpus(Integer minvCpus)
The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment is
DISABLED).
minvCpus - The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment is
DISABLED).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 setPlacementGroup(String placementGroup)
The Amazon EC2 placement group to associate with your compute resources. If you intend to submit multi-node parallel jobs to your 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. For more information, see Placement Groups in the Amazon EC2 User Guide for Linux Instances.
placementGroup - The Amazon EC2 placement group to associate with your compute resources. If you intend to submit
multi-node parallel jobs to your 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. For more
information, see Placement Groups in
the Amazon EC2 User Guide for Linux Instances.public String getPlacementGroup()
The Amazon EC2 placement group to associate with your compute resources. If you intend to submit multi-node parallel jobs to your 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. For more information, see Placement Groups in the Amazon EC2 User Guide for Linux Instances.
public ComputeResource withPlacementGroup(String placementGroup)
The Amazon EC2 placement group to associate with your compute resources. If you intend to submit multi-node parallel jobs to your 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. For more information, see Placement Groups in the Amazon EC2 User Guide for Linux Instances.
placementGroup - The Amazon EC2 placement group to associate with your compute resources. If you intend to submit
multi-node parallel jobs to your 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. For more
information, see Placement Groups in
the Amazon EC2 User Guide for Linux Instances.public void setBidPercentage(Integer bidPercentage)
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.
bidPercentage - 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.public Integer getBidPercentage()
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.
public ComputeResource withBidPercentage(Integer bidPercentage)
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.
bidPercentage - 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.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 void setLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use for your compute resources. Any other compute resource parameters that you specify in a CreateComputeEnvironment API operation override the same parameters in the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
launchTemplate - The launch template to use for your compute resources. Any other compute resource parameters that you
specify in a CreateComputeEnvironment API operation override the same parameters in the launch
template. You must specify either the launch template ID or launch template name in the request, but not
both.public LaunchTemplateSpecification getLaunchTemplate()
The launch template to use for your compute resources. Any other compute resource parameters that you specify in a CreateComputeEnvironment API operation override the same parameters in the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
public ComputeResource withLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use for your compute resources. Any other compute resource parameters that you specify in a CreateComputeEnvironment API operation override the same parameters in the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
launchTemplate - The launch template to use for your compute resources. Any other compute resource parameters that you
specify in a CreateComputeEnvironment API operation override the same parameters in the launch
template. You must specify either the launch template ID or launch template name in the request, but not
both.public String toString()
toString in class ObjectObject.toString()public ComputeResource clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.