public MetricDataQuery withPeriod(Integer period) {
        setPeriod(period);
        return this;
    }
<p>
The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period can be as
short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at
intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution
metrics are those metrics stored by a <code>PutMetricData</code> operation that includes a
<code>StorageResolution of 1 second</code>.
</p>

@param period
       The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period
       can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that
       are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of
       60. High-resolution metrics are those metrics stored by a <code>PutMetricData</code> operation that
       includes a <code>StorageResolution of 1 second</code>.
@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