/** * 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 #include namespace Aws { namespace CostExplorer { namespace Model { /** */ class GetReservationUtilizationRequest : public CostExplorerRequest { public: AWS_COSTEXPLORER_API GetReservationUtilizationRequest(); // 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 "GetReservationUtilization"; } AWS_COSTEXPLORER_API Aws::String SerializePayload() const override; AWS_COSTEXPLORER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Sets the start and end dates for retrieving Reserved Instance (RI) * utilization. The start date is inclusive, but the end date is exclusive. For * example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not * including 2017-05-01.

*/ inline const DateInterval& GetTimePeriod() const{ return m_timePeriod; } /** *

Sets the start and end dates for retrieving Reserved Instance (RI) * utilization. The start date is inclusive, but the end date is exclusive. For * example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not * including 2017-05-01.

*/ inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; } /** *

Sets the start and end dates for retrieving Reserved Instance (RI) * utilization. The start date is inclusive, but the end date is exclusive. For * example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not * including 2017-05-01.

*/ inline void SetTimePeriod(const DateInterval& value) { m_timePeriodHasBeenSet = true; m_timePeriod = value; } /** *

Sets the start and end dates for retrieving Reserved Instance (RI) * utilization. The start date is inclusive, but the end date is exclusive. For * example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not * including 2017-05-01.

*/ inline void SetTimePeriod(DateInterval&& value) { m_timePeriodHasBeenSet = true; m_timePeriod = std::move(value); } /** *

Sets the start and end dates for retrieving Reserved Instance (RI) * utilization. The start date is inclusive, but the end date is exclusive. For * example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not * including 2017-05-01.

*/ inline GetReservationUtilizationRequest& WithTimePeriod(const DateInterval& value) { SetTimePeriod(value); return *this;} /** *

Sets the start and end dates for retrieving Reserved Instance (RI) * utilization. The start date is inclusive, but the end date is exclusive. For * example, if start is 2017-01-01 and end * is 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not * including 2017-05-01.

*/ inline GetReservationUtilizationRequest& WithTimePeriod(DateInterval&& value) { SetTimePeriod(std::move(value)); return *this;} /** *

Groups only by SUBSCRIPTION_ID. Metadata is included.

*/ inline const Aws::Vector& GetGroupBy() const{ return m_groupBy; } /** *

Groups only by SUBSCRIPTION_ID. Metadata is included.

*/ inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; } /** *

Groups only by SUBSCRIPTION_ID. Metadata is included.

*/ inline void SetGroupBy(const Aws::Vector& value) { m_groupByHasBeenSet = true; m_groupBy = value; } /** *

Groups only by SUBSCRIPTION_ID. Metadata is included.

*/ inline void SetGroupBy(Aws::Vector&& value) { m_groupByHasBeenSet = true; m_groupBy = std::move(value); } /** *

Groups only by SUBSCRIPTION_ID. Metadata is included.

*/ inline GetReservationUtilizationRequest& WithGroupBy(const Aws::Vector& value) { SetGroupBy(value); return *this;} /** *

Groups only by SUBSCRIPTION_ID. Metadata is included.

*/ inline GetReservationUtilizationRequest& WithGroupBy(Aws::Vector&& value) { SetGroupBy(std::move(value)); return *this;} /** *

Groups only by SUBSCRIPTION_ID. Metadata is included.

*/ inline GetReservationUtilizationRequest& AddGroupBy(const GroupDefinition& value) { m_groupByHasBeenSet = true; m_groupBy.push_back(value); return *this; } /** *

Groups only by SUBSCRIPTION_ID. Metadata is included.

*/ inline GetReservationUtilizationRequest& AddGroupBy(GroupDefinition&& value) { m_groupByHasBeenSet = true; m_groupBy.push_back(std::move(value)); return *this; } /** *

If GroupBy is set, Granularity can't be set. If * Granularity isn't set, the response object doesn't include * Granularity, either MONTHLY or DAILY. If * both GroupBy and Granularity aren't set, * GetReservationUtilization defaults to DAILY.

*

The GetReservationUtilization operation supports only * DAILY and MONTHLY granularities.

*/ inline const Granularity& GetGranularity() const{ return m_granularity; } /** *

If GroupBy is set, Granularity can't be set. If * Granularity isn't set, the response object doesn't include * Granularity, either MONTHLY or DAILY. If * both GroupBy and Granularity aren't set, * GetReservationUtilization defaults to DAILY.

*

The GetReservationUtilization operation supports only * DAILY and MONTHLY granularities.

*/ inline bool GranularityHasBeenSet() const { return m_granularityHasBeenSet; } /** *

If GroupBy is set, Granularity can't be set. If * Granularity isn't set, the response object doesn't include * Granularity, either MONTHLY or DAILY. If * both GroupBy and Granularity aren't set, * GetReservationUtilization defaults to DAILY.

*

The GetReservationUtilization operation supports only * DAILY and MONTHLY granularities.

*/ inline void SetGranularity(const Granularity& value) { m_granularityHasBeenSet = true; m_granularity = value; } /** *

If GroupBy is set, Granularity can't be set. If * Granularity isn't set, the response object doesn't include * Granularity, either MONTHLY or DAILY. If * both GroupBy and Granularity aren't set, * GetReservationUtilization defaults to DAILY.

*

The GetReservationUtilization operation supports only * DAILY and MONTHLY granularities.

*/ inline void SetGranularity(Granularity&& value) { m_granularityHasBeenSet = true; m_granularity = std::move(value); } /** *

If GroupBy is set, Granularity can't be set. If * Granularity isn't set, the response object doesn't include * Granularity, either MONTHLY or DAILY. If * both GroupBy and Granularity aren't set, * GetReservationUtilization defaults to DAILY.

*

The GetReservationUtilization operation supports only * DAILY and MONTHLY granularities.

*/ inline GetReservationUtilizationRequest& WithGranularity(const Granularity& value) { SetGranularity(value); return *this;} /** *

If GroupBy is set, Granularity can't be set. If * Granularity isn't set, the response object doesn't include * Granularity, either MONTHLY or DAILY. If * both GroupBy and Granularity aren't set, * GetReservationUtilization defaults to DAILY.

*

The GetReservationUtilization operation supports only * DAILY and MONTHLY granularities.

*/ inline GetReservationUtilizationRequest& WithGranularity(Granularity&& value) { SetGranularity(std::move(value)); return *this;} /** *

Filters utilization data by dimensions. You can filter by the following * dimensions:

  • AZ

  • CACHE_ENGINE

  • *

    DEPLOYMENT_OPTION

  • INSTANCE_TYPE

  • *

    LINKED_ACCOUNT

  • OPERATING_SYSTEM

  • *

    PLATFORM

  • REGION

  • SERVICE

  • *

    SCOPE

  • TENANCY

* GetReservationUtilization uses the same Expression * object as the other operations, but only AND is supported among * each dimension, and nesting is supported up to only one level deep. If there are * multiple values for a dimension, they are OR'd together.

*/ inline const Expression& GetFilter() const{ return m_filter; } /** *

Filters utilization data by dimensions. You can filter by the following * dimensions:

  • AZ

  • CACHE_ENGINE

  • *

    DEPLOYMENT_OPTION

  • INSTANCE_TYPE

  • *

    LINKED_ACCOUNT

  • OPERATING_SYSTEM

  • *

    PLATFORM

  • REGION

  • SERVICE

  • *

    SCOPE

  • TENANCY

* GetReservationUtilization uses the same Expression * object as the other operations, but only AND is supported among * each dimension, and nesting is supported up to only one level deep. If there are * multiple values for a dimension, they are OR'd together.

*/ inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; } /** *

Filters utilization data by dimensions. You can filter by the following * dimensions:

  • AZ

  • CACHE_ENGINE

  • *

    DEPLOYMENT_OPTION

  • INSTANCE_TYPE

  • *

    LINKED_ACCOUNT

  • OPERATING_SYSTEM

  • *

    PLATFORM

  • REGION

  • SERVICE

  • *

    SCOPE

  • TENANCY

* GetReservationUtilization uses the same Expression * object as the other operations, but only AND is supported among * each dimension, and nesting is supported up to only one level deep. If there are * multiple values for a dimension, they are OR'd together.

*/ inline void SetFilter(const Expression& value) { m_filterHasBeenSet = true; m_filter = value; } /** *

Filters utilization data by dimensions. You can filter by the following * dimensions:

  • AZ

  • CACHE_ENGINE

  • *

    DEPLOYMENT_OPTION

  • INSTANCE_TYPE

  • *

    LINKED_ACCOUNT

  • OPERATING_SYSTEM

  • *

    PLATFORM

  • REGION

  • SERVICE

  • *

    SCOPE

  • TENANCY

* GetReservationUtilization uses the same Expression * object as the other operations, but only AND is supported among * each dimension, and nesting is supported up to only one level deep. If there are * multiple values for a dimension, they are OR'd together.

*/ inline void SetFilter(Expression&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); } /** *

Filters utilization data by dimensions. You can filter by the following * dimensions:

  • AZ

  • CACHE_ENGINE

  • *

    DEPLOYMENT_OPTION

  • INSTANCE_TYPE

  • *

    LINKED_ACCOUNT

  • OPERATING_SYSTEM

  • *

    PLATFORM

  • REGION

  • SERVICE

  • *

    SCOPE

  • TENANCY

* GetReservationUtilization uses the same Expression * object as the other operations, but only AND is supported among * each dimension, and nesting is supported up to only one level deep. If there are * multiple values for a dimension, they are OR'd together.

*/ inline GetReservationUtilizationRequest& WithFilter(const Expression& value) { SetFilter(value); return *this;} /** *

Filters utilization data by dimensions. You can filter by the following * dimensions:

  • AZ

  • CACHE_ENGINE

  • *

    DEPLOYMENT_OPTION

  • INSTANCE_TYPE

  • *

    LINKED_ACCOUNT

  • OPERATING_SYSTEM

  • *

    PLATFORM

  • REGION

  • SERVICE

  • *

    SCOPE

  • TENANCY

* GetReservationUtilization uses the same Expression * object as the other operations, but only AND is supported among * each dimension, and nesting is supported up to only one level deep. If there are * multiple values for a dimension, they are OR'd together.

*/ inline GetReservationUtilizationRequest& WithFilter(Expression&& value) { SetFilter(std::move(value)); return *this;} /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * UtilizationPercentage

  • * UtilizationPercentageInUnits

  • * PurchasedHours

  • PurchasedUnits

    *
  • TotalActualHours

  • * TotalActualUnits

  • UnusedHours

    *
  • UnusedUnits

  • * OnDemandCostOfRIHoursUsed

  • * NetRISavings

  • * TotalPotentialRISavings

  • * AmortizedUpfrontFee

  • * AmortizedRecurringFee

  • * TotalAmortizedFee

  • * RICostForUnusedHours

  • * RealizedSavings

  • UnrealizedSavings *

