|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest
public class GetMetricStatisticsRequest
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:
AmazonCloudWatch.getMetricStatistics(GetMetricStatisticsRequest)
Constructor Summary | |
---|---|
GetMetricStatisticsRequest()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
List<Dimension> |
getDimensions()
A list of dimensions describing qualities of the metric. |
Date |
getEndTime()
The time stamp to use for determining the last datapoint to return. |
String |
getMetricName()
The name of the metric. |
String |
getNamespace()
The namespace of the metric. |
Integer |
getPeriod()
The granularity, in seconds, of the returned datapoints. |
Date |
getStartTime()
The time stamp to use for determining the first datapoint to return. |
List<String> |
getStatistics()
The metric statistics to return. |
String |
getUnit()
The unit for the metric. |
int |
hashCode()
|
void |
setDimensions(Collection<Dimension> dimensions)
A list of dimensions describing qualities of the metric. |
void |
setEndTime(Date endTime)
The time stamp to use for determining the last datapoint to return. |
void |
setMetricName(String metricName)
The name of the metric. |
void |
setNamespace(String namespace)
The namespace of the metric. |
void |
setPeriod(Integer period)
The granularity, in seconds, of the returned datapoints. |
void |
setStartTime(Date startTime)
The time stamp to use for determining the first datapoint to return. |
void |
setStatistics(Collection<String> statistics)
The metric statistics to return. |
void |
setUnit(StandardUnit unit)
The unit for the metric. |
void |
setUnit(String unit)
The unit for the metric. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
GetMetricStatisticsRequest |
withDimensions(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(Date endTime)
The time stamp to use for determining the last datapoint to return. |
GetMetricStatisticsRequest |
withMetricName(String metricName)
The name of the metric. |
GetMetricStatisticsRequest |
withNamespace(String namespace)
The namespace of the metric. |
GetMetricStatisticsRequest |
withPeriod(Integer period)
The granularity, in seconds, of the returned datapoints. |
GetMetricStatisticsRequest |
withStartTime(Date startTime)
The time stamp to use for determining the first datapoint to return. |
GetMetricStatisticsRequest |
withStatistics(Collection<String> statistics)
The metric statistics to return. |
GetMetricStatisticsRequest |
withStatistics(String... statistics)
The metric statistics to return. |
GetMetricStatisticsRequest |
withUnit(StandardUnit unit)
The unit for the metric. |
GetMetricStatisticsRequest |
withUnit(String unit)
The unit for the metric. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GetMetricStatisticsRequest()
Method Detail |
---|
public String getNamespace()
Constraints:
Length: 1 - 255
Pattern: [^:].*
public void setNamespace(String namespace)
Constraints:
Length: 1 - 255
Pattern: [^:].*
namespace
- The namespace of the metric.public GetMetricStatisticsRequest withNamespace(String namespace)
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.
public String getMetricName()
Constraints:
Length: 1 - 255
public void setMetricName(String metricName)
Constraints:
Length: 1 - 255
metricName
- The name of the metric.public GetMetricStatisticsRequest withMetricName(String metricName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
metricName
- The name of the metric.
public List<Dimension> getDimensions()
Constraints:
Length: 0 - 10
public void setDimensions(Collection<Dimension> dimensions)
Constraints:
Length: 0 - 10
dimensions
- A list of dimensions describing qualities of the metric.public GetMetricStatisticsRequest withDimensions(Dimension... dimensions)
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.
public GetMetricStatisticsRequest withDimensions(Collection<Dimension> dimensions)
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.
public Date getStartTime()
public void setStartTime(Date startTime)
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. public GetMetricStatisticsRequest withStartTime(Date startTime)
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. public Date getEndTime()
public void setEndTime(Date endTime)
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.public GetMetricStatisticsRequest withEndTime(Date endTime)
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.
public Integer getPeriod()
Period
must be at least 60 seconds and must be a multiple
of 60. The default value is 60.
Constraints:
Range: 60 -
Period
must be at least 60 seconds and must be a multiple
of 60. The default value is 60.public void setPeriod(Integer period)
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.public GetMetricStatisticsRequest withPeriod(Integer period)
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.
public List<String> getStatistics()
Constraints:
Length: 1 - 5
public void setStatistics(Collection<String> statistics)
Constraints:
Length: 1 - 5
statistics
- The metric statistics to return.public GetMetricStatisticsRequest withStatistics(String... statistics)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 5
statistics
- The metric statistics to return.
public GetMetricStatisticsRequest withStatistics(Collection<String> statistics)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 5
statistics
- The metric statistics to return.
public String getUnit()
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
StandardUnit
public void setUnit(String unit)
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
public GetMetricStatisticsRequest withUnit(String unit)
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
public void setUnit(StandardUnit unit)
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
public GetMetricStatisticsRequest withUnit(StandardUnit unit)
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
public String toString()
toString
in class Object
Object.toString()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |