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

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

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

GetMetricStatisticsRequest.setStartTime介绍

[英]The time stamp that determines the first data point to return. Start times are evaluated relative to the time that CloudWatch receives the request.

The value specified is inclusive; results include data points with the specified time stamp. The time stamp must be in ISO 8601 UTC format (for example, 2016-10-03T23:00:00Z).

CloudWatch rounds the specified time stamp as follows:

  • Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is rounded down to 12:32:00.
  • Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, 12:32:34 is rounded down to 12:30:00.
  • Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, 12:32:34 is rounded down to 12:00:00.

If you set Period to 5, 10, or 30, the start time of your request is rounded down to the nearest time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you make a query at (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is rounded down and you receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of data, using a period of 5 seconds, you receive data timestamped between 15:02:15 and 15:07:15.
[中]

代码示例

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

setStartTime(startTime);
return this;

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

getMetricRequest.setStartTime( dfYyyyMmDdHhMmSs.parse( properties.getProperty("startTime" ).trim() ) );
getMetricRequest.setEndTime( dfYyyyMmDdHhMmSs.parse( properties.getProperty("endTime").trim() ) );

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

request.setExtendedStatistics(rule.awsExtendedStatistics);
request.setEndTime(startDate);
request.setStartTime(endDate);
request.setPeriod(rule.periodSeconds);

相关文章

微信公众号

最新文章

更多