public ComputeEnvironmentDetail withState(String state) {
        setState(state);
        return this;
    }
<p>
The state of the compute environment. The valid values are <code>ENABLED</code> or <code>DISABLED</code>.
</p>
<p>
If the state is <code>ENABLED</code>, then the Batch scheduler can attempt to place jobs from an associated job
queue on the compute resources within the environment. If the compute environment is managed, then it can scale
its instances out or in automatically based on the job queue demand.
</p>
<p>
If the state is <code>DISABLED</code>, then the Batch scheduler doesn't attempt to place jobs within the
environment. Jobs in a <code>STARTING</code> or <code>RUNNING</code> state continue to progress normally. Managed
compute environments in the <code>DISABLED</code> state don't scale out.
</p>
<note>
<p>
Compute environments in a <code>DISABLED</code> state may continue to incur billing charges. To prevent
additional charges, turn off and then delete the compute environment. For more information, see <a href=
"https://docs.aws.amazon.com/batch/latest/userguide/compute_environment_parameters.html#compute_environment_state"
>State</a> in the <i>Batch User Guide</i>.
</p>
</note>
<p>
When an instance is idle, the instance scales down to the <code>minvCpus</code> value. However, the instance size
doesn't change. For example, consider a <code>c5.8xlarge</code> instance with a <code>minvCpus</code> value of
<code>4</code> and a <code>desiredvCpus</code> value of <code>36</code>. This instance doesn't scale down to a
<code>c5.large</code> instance.
</p>

@param state
       The state of the compute environment. The valid values are <code>ENABLED</code> or <code>DISABLED</code>
       .</p>
       <p>
       If the state is <code>ENABLED</code>, then the Batch scheduler can attempt to place jobs from an
       associated job queue on the compute resources within the environment. If the compute environment is
       managed, then it can scale its instances out or in automatically based on the job queue demand.
       </p>
       <p>
       If the state is <code>DISABLED</code>, then the Batch scheduler doesn't attempt to place jobs within the
       environment. Jobs in a <code>STARTING</code> or <code>RUNNING</code> state continue to progress normally.
       Managed compute environments in the <code>DISABLED</code> state don't scale out.
       </p>
       <note>
       <p>
       Compute environments in a <code>DISABLED</code> state may continue to incur billing charges. To prevent
       additional charges, turn off and then delete the compute environment. For more information, see <a href=
       "https://docs.aws.amazon.com/batch/latest/userguide/compute_environment_parameters.html#compute_environment_state"
       >State</a> in the <i>Batch User Guide</i>.
       </p>
       </note>
       <p>
       When an instance is idle, the instance scales down to the <code>minvCpus</code> value. However, the
       instance size doesn't change. For example, consider a <code>c5.8xlarge</code> instance with a
       <code>minvCpus</code> value of <code>4</code> and a <code>desiredvCpus</code> value of <code>36</code>.
       This instance doesn't scale down to a <code>c5.large</code> instance.
@return Returns a reference to this object so that method calls can be chained together.
@see CEState
aws-java-sdk-batch/src/main/java/com/amazonaws/services/batch/model/ComputeEnvironmentDetail.java