public MetricDataQuery withAccountId(String accountId) {
        setAccountId(accountId);
        return this;
    }
<p>
The ID of the account where the metrics are located.
</p>
<p>
If you are performing a <code>GetMetricData</code> operation in a monitoring account, use this to specify which
account to retrieve this metric from.
</p>
<p>
If you are performing a <code>PutMetricAlarm</code> operation, use this to specify which account contains the
metric that the alarm is watching.
</p>

@param accountId
       The ID of the account where the metrics are located.</p>
       <p>
       If you are performing a <code>GetMetricData</code> operation in a monitoring account, use this to specify
       which account to retrieve this metric from.
       </p>
       <p>
       If you are performing a <code>PutMetricAlarm</code> operation, use this to specify which account contains
       the metric that the alarm is watching.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/MetricDataQuery.java