Module Smaws_Client_CloudWatch.GetMetricStatistics

Gets statistics for the specified metric.

The maximum number of data points returned from a single call is 1,440. If you request more than 1,440 data points, CloudWatch returns an error. To reduce the number of data points, you can narrow the specified time range and make multiple requests across adjacent time ranges, or you can increase the specified period. Data points are not returned in chronological order.

CloudWatch aggregates data points based on the length of the period that you specify. For example, if you request statistics with a one-hour period, CloudWatch aggregates all data points with time stamps that fall within each one-hour period. Therefore, the number of values aggregated by CloudWatch is larger than the number of data points returned.

CloudWatch needs raw data points to calculate percentile statistics. If you publish data using a statistic set instead, you can only retrieve percentile statistics for this data if one of the following conditions is true:

Percentile statistics are not available for metrics when any of the metric values are negative numbers.

Amazon CloudWatch retains metric data as follows:

Data points that are initially published with a shorter period are aggregated together for long-term storage. For example, if you collect data using a period of 1 minute, the data remains available for 15 days with 1-minute resolution. After 15 days, this data is still available, but is aggregated and retrievable only with a resolution of 5 minutes. After 63 days, the data is further aggregated and is available with a resolution of 1 hour.

CloudWatch started retaining 5-minute and 1-hour metric data as of July 9, 2016.

For information about metrics and dimensions supported by Amazon Web Services services, see the Amazon CloudWatch Metrics and Dimensions Reference in the Amazon CloudWatch User Guide.

val error_to_string : [ Smaws_Lib.Protocols.AwsQuery.error | `InternalServiceFault of Types.internal_service_fault | `InvalidParameterCombinationException of Types.invalid_parameter_combination_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `MissingRequiredParameterException of Types.missing_required_parameter_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.get_metric_statistics_input -> (Types.get_metric_statistics_output, [> Smaws_Lib.Protocols.AwsQuery.error | `InternalServiceFault of Types.internal_service_fault | `InvalidParameterCombinationException of Types.invalid_parameter_combination_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `MissingRequiredParameterException of Types.missing_required_parameter_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.get_metric_statistics_input -> (Types.get_metric_statistics_output Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsQuery.error | `InternalServiceFault of Types.internal_service_fault | `InvalidParameterCombinationException of Types.invalid_parameter_combination_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `MissingRequiredParameterException of Types.missing_required_parameter_exception ] * Smaws_Lib.Response.metadata) Stdlib.result