/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace CloudWatch { namespace Model { /** */ class GetMetricDataRequest : public CloudWatchRequest { public: AWS_CLOUDWATCH_API GetMetricDataRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "GetMetricData"; } AWS_CLOUDWATCH_API Aws::String SerializePayload() const override; protected: AWS_CLOUDWATCH_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The metric queries to be returned. A single GetMetricData call * can include as many as 500 MetricDataQuery structures. Each of * these structures can specify either a metric to retrieve, a Metrics Insights * query, or a math expression to perform on retrieved data.

*/ inline const Aws::Vector& GetMetricDataQueries() const{ return m_metricDataQueries; } /** *

The metric queries to be returned. A single GetMetricData call * can include as many as 500 MetricDataQuery structures. Each of * these structures can specify either a metric to retrieve, a Metrics Insights * query, or a math expression to perform on retrieved data.

*/ inline bool MetricDataQueriesHasBeenSet() const { return m_metricDataQueriesHasBeenSet; } /** *

The metric queries to be returned. A single GetMetricData call * can include as many as 500 MetricDataQuery structures. Each of * these structures can specify either a metric to retrieve, a Metrics Insights * query, or a math expression to perform on retrieved data.

*/ inline void SetMetricDataQueries(const Aws::Vector& value) { m_metricDataQueriesHasBeenSet = true; m_metricDataQueries = value; } /** *

The metric queries to be returned. A single GetMetricData call * can include as many as 500 MetricDataQuery structures. Each of * these structures can specify either a metric to retrieve, a Metrics Insights * query, or a math expression to perform on retrieved data.

*/ inline void SetMetricDataQueries(Aws::Vector&& value) { m_metricDataQueriesHasBeenSet = true; m_metricDataQueries = std::move(value); } /** *

The metric queries to be returned. A single GetMetricData call * can include as many as 500 MetricDataQuery structures. Each of * these structures can specify either a metric to retrieve, a Metrics Insights * query, or a math expression to perform on retrieved data.

*/ inline GetMetricDataRequest& WithMetricDataQueries(const Aws::Vector& value) { SetMetricDataQueries(value); return *this;} /** *

The metric queries to be returned. A single GetMetricData call * can include as many as 500 MetricDataQuery structures. Each of * these structures can specify either a metric to retrieve, a Metrics Insights * query, or a math expression to perform on retrieved data.

*/ inline GetMetricDataRequest& WithMetricDataQueries(Aws::Vector&& value) { SetMetricDataQueries(std::move(value)); return *this;} /** *

The metric queries to be returned. A single GetMetricData call * can include as many as 500 MetricDataQuery structures. Each of * these structures can specify either a metric to retrieve, a Metrics Insights * query, or a math expression to perform on retrieved data.

*/ inline GetMetricDataRequest& AddMetricDataQueries(const MetricDataQuery& value) { m_metricDataQueriesHasBeenSet = true; m_metricDataQueries.push_back(value); return *this; } /** *

The metric queries to be returned. A single GetMetricData call * can include as many as 500 MetricDataQuery structures. Each of * these structures can specify either a metric to retrieve, a Metrics Insights * query, or a math expression to perform on retrieved data.

*/ inline GetMetricDataRequest& AddMetricDataQueries(MetricDataQuery&& value) { m_metricDataQueriesHasBeenSet = true; m_metricDataQueries.push_back(std::move(value)); return *this; } /** *

The time stamp indicating the earliest data to be returned.

The value * specified is inclusive; results include data points with the specified time * stamp.

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.

For better * performance, specify StartTime and EndTime values that * align with the value of the metric's Period and sync up with the * beginning and end of an hour. For example, if the Period of a * metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get * a faster response from CloudWatch than setting 12:07 or 12:29 as the * StartTime.

*/ inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; } /** *

The time stamp indicating the earliest data to be returned.

The value * specified is inclusive; results include data points with the specified time * stamp.

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.

For better * performance, specify StartTime and EndTime values that * align with the value of the metric's Period and sync up with the * beginning and end of an hour. For example, if the Period of a * metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get * a faster response from CloudWatch than setting 12:07 or 12:29 as the * StartTime.

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

The time stamp indicating the earliest data to be returned.

The value * specified is inclusive; results include data points with the specified time * stamp.

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.

For better * performance, specify StartTime and EndTime values that * align with the value of the metric's Period and sync up with the * beginning and end of an hour. For example, if the Period of a * metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get * a faster response from CloudWatch than setting 12:07 or 12:29 as the * StartTime.

*/ inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

The time stamp indicating the earliest data to be returned.

The value * specified is inclusive; results include data points with the specified time * stamp.

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.

For better * performance, specify StartTime and EndTime values that * align with the value of the metric's Period and sync up with the * beginning and end of an hour. For example, if the Period of a * metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get * a faster response from CloudWatch than setting 12:07 or 12:29 as the * StartTime.

*/ inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } /** *

The time stamp indicating the earliest data to be returned.

The value * specified is inclusive; results include data points with the specified time * stamp.

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.

For better * performance, specify StartTime and EndTime values that * align with the value of the metric's Period and sync up with the * beginning and end of an hour. For example, if the Period of a * metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get * a faster response from CloudWatch than setting 12:07 or 12:29 as the * StartTime.

*/ inline GetMetricDataRequest& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;} /** *

The time stamp indicating the earliest data to be returned.

The value * specified is inclusive; results include data points with the specified time * stamp.

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.

For better * performance, specify StartTime and EndTime values that * align with the value of the metric's Period and sync up with the * beginning and end of an hour. For example, if the Period of a * metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get * a faster response from CloudWatch than setting 12:07 or 12:29 as the * StartTime.

*/ inline GetMetricDataRequest& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;} /** *

The time stamp indicating the latest data to be returned.

The value * specified is exclusive; results include data points up to the specified time * stamp.

For better performance, specify StartTime and * EndTime values that align with the value of the metric's * Period and sync up with the beginning and end of an hour. For * example, if the Period of a metric is 5 minutes, specifying 12:05 * or 12:30 as EndTime can get a faster response from CloudWatch than * setting 12:07 or 12:29 as the EndTime.

*/ inline const Aws::Utils::DateTime& GetEndTime() const{ return m_endTime; } /** *

The time stamp indicating the latest data to be returned.

The value * specified is exclusive; results include data points up to the specified time * stamp.

For better performance, specify StartTime and * EndTime values that align with the value of the metric's * Period and sync up with the beginning and end of an hour. For * example, if the Period of a metric is 5 minutes, specifying 12:05 * or 12:30 as EndTime can get a faster response from CloudWatch than * setting 12:07 or 12:29 as the EndTime.

*/ inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; } /** *

The time stamp indicating the latest data to be returned.

The value * specified is exclusive; results include data points up to the specified time * stamp.

For better performance, specify StartTime and * EndTime values that align with the value of the metric's * Period and sync up with the beginning and end of an hour. For * example, if the Period of a metric is 5 minutes, specifying 12:05 * or 12:30 as EndTime can get a faster response from CloudWatch than * setting 12:07 or 12:29 as the EndTime.

*/ inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; } /** *

The time stamp indicating the latest data to be returned.

The value * specified is exclusive; results include data points up to the specified time * stamp.

For better performance, specify StartTime and * EndTime values that align with the value of the metric's * Period and sync up with the beginning and end of an hour. For * example, if the Period of a metric is 5 minutes, specifying 12:05 * or 12:30 as EndTime can get a faster response from CloudWatch than * setting 12:07 or 12:29 as the EndTime.

*/ inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); } /** *

The time stamp indicating the latest data to be returned.

The value * specified is exclusive; results include data points up to the specified time * stamp.

For better performance, specify StartTime and * EndTime values that align with the value of the metric's * Period and sync up with the beginning and end of an hour. For * example, if the Period of a metric is 5 minutes, specifying 12:05 * or 12:30 as EndTime can get a faster response from CloudWatch than * setting 12:07 or 12:29 as the EndTime.

*/ inline GetMetricDataRequest& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); return *this;} /** *

The time stamp indicating the latest data to be returned.

The value * specified is exclusive; results include data points up to the specified time * stamp.

For better performance, specify StartTime and * EndTime values that align with the value of the metric's * Period and sync up with the beginning and end of an hour. For * example, if the Period of a metric is 5 minutes, specifying 12:05 * or 12:30 as EndTime can get a faster response from CloudWatch than * setting 12:07 or 12:29 as the EndTime.

*/ inline GetMetricDataRequest& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;} /** *

Include this value, if it was returned by the previous * GetMetricData operation, to get the next set of data points.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

Include this value, if it was returned by the previous * GetMetricData operation, to get the next set of data points.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

Include this value, if it was returned by the previous * GetMetricData operation, to get the next set of data points.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

Include this value, if it was returned by the previous * GetMetricData operation, to get the next set of data points.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

Include this value, if it was returned by the previous * GetMetricData operation, to get the next set of data points.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

Include this value, if it was returned by the previous * GetMetricData operation, to get the next set of data points.

*/ inline GetMetricDataRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

