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

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

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

GetMetricStatisticsRequest.setStatistics介绍

[英]The metric statistics, other than percentile. For percentile statistics, use ExtendedStatistics. When calling GetMetricStatistics, you must specify either Statistics or ExtendedStatistics, but not both.
[中]度量统计信息,而不是百分位数。对于百分比统计,请使用ExtendedStatistics。调用GetMetricStatistics时,必须指定StatisticsExtendedStatistics,但不能同时指定两者。

代码示例

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

/**
 * <p>
 * The metric statistics, other than percentile. For percentile statistics, use <code>ExtendedStatistics</code>.
 * When calling <code>GetMetricStatistics</code>, you must specify either <code>Statistics</code> or
 * <code>ExtendedStatistics</code>, but not both.
 * </p>
 * 
 * @param statistics
 *        The metric statistics, other than percentile. For percentile statistics, use
 *        <code>ExtendedStatistics</code>. When calling <code>GetMetricStatistics</code>, you must specify either
 *        <code>Statistics</code> or <code>ExtendedStatistics</code>, but not both.
 * @return Returns a reference to this object so that method calls can be chained together.
 * @see Statistic
 */
public GetMetricStatisticsRequest withStatistics(java.util.Collection<String> statistics) {
  setStatistics(statistics);
  return this;
}

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

/**
 * <p>
 * The metric statistics, other than percentile. For percentile statistics, use <code>ExtendedStatistics</code>.
 * When calling <code>GetMetricStatistics</code>, you must specify either <code>Statistics</code> or
 * <code>ExtendedStatistics</code>, but not both.
 * </p>
 * <p>
 * <b>NOTE:</b> This method appends the values to the existing list (if any). Use
 * {@link #setStatistics(java.util.Collection)} or {@link #withStatistics(java.util.Collection)} if you want to
 * override the existing values.
 * </p>
 * 
 * @param statistics
 *        The metric statistics, other than percentile. For percentile statistics, use
 *        <code>ExtendedStatistics</code>. When calling <code>GetMetricStatistics</code>, you must specify either
 *        <code>Statistics</code> or <code>ExtendedStatistics</code>, but not both.
 * @return Returns a reference to this object so that method calls can be chained together.
 * @see Statistic
 */
public GetMetricStatisticsRequest withStatistics(String... statistics) {
  if (this.statistics == null) {
    setStatistics(new com.amazonaws.internal.SdkInternalList<String>(statistics.length));
  }
  for (String ele : statistics) {
    this.statistics.add(ele);
  }
  return this;
}

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

/**
 * <p>
 * The metric statistics, other than percentile. For percentile statistics, use <code>ExtendedStatistics</code>.
 * When calling <code>GetMetricStatistics</code>, you must specify either <code>Statistics</code> or
 * <code>ExtendedStatistics</code>, but not both.
 * </p>
 * 
 * @param statistics
 *        The metric statistics, other than percentile. For percentile statistics, use
 *        <code>ExtendedStatistics</code>. When calling <code>GetMetricStatistics</code>, you must specify either
 *        <code>Statistics</code> or <code>ExtendedStatistics</code>, but not both.
 * @return Returns a reference to this object so that method calls can be chained together.
 * @see Statistic
 */
public GetMetricStatisticsRequest withStatistics(Statistic... statistics) {
  com.amazonaws.internal.SdkInternalList<String> statisticsCopy = new com.amazonaws.internal.SdkInternalList<String>(statistics.length);
  for (Statistic value : statistics) {
    statisticsCopy.add(value.toString());
  }
  if (getStatistics() == null) {
    setStatistics(statisticsCopy);
  } else {
    getStatistics().addAll(statisticsCopy);
  }
  return this;
}

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

/**
 * <p>
 * The metric statistics to return. For information about specific
 * statistics returned by GetMetricStatistics, see <a href=
 * "http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Statistic"
 * >Statistics</a> in the <i>Amazon CloudWatch Developer Guide</i>.
 * </p>
 * <p>
 * Returns a reference to this object so that method calls can be chained
 * together.
 *
 * @param statistics <p>
 *            The metric statistics to return. For information about
 *            specific statistics returned by GetMetricStatistics, see <a
 *            href=
 *            "http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Statistic"
 *            >Statistics</a> in the <i>Amazon CloudWatch Developer
 *            Guide</i>.
 *            </p>
 * @return A reference to this updated object so that method calls can be
 *         chained together.
 */
public GetMetricStatisticsRequest withStatistics(java.util.Collection<String> statistics) {
  setStatistics(statistics);
  return this;
}

代码示例来源:origin: petezybrick/awscwxls

dimensionMetric.putDistinctMetricNameStatisticName( metricNameStatisticName );
getMetricRequest.setStatistics(statistics);
getMetricRequest.setMetricName(metricName);
GetMetricStatisticsResult getMetricStatisticsResult = cwClient.getMetricStatistics(getMetricRequest);

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

request.setNamespace(rule.awsNamespace);
request.setMetricName(rule.awsMetricName);
request.setStatistics(rule.awsStatistics);
request.setExtendedStatistics(rule.awsExtendedStatistics);
request.setEndTime(startDate);

相关文章

微信公众号

最新文章

更多