The supported values for SortOrder are * ASCENDING and DESCENDING.

*/ inline const SortDefinition& GetSortBy() const{ return m_sortBy; } /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * UtilizationPercentage

  • * UtilizationPercentageInUnits

  • * PurchasedHours

  • PurchasedUnits

    *
  • TotalActualHours

  • * TotalActualUnits

  • UnusedHours

    *
  • UnusedUnits

  • * OnDemandCostOfRIHoursUsed

  • * NetRISavings

  • * TotalPotentialRISavings

  • * AmortizedUpfrontFee

  • * AmortizedRecurringFee

  • * TotalAmortizedFee

  • * RICostForUnusedHours

  • * RealizedSavings

  • UnrealizedSavings *

The supported values for SortOrder are * ASCENDING and DESCENDING.

*/ inline bool SortByHasBeenSet() const { return m_sortByHasBeenSet; } /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * UtilizationPercentage

  • * UtilizationPercentageInUnits

  • * PurchasedHours

  • PurchasedUnits

    *
  • TotalActualHours

  • * TotalActualUnits

  • UnusedHours

    *
  • UnusedUnits

  • * OnDemandCostOfRIHoursUsed

  • * NetRISavings

  • * TotalPotentialRISavings

  • * AmortizedUpfrontFee

  • * AmortizedRecurringFee

  • * TotalAmortizedFee

  • * RICostForUnusedHours

  • * RealizedSavings

  • UnrealizedSavings *