Include this value, if it was returned by the previous * GetMetricData operation, to get the next set of data points.

*/ inline GetMetricDataRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

Include this value, if it was returned by the previous * GetMetricData operation, to get the next set of data points.

*/ inline GetMetricDataRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

The order in which data points should be returned. * TimestampDescending returns the newest data first and paginates * when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when * the MaxDatapoints limit is reached.

*/ inline const ScanBy& GetScanBy() const{ return m_scanBy; } /** *

The order in which data points should be returned. * TimestampDescending returns the newest data first and paginates * when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when * the MaxDatapoints limit is reached.

*/ inline bool ScanByHasBeenSet() const { return m_scanByHasBeenSet; } /** *

The order in which data points should be returned. * TimestampDescending returns the newest data first and paginates * when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when * the MaxDatapoints limit is reached.

*/ inline void SetScanBy(const ScanBy& value) { m_scanByHasBeenSet = true; m_scanBy = value; } /** *

The order in which data points should be returned. * TimestampDescending returns the newest data first and paginates * when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when * the MaxDatapoints limit is reached.

*/ inline void SetScanBy(ScanBy&& value) { m_scanByHasBeenSet = true; m_scanBy = std::move(value); } /** *

The order in which data points should be returned. * TimestampDescending returns the newest data first and paginates * when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when * the MaxDatapoints limit is reached.

*/ inline GetMetricDataRequest& WithScanBy(const ScanBy& value) { SetScanBy(value); return *this;} /** *

The order in which data points should be returned. * TimestampDescending returns the newest data first and paginates * when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when * the MaxDatapoints limit is reached.

*/ inline GetMetricDataRequest& WithScanBy(ScanBy&& value) { SetScanBy(std::move(value)); return *this;} /** *

The maximum number of data points the request should return before * paginating. If you omit this, the default of 100,800 is used.

*/ inline int GetMaxDatapoints() const{ return m_maxDatapoints; } /** *

The maximum number of data points the request should return before * paginating. If you omit this, the default of 100,800 is used.

*/ inline bool MaxDatapointsHasBeenSet() const { return m_maxDatapointsHasBeenSet; } /** *

The maximum number of data points the request should return before * paginating. If you omit this, the default of 100,800 is used.

*/ inline void SetMaxDatapoints(int value) { m_maxDatapointsHasBeenSet = true; m_maxDatapoints = value; } /** *

The maximum number of data points the request should return before * paginating. If you omit this, the default of 100,800 is used.

*/ inline GetMetricDataRequest& WithMaxDatapoints(int value) { SetMaxDatapoints(value); return *this;} /** *

This structure includes the Timezone parameter, which you can * use to specify your time zone so that the labels of returned data display the * correct time for your time zone.

*/ inline const LabelOptions& GetLabelOptions() const{ return m_labelOptions; } /** *

This structure includes the Timezone parameter, which you can * use to specify your time zone so that the labels of returned data display the * correct time for your time zone.

*/ inline bool LabelOptionsHasBeenSet() const { return m_labelOptionsHasBeenSet; } /** *

This structure includes the Timezone parameter, which you can * use to specify your time zone so that the labels of returned data display the * correct time for your time zone.

*/ inline void SetLabelOptions(const LabelOptions& value) { m_labelOptionsHasBeenSet = true; m_labelOptions = value; } /** *

This structure includes the Timezone parameter, which you can * use to specify your time zone so that the labels of returned data display the * correct time for your time zone.

*/ inline void SetLabelOptions(LabelOptions&& value) { m_labelOptionsHasBeenSet = true; m_labelOptions = std::move(value); } /** *

This structure includes the Timezone parameter, which you can * use to specify your time zone so that the labels of returned data display the * correct time for your time zone.

*/ inline GetMetricDataRequest& WithLabelOptions(const LabelOptions& value) { SetLabelOptions(value); return *this;} /** *

This structure includes the Timezone parameter, which you can * use to specify your time zone so that the labels of returned data display the * correct time for your time zone.

*/ inline GetMetricDataRequest& WithLabelOptions(LabelOptions&& value) { SetLabelOptions(std::move(value)); return *this;} private: Aws::Vector m_metricDataQueries; bool m_metricDataQueriesHasBeenSet = false; Aws::Utils::DateTime m_startTime; bool m_startTimeHasBeenSet = false; Aws::Utils::DateTime m_endTime; bool m_endTimeHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; ScanBy m_scanBy; bool m_scanByHasBeenSet = false; int m_maxDatapoints; bool m_maxDatapointsHasBeenSet = false; LabelOptions m_labelOptions; bool m_labelOptionsHasBeenSet = false; }; } // namespace Model } // namespace CloudWatch } // namespace Aws