/** * 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 PI { namespace Model { /** */ class GetResourceMetricsRequest : public PIRequest { public: AWS_PI_API GetResourceMetricsRequest(); // 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 "GetResourceMetrics"; } AWS_PI_API Aws::String SerializePayload() const override; AWS_PI_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The Amazon Web Services service for which Performance Insights returns * metrics. Valid values are as follows:

  • RDS

    *
  • DOCDB

*/ inline const ServiceType& GetServiceType() const{ return m_serviceType; } /** *

The Amazon Web Services service for which Performance Insights returns * metrics. Valid values are as follows:

  • RDS

    *
  • DOCDB

*/ inline bool ServiceTypeHasBeenSet() const { return m_serviceTypeHasBeenSet; } /** *

The Amazon Web Services service for which Performance Insights returns * metrics. Valid values are as follows:

  • RDS

    *
  • DOCDB

*/ inline void SetServiceType(const ServiceType& value) { m_serviceTypeHasBeenSet = true; m_serviceType = value; } /** *

The Amazon Web Services service for which Performance Insights returns * metrics. Valid values are as follows:

  • RDS

    *
  • DOCDB

*/ inline void SetServiceType(ServiceType&& value) { m_serviceTypeHasBeenSet = true; m_serviceType = std::move(value); } /** *

The Amazon Web Services service for which Performance Insights returns * metrics. Valid values are as follows:

  • RDS

    *
  • DOCDB

*/ inline GetResourceMetricsRequest& WithServiceType(const ServiceType& value) { SetServiceType(value); return *this;} /** *

The Amazon Web Services service for which Performance Insights returns * metrics. Valid values are as follows:

  • RDS

    *
  • DOCDB

*/ inline GetResourceMetricsRequest& WithServiceType(ServiceType&& value) { SetServiceType(std::move(value)); return *this;} /** *

An immutable identifier for a data source that is unique for an Amazon Web * Services Region. Performance Insights gathers metrics from this data source. In * the console, the identifier is shown as ResourceID. When you call * DescribeDBInstances, the identifier is returned as * DbiResourceId.

To use a DB instance as a data source, * specify its DbiResourceId value. For example, specify * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

*/ inline const Aws::String& GetIdentifier() const{ return m_identifier; } /** *

An immutable identifier for a data source that is unique for an Amazon Web * Services Region. Performance Insights gathers metrics from this data source. In * the console, the identifier is shown as ResourceID. When you call * DescribeDBInstances, the identifier is returned as * DbiResourceId.

To use a DB instance as a data source, * specify its DbiResourceId value. For example, specify * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

*/ inline bool IdentifierHasBeenSet() const { return m_identifierHasBeenSet; } /** *

An immutable identifier for a data source that is unique for an Amazon Web * Services Region. Performance Insights gathers metrics from this data source. In * the console, the identifier is shown as ResourceID. When you call * DescribeDBInstances, the identifier is returned as * DbiResourceId.

To use a DB instance as a data source, * specify its DbiResourceId value. For example, specify * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

*/ inline void SetIdentifier(const Aws::String& value) { m_identifierHasBeenSet = true; m_identifier = value; } /** *

An immutable identifier for a data source that is unique for an Amazon Web * Services Region. Performance Insights gathers metrics from this data source. In * the console, the identifier is shown as ResourceID. When you call * DescribeDBInstances, the identifier is returned as * DbiResourceId.

To use a DB instance as a data source, * specify its DbiResourceId value. For example, specify * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

*/ inline void SetIdentifier(Aws::String&& value) { m_identifierHasBeenSet = true; m_identifier = std::move(value); } /** *

An immutable identifier for a data source that is unique for an Amazon Web * Services Region. Performance Insights gathers metrics from this data source. In * the console, the identifier is shown as ResourceID. When you call * DescribeDBInstances, the identifier is returned as * DbiResourceId.

To use a DB instance as a data source, * specify its DbiResourceId value. For example, specify * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

*/ inline void SetIdentifier(const char* value) { m_identifierHasBeenSet = true; m_identifier.assign(value); } /** *

An immutable identifier for a data source that is unique for an Amazon Web * Services Region. Performance Insights gathers metrics from this data source. In * the console, the identifier is shown as ResourceID. When you call * DescribeDBInstances, the identifier is returned as * DbiResourceId.

To use a DB instance as a data source, * specify its DbiResourceId value. For example, specify * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

*/ inline GetResourceMetricsRequest& WithIdentifier(const Aws::String& value) { SetIdentifier(value); return *this;} /** *

An immutable identifier for a data source that is unique for an Amazon Web * Services Region. Performance Insights gathers metrics from this data source. In * the console, the identifier is shown as ResourceID. When you call * DescribeDBInstances, the identifier is returned as * DbiResourceId.

To use a DB instance as a data source, * specify its DbiResourceId value. For example, specify * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

*/ inline GetResourceMetricsRequest& WithIdentifier(Aws::String&& value) { SetIdentifier(std::move(value)); return *this;} /** *

An immutable identifier for a data source that is unique for an Amazon Web * Services Region. Performance Insights gathers metrics from this data source. In * the console, the identifier is shown as ResourceID. When you call * DescribeDBInstances, the identifier is returned as * DbiResourceId.

To use a DB instance as a data source, * specify its DbiResourceId value. For example, specify * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

*/ inline GetResourceMetricsRequest& WithIdentifier(const char* value) { SetIdentifier(value); return *this;} /** *

An array of one or more queries to perform. Each query must specify a * Performance Insights metric, and can optionally specify aggregation and * filtering criteria.

*/ inline const Aws::Vector& GetMetricQueries() const{ return m_metricQueries; } /** *

An array of one or more queries to perform. Each query must specify a * Performance Insights metric, and can optionally specify aggregation and * filtering criteria.

*/ inline bool MetricQueriesHasBeenSet() const { return m_metricQueriesHasBeenSet; } /** *

An array of one or more queries to perform. Each query must specify a * Performance Insights metric, and can optionally specify aggregation and * filtering criteria.

*/ inline void SetMetricQueries(const Aws::Vector& value) { m_metricQueriesHasBeenSet = true; m_metricQueries = value; } /** *

An array of one or more queries to perform. Each query must specify a * Performance Insights metric, and can optionally specify aggregation and * filtering criteria.

*/ inline void SetMetricQueries(Aws::Vector&& value) { m_metricQueriesHasBeenSet = true; m_metricQueries = std::move(value); } /** *

An array of one or more queries to perform. Each query must specify a * Performance Insights metric, and can optionally specify aggregation and * filtering criteria.

*/ inline GetResourceMetricsRequest& WithMetricQueries(const Aws::Vector& value) { SetMetricQueries(value); return *this;} /** *

An array of one or more queries to perform. Each query must specify a * Performance Insights metric, and can optionally specify aggregation and * filtering criteria.

*/ inline GetResourceMetricsRequest& WithMetricQueries(Aws::Vector&& value) { SetMetricQueries(std::move(value)); return *this;} /** *

An array of one or more queries to perform. Each query must specify a * Performance Insights metric, and can optionally specify aggregation and * filtering criteria.

*/ inline GetResourceMetricsRequest& AddMetricQueries(const MetricQuery& value) { m_metricQueriesHasBeenSet = true; m_metricQueries.push_back(value); return *this; } /** *

An array of one or more queries to perform. Each query must specify a * Performance Insights metric, and can optionally specify aggregation and * filtering criteria.

*/ inline GetResourceMetricsRequest& AddMetricQueries(MetricQuery&& value) { m_metricQueriesHasBeenSet = true; m_metricQueries.push_back(std::move(value)); return *this; } /** *

The date and time specifying the beginning of the requested time series query * range. You can't specify a StartTime that is earlier than 7 days * ago. By default, Performance Insights has 7 days of retention, but you can * extend this range up to 2 years. The value specified is inclusive. Thus, * the command returns data points equal to or greater than * StartTime.

The value for StartTime must be * earlier than the value for EndTime.

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

The date and time specifying the beginning of the requested time series query * range. You can't specify a StartTime that is earlier than 7 days * ago. By default, Performance Insights has 7 days of retention, but you can * extend this range up to 2 years. The value specified is inclusive. Thus, * the command returns data points equal to or greater than * StartTime.

The value for StartTime must be * earlier than the value for EndTime.

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

The date and time specifying the beginning of the requested time series query * range. You can't specify a StartTime that is earlier than 7 days * ago. By default, Performance Insights has 7 days of retention, but you can * extend this range up to 2 years. The value specified is inclusive. Thus, * the command returns data points equal to or greater than * StartTime.

The value for StartTime must be * earlier than the value for EndTime.

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

The date and time specifying the beginning of the requested time series query * range. You can't specify a StartTime that is earlier than 7 days * ago. By default, Performance Insights has 7 days of retention, but you can * extend this range up to 2 years. The value specified is inclusive. Thus, * the command returns data points equal to or greater than * StartTime.

The value for StartTime must be * earlier than the value for EndTime.

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

The date and time specifying the beginning of the requested time series query * range. You can't specify a StartTime that is earlier than 7 days * ago. By default, Performance Insights has 7 days of retention, but you can * extend this range up to 2 years. The value specified is inclusive. Thus, * the command returns data points equal to or greater than * StartTime.

The value for StartTime must be * earlier than the value for EndTime.

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

The date and time specifying the beginning of the requested time series query * range. You can't specify a StartTime that is earlier than 7 days * ago. By default, Performance Insights has 7 days of retention, but you can * extend this range up to 2 years. The value specified is inclusive. Thus, * the command returns data points equal to or greater than * StartTime.

The value for StartTime must be * earlier than the value for EndTime.

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

The date and time specifying the end of the requested time series query * range. The value specified is exclusive. Thus, the command returns data * points less than (but not equal to) EndTime.

The value for * EndTime must be later than the value for * StartTime.

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

The date and time specifying the end of the requested time series query * range. The value specified is exclusive. Thus, the command returns data * points less than (but not equal to) EndTime.

The value for * EndTime must be later than the value for * StartTime.

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

The date and time specifying the end of the requested time series query * range. The value specified is exclusive. Thus, the command returns data * points less than (but not equal to) EndTime.

The value for * EndTime must be later than the value for * StartTime.

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

The date and time specifying the end of the requested time series query * range. The value specified is exclusive. Thus, the command returns data * points less than (but not equal to) EndTime.

The value for * EndTime must be later than the value for * StartTime.

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

The date and time specifying the end of the requested time series query * range. The value specified is exclusive. Thus, the command returns data * points less than (but not equal to) EndTime.

The value for * EndTime must be later than the value for * StartTime.

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

The date and time specifying the end of the requested time series query * range. The value specified is exclusive. Thus, the command returns data * points less than (but not equal to) EndTime.

The value for * EndTime must be later than the value for * StartTime.

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

The granularity, in seconds, of the data points returned from Performance * Insights. A period can be as short as one second, or as long as one day (86400 * seconds). Valid values are:

  • 1 (one second)

    *
  • 60 (one minute)

  • 300 * (five minutes)

  • 3600 (one hour)

  • *

    86400 (twenty-four hours)

If you don't * specify PeriodInSeconds, then Performance Insights will choose a * value for you, with a goal of returning roughly 100-200 data points in the * response.

*/ inline int GetPeriodInSeconds() const{ return m_periodInSeconds; } /** *

The granularity, in seconds, of the data points returned from Performance * Insights. A period can be as short as one second, or as long as one day (86400 * seconds). Valid values are:

  • 1 (one second)

    *
  • 60 (one minute)

  • 300 * (five minutes)

  • 3600 (one hour)

  • *

    86400 (twenty-four hours)

If you don't * specify PeriodInSeconds, then Performance Insights will choose a * value for you, with a goal of returning roughly 100-200 data points in the * response.

*/ inline bool PeriodInSecondsHasBeenSet() const { return m_periodInSecondsHasBeenSet; } /** *

The granularity, in seconds, of the data points returned from Performance * Insights. A period can be as short as one second, or as long as one day (86400 * seconds). Valid values are:

  • 1 (one second)

    *
  • 60 (one minute)

  • 300 * (five minutes)

  • 3600 (one hour)

  • *

    86400 (twenty-four hours)

If you don't * specify PeriodInSeconds, then Performance Insights will choose a * value for you, with a goal of returning roughly 100-200 data points in the * response.

*/ inline void SetPeriodInSeconds(int value) { m_periodInSecondsHasBeenSet = true; m_periodInSeconds = value; } /** *

The granularity, in seconds, of the data points returned from Performance * Insights. A period can be as short as one second, or as long as one day (86400 * seconds). Valid values are:

  • 1 (one second)

    *
  • 60 (one minute)

  • 300 * (five minutes)

  • 3600 (one hour)

  • *

    86400 (twenty-four hours)

If you don't * specify PeriodInSeconds, then Performance Insights will choose a * value for you, with a goal of returning roughly 100-200 data points in the * response.

*/ inline GetResourceMetricsRequest& WithPeriodInSeconds(int value) { SetPeriodInSeconds(value); return *this;} /** *

The maximum number of items to return in the response. If more items exist * than the specified MaxRecords value, a pagination token is included * in the response so that the remaining results can be retrieved.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

The maximum number of items to return in the response. If more items exist * than the specified MaxRecords value, a pagination token is included * in the response so that the remaining results can be retrieved.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

The maximum number of items to return in the response. If more items exist * than the specified MaxRecords value, a pagination token is included * in the response so that the remaining results can be retrieved.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

The maximum number of items to return in the response. If more items exist * than the specified MaxRecords value, a pagination token is included * in the response so that the remaining results can be retrieved.

*/ inline GetResourceMetricsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

An optional pagination token provided by a previous request. If this * parameter is specified, the response includes only records beyond the token, up * to the value specified by MaxRecords.

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

An optional pagination token provided by a previous request. If this * parameter is specified, the response includes only records beyond the token, up * to the value specified by MaxRecords.

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

An optional pagination token provided by a previous request. If this * parameter is specified, the response includes only records beyond the token, up * to the value specified by MaxRecords.

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

An optional pagination token provided by a previous request. If this * parameter is specified, the response includes only records beyond the token, up * to the value specified by MaxRecords.

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

An optional pagination token provided by a previous request. If this * parameter is specified, the response includes only records beyond the token, up * to the value specified by MaxRecords.

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

An optional pagination token provided by a previous request. If this * parameter is specified, the response includes only records beyond the token, up * to the value specified by MaxRecords.

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

An optional pagination token provided by a previous request. If this * parameter is specified, the response includes only records beyond the token, up * to the value specified by MaxRecords.

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

An optional pagination token provided by a previous request. If this * parameter is specified, the response includes only records beyond the token, up * to the value specified by MaxRecords.

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

The returned timestamp which is the start or end time of the time periods. * The default value is END_TIME.

*/ inline const PeriodAlignment& GetPeriodAlignment() const{ return m_periodAlignment; } /** *

The returned timestamp which is the start or end time of the time periods. * The default value is END_TIME.

*/ inline bool PeriodAlignmentHasBeenSet() const { return m_periodAlignmentHasBeenSet; } /** *

The returned timestamp which is the start or end time of the time periods. * The default value is END_TIME.

*/ inline void SetPeriodAlignment(const PeriodAlignment& value) { m_periodAlignmentHasBeenSet = true; m_periodAlignment = value; } /** *

The returned timestamp which is the start or end time of the time periods. * The default value is END_TIME.

*/ inline void SetPeriodAlignment(PeriodAlignment&& value) { m_periodAlignmentHasBeenSet = true; m_periodAlignment = std::move(value); } /** *

The returned timestamp which is the start or end time of the time periods. * The default value is END_TIME.

*/ inline GetResourceMetricsRequest& WithPeriodAlignment(const PeriodAlignment& value) { SetPeriodAlignment(value); return *this;} /** *

The returned timestamp which is the start or end time of the time periods. * The default value is END_TIME.

*/ inline GetResourceMetricsRequest& WithPeriodAlignment(PeriodAlignment&& value) { SetPeriodAlignment(std::move(value)); return *this;} private: ServiceType m_serviceType; bool m_serviceTypeHasBeenSet = false; Aws::String m_identifier; bool m_identifierHasBeenSet = false; Aws::Vector m_metricQueries; bool m_metricQueriesHasBeenSet = false; Aws::Utils::DateTime m_startTime; bool m_startTimeHasBeenSet = false; Aws::Utils::DateTime m_endTime; bool m_endTimeHasBeenSet = false; int m_periodInSeconds; bool m_periodInSecondsHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; PeriodAlignment m_periodAlignment; bool m_periodAlignmentHasBeenSet = false; }; } // namespace Model } // namespace PI } // namespace Aws