The supported values for SortOrder are * ASCENDING and DESCENDING.

*/ inline void SetSortBy(const SortDefinition& value) { m_sortByHasBeenSet = true; m_sortBy = value; } /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * UtilizationPercentage

  • * UtilizationPercentageInUnits

  • * PurchasedHours

  • PurchasedUnits

    *
  • TotalActualHours

  • * TotalActualUnits

  • UnusedHours

    *
  • UnusedUnits

  • * OnDemandCostOfRIHoursUsed

  • * NetRISavings

  • * TotalPotentialRISavings

  • * AmortizedUpfrontFee

  • * AmortizedRecurringFee

  • * TotalAmortizedFee

  • * RICostForUnusedHours

  • * RealizedSavings

  • UnrealizedSavings *

The supported values for SortOrder are * ASCENDING and DESCENDING.

*/ inline void SetSortBy(SortDefinition&& value) { m_sortByHasBeenSet = true; m_sortBy = std::move(value); } /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * UtilizationPercentage

  • * UtilizationPercentageInUnits

  • * PurchasedHours

  • PurchasedUnits

    *
  • TotalActualHours

  • * TotalActualUnits

  • UnusedHours

    *
  • UnusedUnits

  • * OnDemandCostOfRIHoursUsed

  • * NetRISavings

  • * TotalPotentialRISavings

  • * AmortizedUpfrontFee

  • * AmortizedRecurringFee

  • * TotalAmortizedFee

  • * RICostForUnusedHours

  • * RealizedSavings

  • UnrealizedSavings *

