com.amazonaws.services.cloudwatch.model

## クラス GetMetricStatisticsRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest

- すべての実装されたインタフェース:
    java.io.Serializable

      public class GetMetricStatisticsRequest
      extends AmazonWebServiceRequest
      implements java.io.Serializable

  Container for the parameters to the `GetMetricStatistics operation`.

  Gets statistics for the specified metric.

  NOTE: The maximum number of data points returned from a single GetMetricStatistics request is 1,440. If a request is made that generates more than 1,440 data points, Amazon CloudWatch returns an error. In such a case, alter the request by narrowing the specified time range or increasing the specified period. Alternatively, make multiple requests across adjacent time ranges.

  Amazon CloudWatch aggregates data points based on the length of the `period` that you specify. For example, if you request statistics with a one-minute granularity, Amazon CloudWatch aggregates data points with time stamps that fall within the same one-minute period. In such a case, the data points queried can greatly outnumber the data points returned.

  NOTE: The maximum number of data points that can be queried is 50,850; whereas the maximum number of data points returned is 1,440.

  The following examples show various statistics allowed by the data point query maximum of 50,850 when you call `GetMetricStatistics` on Amazon EC2 instances with detailed (one-minute) monitoring enabled:

  - Statistics for up to 400 instances for a span of one hour
  - Statistics for up to 35 instances over a span of 24 hours
  - Statistics for up to 2 instances over a span of 2 weeks
  関連項目:
    `AmazonCloudWatch.getMetricStatistics(GetMetricStatisticsRequest)`, 直列化された形式

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `GetMetricStatisticsRequest()`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.util.List<Dimension>` | `getDimensions()` A list of dimensions describing qualities of the metric.
    `java.util.Date` | `getEndTime()` The time stamp to use for determining the last datapoint to return.
    `java.lang.String` | `getMetricName()` The name of the metric.
    `java.lang.String` | `getNamespace()` The namespace of the metric.
    `java.lang.Integer` | `getPeriod()` The granularity, in seconds, of the returned datapoints.
    `java.util.Date` | `getStartTime()` The time stamp to use for determining the first datapoint to return.
    `java.util.List<java.lang.String>` | `getStatistics()` The metric statistics to return.
    `java.lang.String` | `getUnit()` The unit for the metric.
    `int` | `hashCode()`
    `void` | `setDimensions(java.util.Collection<Dimension> dimensions)` A list of dimensions describing qualities of the metric.
    `void` | `setEndTime(java.util.Date endTime)` The time stamp to use for determining the last datapoint to return.
    `void` | `setMetricName(java.lang.String metricName)` The name of the metric.
    `void` | `setNamespace(java.lang.String namespace)` The namespace of the metric.
    `void` | `setPeriod(java.lang.Integer period)` The granularity, in seconds, of the returned datapoints.
    `void` | `setStartTime(java.util.Date startTime)` The time stamp to use for determining the first datapoint to return.
    `void` | `setStatistics(java.util.Collection<java.lang.String> statistics)` The metric statistics to return.
    `void` | `setUnit(StandardUnit unit)` The unit for the metric.
    `void` | `setUnit(java.lang.String unit)` The unit for the metric.
    `java.lang.String` | `toString()` Returns a string representation of this object; useful for testing and debugging.
    `GetMetricStatisticsRequest` | `withDimensions(java.util.Collection<Dimension> dimensions)` A list of dimensions describing qualities of the metric.
    `GetMetricStatisticsRequest` | `withDimensions(Dimension... dimensions)` A list of dimensions describing qualities of the metric.
    `GetMetricStatisticsRequest` | `withEndTime(java.util.Date endTime)` The time stamp to use for determining the last datapoint to return.
    `GetMetricStatisticsRequest` | `withMetricName(java.lang.String metricName)` The name of the metric.
    `GetMetricStatisticsRequest` | `withNamespace(java.lang.String namespace)` The namespace of the metric.
    `GetMetricStatisticsRequest` | `withPeriod(java.lang.Integer period)` The granularity, in seconds, of the returned datapoints.
    `GetMetricStatisticsRequest` | `withStartTime(java.util.Date startTime)` The time stamp to use for determining the first datapoint to return.
    `GetMetricStatisticsRequest` | `withStatistics(java.util.Collection<java.lang.String> statistics)` The metric statistics to return.
    `GetMetricStatisticsRequest` | `withStatistics(java.lang.String... statistics)` The metric statistics to return.
    `GetMetricStatisticsRequest` | `withUnit(StandardUnit unit)` The unit for the metric.
    `GetMetricStatisticsRequest` | `withUnit(java.lang.String unit)` The unit for the metric.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### GetMetricStatisticsRequest

          public GetMetricStatisticsRequest()

  - ### メソッドの詳細

    - #### getNamespace

          public java.lang.String getNamespace()

      The namespace of the metric.

      Constraints:
      Length: 1 - 255
      Pattern: [^:].*

      戻り値:
        The namespace of the metric.

    - #### setNamespace

          public void setNamespace(java.lang.String namespace)

      The namespace of the metric.

      Constraints:
      Length: 1 - 255
      Pattern: [^:].*

      パラメータ:
        `namespace` - The namespace of the metric.

    - #### withNamespace

          public GetMetricStatisticsRequest withNamespace(java.lang.String namespace)

      The namespace of the metric.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Length: 1 - 255
      Pattern: [^:].*

      パラメータ:
        `namespace` - The namespace of the metric.

    - #### getMetricName

          public java.lang.String getMetricName()

      The name of the metric.

      Constraints:
      Length: 1 - 255

      戻り値:
        The name of the metric.

    - #### setMetricName

          public void setMetricName(java.lang.String metricName)

      The name of the metric.

      Constraints:
      Length: 1 - 255

      パラメータ:
        `metricName` - The name of the metric.

    - #### withMetricName

          public GetMetricStatisticsRequest withMetricName(java.lang.String metricName)

      The name of the metric.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Length: 1 - 255

      パラメータ:
        `metricName` - The name of the metric.

    - #### getDimensions

          public java.util.List<Dimension> getDimensions()

      A list of dimensions describing qualities of the metric.

      Constraints:
      Length: 0 - 10

      戻り値:
        A list of dimensions describing qualities of the metric.

    - #### setDimensions

          public void setDimensions(java.util.Collection<Dimension> dimensions)

      A list of dimensions describing qualities of the metric.

      Constraints:
      Length: 0 - 10

      パラメータ:
        `dimensions` - A list of dimensions describing qualities of the metric.

    - #### withDimensions

          public GetMetricStatisticsRequest withDimensions(Dimension... dimensions)

      A list of dimensions describing qualities of the metric.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Length: 0 - 10

      パラメータ:
        `dimensions` - A list of dimensions describing qualities of the metric.

    - #### withDimensions

          public GetMetricStatisticsRequest withDimensions(java.util.Collection<Dimension> dimensions)

      A list of dimensions describing qualities of the metric.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Length: 0 - 10

      パラメータ:
        `dimensions` - A list of dimensions describing qualities of the metric.

    - #### getStartTime

          public java.util.Date getStartTime()

      The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks.
      戻り値:
        The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks.

    - #### setStartTime

          public void setStartTime(java.util.Date startTime)

      The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks.
      パラメータ:
        `startTime` - The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks.

    - #### withStartTime

          public GetMetricStatisticsRequest withStartTime(java.util.Date startTime)

      The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `startTime` - The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks.

    - #### getEndTime

          public java.util.Date getEndTime()

      The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified.
      戻り値:
        The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified.

    - #### setEndTime

          public void setEndTime(java.util.Date endTime)

      The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified.
      パラメータ:
        `endTime` - The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified.

    - #### withEndTime

          public GetMetricStatisticsRequest withEndTime(java.util.Date endTime)

      The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `endTime` - The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified.

    - #### getPeriod

          public java.lang.Integer getPeriod()

      The granularity, in seconds, of the returned datapoints. `Period` must be at least 60 seconds and must be a multiple of 60. The default value is 60.

      Constraints:
      Range: 60 -

      戻り値:
        The granularity, in seconds, of the returned datapoints. `Period` must be at least 60 seconds and must be a multiple of 60. The default value is 60.

    - #### setPeriod

          public void setPeriod(java.lang.Integer period)

      The granularity, in seconds, of the returned datapoints. `Period` must be at least 60 seconds and must be a multiple of 60. The default value is 60.

      Constraints:
      Range: 60 -

      パラメータ:
        `period` - The granularity, in seconds, of the returned datapoints. `Period` must be at least 60 seconds and must be a multiple of 60. The default value is 60.

    - #### withPeriod

          public GetMetricStatisticsRequest withPeriod(java.lang.Integer period)

      The granularity, in seconds, of the returned datapoints. `Period` must be at least 60 seconds and must be a multiple of 60. The default value is 60.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Range: 60 -

      パラメータ:
        `period` - The granularity, in seconds, of the returned datapoints. `Period` must be at least 60 seconds and must be a multiple of 60. The default value is 60.

    - #### getStatistics

          public java.util.List<java.lang.String> getStatistics()

      The metric statistics to return.

      Constraints:
      Length: 1 - 5

      戻り値:
        The metric statistics to return.

    - #### setStatistics

          public void setStatistics(java.util.Collection<java.lang.String> statistics)

      The metric statistics to return.

      Constraints:
      Length: 1 - 5

      パラメータ:
        `statistics` - The metric statistics to return.

    - #### withStatistics

          public GetMetricStatisticsRequest withStatistics(java.lang.String... statistics)

      The metric statistics to return.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Length: 1 - 5

      パラメータ:
        `statistics` - The metric statistics to return.

    - #### withStatistics

          public GetMetricStatisticsRequest withStatistics(java.util.Collection<java.lang.String> statistics)

      The metric statistics to return.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Length: 1 - 5

      パラメータ:
        `statistics` - The metric statistics to return.

    - #### getUnit

          public java.lang.String getUnit()

      The unit for the metric.

      Constraints:
      Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None

      戻り値:
        The unit for the metric.
      関連項目:
        `StandardUnit`

    - #### setUnit

          public void setUnit(java.lang.String unit)

      The unit for the metric.

      Constraints:
      Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None

      パラメータ:
        `unit` - The unit for the metric.
      関連項目:
        `StandardUnit`

    - #### withUnit

          public GetMetricStatisticsRequest withUnit(java.lang.String unit)

      The unit for the metric.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None

      パラメータ:
        `unit` - The unit for the metric.
      関連項目:
        `StandardUnit`

    - #### setUnit

          public void setUnit(StandardUnit unit)

      The unit for the metric.

      Constraints:
      Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None

      パラメータ:
        `unit` - The unit for the metric.
      関連項目:
        `StandardUnit`

    - #### withUnit

          public GetMetricStatisticsRequest withUnit(StandardUnit unit)

      The unit for the metric.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None

      パラメータ:
        `unit` - The unit for the metric.
      関連項目:
        `StandardUnit`

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object; useful for testing and debugging.
      オーバーライド:
        `toString` クラス内 `java.lang.Object`
      戻り値:
        A string representation of this object.
      関連項目:
        `Object.toString()`

    - #### hashCode

          public int hashCode()

      オーバーライド:
        `hashCode` クラス内 `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      オーバーライド:
        `equals` クラス内 `java.lang.Object`