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

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

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

GetMetricStatisticsRequest.getPeriod介绍

[英]The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a PutMetricData call that includes a StorageResolution of 1 second.

If the StartTime parameter specifies a time stamp that is greater than 3 hours ago, you must specify the period as follows or no data points in that time range is returned:

  • Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds (1 minute).
  • Start time between 15 and 63 days ago - Use a multiple of 300 seconds (5 minutes).
  • Start time greater than 63 days ago - Use a multiple of 3600 seconds (1 hour).
    [中]返回的数据点的粒度(以秒为单位)。对于具有常规分辨率的度量,周期可以短至一分钟(60秒),并且必须是60的倍数。对于以少于一分钟的间隔收集的高分辨率度量,周期可以是1、5、10、30、60或60的任意倍数。高分辨率指标是由PutMetricData调用存储的指标,该调用包括1秒的StorageResolution
    如果StartTime参数指定的时间戳大于3小时前,则必须按以下方式指定时间段,否则将不返回该时间范围内的数据点:
    *开始时间在3小时到15天前-使用60秒(1分钟)的倍数。
    *开始时间在15到63天前-使用300秒(5分钟)的倍数。
    *开始时间大于63天前-使用3600秒(1小时)的倍数。

代码示例

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

if (getEndTime() != null)
  sb.append("EndTime: ").append(getEndTime()).append(",");
if (getPeriod() != null)
  sb.append("Period: ").append(getPeriod()).append(",");
if (getStatistics() != null)
  sb.append("Statistics: ").append(getStatistics()).append(",");

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

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode());
  hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode());
  hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode());
  hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
  hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
  hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode());
  hashCode = prime * hashCode + ((getStatistics() == null) ? 0 : getStatistics().hashCode());
  hashCode = prime * hashCode + ((getExtendedStatistics() == null) ? 0 : getExtendedStatistics().hashCode());
  hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode());
  return hashCode;
}

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

if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
  return false;
if (other.getPeriod() == null ^ this.getPeriod() == null)
  return false;
if (other.getPeriod() != null && other.getPeriod().equals(this.getPeriod()) == false)
  return false;
if (other.getStatistics() == null ^ this.getStatistics() == null)

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

if (getMetricStatisticsRequest.getPeriod() != null) {
  request.addParameter("Period", StringUtils.fromInteger(getMetricStatisticsRequest.getPeriod()));

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

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode());
  hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode());
  hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode());
  hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
  hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
  hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode());
  hashCode = prime * hashCode + ((getStatistics() == null) ? 0 : getStatistics().hashCode());
  hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode());
  return hashCode;
}

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

/**
 * Returns a string representation of this object; useful for testing and
 * debugging.
 *
 * @return A string representation of this object.
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append("{");
  if (getNamespace() != null)
    sb.append("Namespace: " + getNamespace() + ",");
  if (getMetricName() != null)
    sb.append("MetricName: " + getMetricName() + ",");
  if (getDimensions() != null)
    sb.append("Dimensions: " + getDimensions() + ",");
  if (getStartTime() != null)
    sb.append("StartTime: " + getStartTime() + ",");
  if (getEndTime() != null)
    sb.append("EndTime: " + getEndTime() + ",");
  if (getPeriod() != null)
    sb.append("Period: " + getPeriod() + ",");
  if (getStatistics() != null)
    sb.append("Statistics: " + getStatistics() + ",");
  if (getUnit() != null)
    sb.append("Unit: " + getUnit());
  sb.append("}");
  return sb.toString();
}

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

if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
  return false;
if (other.getPeriod() == null ^ this.getPeriod() == null)
  return false;
if (other.getPeriod() != null && other.getPeriod().equals(this.getPeriod()) == false)
  return false;
if (other.getStatistics() == null ^ this.getStatistics() == null)

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

request.addParameter(prefix, StringUtils.fromDate(endTime));
if (getMetricStatisticsRequest.getPeriod() != null) {
  prefix = "Period";
  Integer period = getMetricStatisticsRequest.getPeriod();
  request.addParameter(prefix, StringUtils.fromInteger(period));

相关文章

微信公众号

最新文章

更多