/** * <p> * The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can * launch in the target Availability Zone, Amazon EC2 launches no instances. * </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 General FAQ. * </p> * * @param minCount * The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 * can launch in the target Availability Zone, Amazon EC2 launches no instances.</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 General FAQ. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withMinCount(Integer minCount) { setMinCount(minCount); return this; }
setMinCount(minCount); setMaxCount(maxCount);
req.setMinCount(1); req.setMaxCount(nWorkers);
setMinCount(minCount); setMaxCount(maxCount);
/** * <p> * The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can * launch in the target Availability Zone, Amazon EC2 launches no instances. * </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 General FAQ. * </p> * * @param minCount * The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 * can launch in the target Availability Zone, Amazon EC2 launches no instances.</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 General FAQ. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withMinCount(Integer minCount) { setMinCount(minCount); return this; }
setMinCount(minCount); setMaxCount(maxCount);
runInstancesRequest.setMinCount( 1 ); runInstancesRequest.setMaxCount( 1 ); runInstancesRequest.setKeyName( this.iaasProperties.get(Ec2Constants.SSH_KEY_NAME));
RunInstancesRequest rir = new RunInstancesRequest(); rir.setMaxCount(1); rir.setMinCount(1); rir.setImageId(context.getAmi()); rir.setKeyName(context.getPublicKey().getName());