public Instance withEc2InstanceId(String ec2InstanceId) {
        setEc2InstanceId(ec2InstanceId);
        return this;
    }
<p>
The unique identifier of the instance in Amazon EC2.
</p>

@param ec2InstanceId
       The unique identifier of the instance in Amazon EC2.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/Instance.java