public CreateInstanceRequest withSubnetId(String subnetId) {
        setSubnetId(subnetId);
        return this;
    }
<p>
The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override the
stack's default subnet ID value and direct OpsWorks Stacks to launch the instance in a different subnet.
</p>

@param subnetId
       The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override
       the stack's default subnet ID value and direct OpsWorks Stacks to launch the instance in a different
       subnet.
@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