/** * <p> * The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target * Availability Zone, Amazon EC2 launches the largest possible number of instances above <code>MinCount</code>. * </p> * <p> * Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see <a * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How many instances can I run in * Amazon EC2</a> in the Amazon EC2 FAQ. * </p> * * @param maxCount * The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the * target Availability Zone, Amazon EC2 launches the largest possible number of instances above * <code>MinCount</code>.</p> * <p> * Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see <a * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How many instances can I * run in Amazon EC2</a> in the Amazon EC2 FAQ. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withMaxCount(Integer maxCount) { setMaxCount(maxCount); return this; }
setImageId(imageId); setMinCount(minCount); setMaxCount(maxCount);
req.setMaxCount(nWorkers);
setImageId(imageId); setMinCount(minCount); setMaxCount(maxCount);
/** * <p> * The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target * Availability Zone, Amazon EC2 launches the largest possible number of instances above <code>MinCount</code>. * </p> * <p> * Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see <a * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How many instances can I run in * Amazon EC2</a> in the Amazon EC2 FAQ. * </p> * * @param maxCount * The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the * target Availability Zone, Amazon EC2 launches the largest possible number of instances above * <code>MinCount</code>.</p> * <p> * Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see <a * href="http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2">How many instances can I * run in Amazon EC2</a> in the Amazon EC2 FAQ. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withMaxCount(Integer maxCount) { setMaxCount(maxCount); return this; }
setImageId(imageId); setMinCount(minCount); setMaxCount(maxCount);
runInstancesRequest.setMaxCount( 1 ); runInstancesRequest.setKeyName( this.iaasProperties.get(Ec2Constants.SSH_KEY_NAME)); String secGroup = this.iaasProperties.get(Ec2Constants.SECURITY_GROUP_NAME);
rir.setMaxCount(1); rir.setMinCount(1); rir.setImageId(context.getAmi());
riRequest.setMaxCount(number - orphansOrStopped.size());