The supported values for SortOrder are * ASCENDING and DESCENDING.

*/ inline GetReservationUtilizationRequest& WithSortBy(const SortDefinition& value) { SetSortBy(value); return *this;} /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * UtilizationPercentage

  • * UtilizationPercentageInUnits

  • * PurchasedHours

  • PurchasedUnits

    *
  • TotalActualHours

  • * TotalActualUnits

  • UnusedHours

    *
  • UnusedUnits

  • * OnDemandCostOfRIHoursUsed

  • * NetRISavings

  • * TotalPotentialRISavings

  • * AmortizedUpfrontFee

  • * AmortizedRecurringFee

  • * TotalAmortizedFee

  • * RICostForUnusedHours

  • * RealizedSavings

  • UnrealizedSavings *

The supported values for SortOrder are * ASCENDING and DESCENDING.

*/ inline GetReservationUtilizationRequest& WithSortBy(SortDefinition&& value) { SetSortBy(std::move(value)); return *this;} /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline const Aws::String& GetNextPageToken() const{ return m_nextPageToken; } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline bool NextPageTokenHasBeenSet() const { return m_nextPageTokenHasBeenSet; } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline void SetNextPageToken(const Aws::String& value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken = value; } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline void SetNextPageToken(Aws::String&& value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken = std::move(value); } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline void SetNextPageToken(const char* value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken.assign(value); } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline GetReservationUtilizationRequest& WithNextPageToken(const Aws::String& value) { SetNextPageToken(value); return *this;} /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline GetReservationUtilizationRequest& WithNextPageToken(Aws::String&& value) { SetNextPageToken(std::move(value)); return *this;} /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline GetReservationUtilizationRequest& WithNextPageToken(const char* value) { SetNextPageToken(value); return *this;} /** *

The maximum number of objects that you returned for this request. If more * objects are available, in the response, Amazon Web Services provides a * NextPageToken value that you can use in a subsequent call to get the next batch * of objects.

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

The maximum number of objects that you returned for this request. If more * objects are available, in the response, Amazon Web Services provides a * NextPageToken value that you can use in a subsequent call to get the next batch * of objects.

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

The maximum number of objects that you returned for this request. If more * objects are available, in the response, Amazon Web Services provides a * NextPageToken value that you can use in a subsequent call to get the next batch * of objects.

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

The maximum number of objects that you returned for this request. If more * objects are available, in the response, Amazon Web Services provides a * NextPageToken value that you can use in a subsequent call to get the next batch * of objects.

*/ inline GetReservationUtilizationRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} private: DateInterval m_timePeriod; bool m_timePeriodHasBeenSet = false; Aws::Vector m_groupBy; bool m_groupByHasBeenSet = false; Granularity m_granularity; bool m_granularityHasBeenSet = false; Expression m_filter; bool m_filterHasBeenSet = false; SortDefinition m_sortBy; bool m_sortByHasBeenSet = false; Aws::String m_nextPageToken; bool m_nextPageTokenHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; }; } // namespace Model } // namespace CostExplorer } // namespace Aws