public AllocateHostsRequest withAutoPlacement(AutoPlacement autoPlacement) {
        this.autoPlacement = autoPlacement.toString();
        return this;
    }
<p>
Indicates whether the host accepts any untargeted instance launches that match its instance type configuration,
or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see
<a href=
"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding"
> Understanding auto-placement and affinity</a> in the <i>Amazon EC2 User Guide</i>.
</p>
<p>
Default: <code>off</code>
</p>

@param autoPlacement
       Indicates whether the host accepts any untargeted instance launches that match its instance type
       configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For
       more information, see <a href=
       "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding"
       > Understanding auto-placement and affinity</a> in the <i>Amazon EC2 User Guide</i>.</p>
       <p>
       Default: <code>off</code>
@return Returns a reference to this object so that method calls can be chained together.
@see AutoPlacement
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/AllocateHostsRequest.java