com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest.setExtendedStatistics()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(75)

本文整理了Java中com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest.setExtendedStatistics()方法的一些代码示例,展示了GetMetricStatisticsRequest.setExtendedStatistics()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GetMetricStatisticsRequest.setExtendedStatistics()方法的具体详情如下:
包路径:com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest
类名称:GetMetricStatisticsRequest
方法名:setExtendedStatistics

GetMetricStatisticsRequest.setExtendedStatistics介绍

[英]The percentile statistics. Specify values between p0.0 and p100. When calling GetMetricStatistics, you must specify either Statistics or ExtendedStatistics, but not both. Percentile statistics are not available for metrics when any of the metric values are negative numbers.
[中]百分位数统计。指定p0之间的值。0和p100。调用GetMetricStatistics时,必须指定StatisticsExtendedStatistics,但不能同时指定两者。当任何度量值为负数时,百分位统计信息不可用于度量。

代码示例

代码示例来源:origin: aws/aws-sdk-java

/**
 * <p>
 * The percentile statistics. Specify values between p0.0 and p100. When calling <code>GetMetricStatistics</code>,
 * you must specify either <code>Statistics</code> or <code>ExtendedStatistics</code>, but not both. Percentile
 * statistics are not available for metrics when any of the metric values are negative numbers.
 * </p>
 * 
 * @param extendedStatistics
 *        The percentile statistics. Specify values between p0.0 and p100. When calling
 *        <code>GetMetricStatistics</code>, you must specify either <code>Statistics</code> or
 *        <code>ExtendedStatistics</code>, but not both. Percentile statistics are not available for metrics when
 *        any of the metric values are negative numbers.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public GetMetricStatisticsRequest withExtendedStatistics(java.util.Collection<String> extendedStatistics) {
  setExtendedStatistics(extendedStatistics);
  return this;
}

代码示例来源:origin: aws/aws-sdk-java

/**
 * <p>
 * The percentile statistics. Specify values between p0.0 and p100. When calling <code>GetMetricStatistics</code>,
 * you must specify either <code>Statistics</code> or <code>ExtendedStatistics</code>, but not both. Percentile
 * statistics are not available for metrics when any of the metric values are negative numbers.
 * </p>
 * <p>
 * <b>NOTE:</b> This method appends the values to the existing list (if any). Use
 * {@link #setExtendedStatistics(java.util.Collection)} or {@link #withExtendedStatistics(java.util.Collection)} if
 * you want to override the existing values.
 * </p>
 * 
 * @param extendedStatistics
 *        The percentile statistics. Specify values between p0.0 and p100. When calling
 *        <code>GetMetricStatistics</code>, you must specify either <code>Statistics</code> or
 *        <code>ExtendedStatistics</code>, but not both. Percentile statistics are not available for metrics when
 *        any of the metric values are negative numbers.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public GetMetricStatisticsRequest withExtendedStatistics(String... extendedStatistics) {
  if (this.extendedStatistics == null) {
    setExtendedStatistics(new com.amazonaws.internal.SdkInternalList<String>(extendedStatistics.length));
  }
  for (String ele : extendedStatistics) {
    this.extendedStatistics.add(ele);
  }
  return this;
}

代码示例来源:origin: prometheus/cloudwatch_exporter

request.setMetricName(rule.awsMetricName);
request.setStatistics(rule.awsStatistics);
request.setExtendedStatistics(rule.awsExtendedStatistics);
request.setEndTime(startDate);
request.setStartTime(endDate);

相关文章

微信公众号

最新文章

更多