public CreateInstanceRequest withAmiId(String amiId) {
        setAmiId(amiId);
        return this;
    }
<p>
A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating
systems. For more information, see <a
href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom
AMIs</a>.
</p>
<note>
<p>
If you specify a custom AMI, you must set <code>Os</code> to <code>Custom</code>.
</p>
</note>

@param amiId
       A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported
       operating systems. For more information, see <a
       href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom
       AMIs</a>.</p> <note>
       <p>
       If you specify a custom AMI, you must set <code>Os</code> to <code>Custom</code>.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/CreateInstanceRequest.java