public Observation withEc2State(String ec2State) {
        setEc2State(ec2State);
        return this;
    }
<p>
The state of the instance, such as <code>STOPPING</code> or <code>TERMINATING</code>.
</p>

@param ec2State
       The state of the instance, such as <code>STOPPING</code> or <code>TERMINATING</code>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-applicationinsights/src/main/java/com/amazonaws/services/applicationinsights/model/Observation.java