/** * <p> * The credit option for CPU usage of the instance. Valid values are <code>standard</code> and * <code>unlimited</code>. To change this attribute after launch, use <a>ModifyInstanceCreditSpecification</a>. For * more information, see <a * href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable * Performance Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. * </p> * <p> * Default: <code>standard</code> (T2 instances) or <code>unlimited</code> (T3 instances) * </p> * * @param creditSpecification * The credit option for CPU usage of the instance. Valid values are <code>standard</code> and * <code>unlimited</code>. To change this attribute after launch, use * <a>ModifyInstanceCreditSpecification</a>. For more information, see <a * href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable * Performance Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> * <p> * Default: <code>standard</code> (T2 instances) or <code>unlimited</code> (T3 instances) * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withCreditSpecification(CreditSpecificationRequest creditSpecification) { setCreditSpecification(creditSpecification); return this; }
/** * <p> * The credit option for CPU usage of the instance. Valid values are <code>standard</code> and * <code>unlimited</code>. To change this attribute after launch, use <a>ModifyInstanceCreditSpecification</a>. For * more information, see <a * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable * Performance Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. * </p> * <p> * Default: <code>standard</code> (T2 instances) or <code>unlimited</code> (T3 instances) * </p> * * @param creditSpecification * The credit option for CPU usage of the instance. Valid values are <code>standard</code> and * <code>unlimited</code>. To change this attribute after launch, use * <a>ModifyInstanceCreditSpecification</a>. For more information, see <a * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable * Performance Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> * <p> * Default: <code>standard</code> (T2 instances) or <code>unlimited</code> (T3 instances) * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withCreditSpecification(CreditSpecificationRequest creditSpecification) { setCreditSpecification(creditSpecification); return this; }
CreditSpecificationRequest creditRequest = new CreditSpecificationRequest(); creditRequest.setCpuCredits("unlimited"); riRequest.setCreditSpecification(creditRequest);