aws_sdk_costexplorer/client/
get_reservation_utilization.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetReservationUtilization`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`time_period(DateInterval)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::time_period) / [`set_time_period(Option<DateInterval>)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::set_time_period):<br>required: **true**<br><p>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 <code>start</code> is <code>2017-01-01</code> and <code>end</code> is <code>2017-05-01</code>, then the cost and usage data is retrieved from <code>2017-01-01</code> up to and including <code>2017-04-30</code> but not including <code>2017-05-01</code>.</p><br>
    ///   - [`group_by(GroupDefinition)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::group_by) / [`set_group_by(Option<Vec::<GroupDefinition>>)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::set_group_by):<br>required: **false**<br><p>Groups only by <code>SUBSCRIPTION_ID</code>. Metadata is included.</p><br>
    ///   - [`granularity(Granularity)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::granularity) / [`set_granularity(Option<Granularity>)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::set_granularity):<br>required: **false**<br><p>If <code>GroupBy</code> is set, <code>Granularity</code> can't be set. If <code>Granularity</code> isn't set, the response object doesn't include <code>Granularity</code>, either <code>MONTHLY</code> or <code>DAILY</code>. If both <code>GroupBy</code> and <code>Granularity</code> aren't set, <code>GetReservationUtilization</code> defaults to <code>DAILY</code>.</p> <p>The <code>GetReservationUtilization</code> operation supports only <code>DAILY</code> and <code>MONTHLY</code> granularities.</p><br>
    ///   - [`filter(Expression)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::filter) / [`set_filter(Option<Expression>)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::set_filter):<br>required: **false**<br><p>Filters utilization data by dimensions. You can filter by the following dimensions:</p> <ul>  <li>   <p>AZ</p></li>  <li>   <p>CACHE_ENGINE</p></li>  <li>   <p>DEPLOYMENT_OPTION</p></li>  <li>   <p>INSTANCE_TYPE</p></li>  <li>   <p>LINKED_ACCOUNT</p></li>  <li>   <p>OPERATING_SYSTEM</p></li>  <li>   <p>PLATFORM</p></li>  <li>   <p>REGION</p></li>  <li>   <p>SERVICE</p><note>    <p>If not specified, the <code>SERVICE</code> filter defaults to Amazon Elastic Compute Cloud - Compute. Supported values for <code>SERVICE</code> are Amazon Elastic Compute Cloud - Compute, Amazon Relational Database Service, Amazon ElastiCache, Amazon Redshift, and Amazon Elasticsearch Service. The value for the <code>SERVICE</code> filter should not exceed "1".</p>   </note></li>  <li>   <p>SCOPE</p></li>  <li>   <p>TENANCY</p></li> </ul> <p><code>GetReservationUtilization</code> uses the same <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a> object as the other operations, but only <code>AND</code> 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.</p><br>
    ///   - [`sort_by(SortDefinition)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::sort_by) / [`set_sort_by(Option<SortDefinition>)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::set_sort_by):<br>required: **false**<br><p>The value that you want to sort the data by.</p> <p>The following values are supported for <code>Key</code>:</p> <ul>  <li>   <p><code>UtilizationPercentage</code></p></li>  <li>   <p><code>UtilizationPercentageInUnits</code></p></li>  <li>   <p><code>PurchasedHours</code></p></li>  <li>   <p><code>PurchasedUnits</code></p></li>  <li>   <p><code>TotalActualHours</code></p></li>  <li>   <p><code>TotalActualUnits</code></p></li>  <li>   <p><code>UnusedHours</code></p></li>  <li>   <p><code>UnusedUnits</code></p></li>  <li>   <p><code>OnDemandCostOfRIHoursUsed</code></p></li>  <li>   <p><code>NetRISavings</code></p></li>  <li>   <p><code>TotalPotentialRISavings</code></p></li>  <li>   <p><code>AmortizedUpfrontFee</code></p></li>  <li>   <p><code>AmortizedRecurringFee</code></p></li>  <li>   <p><code>TotalAmortizedFee</code></p></li>  <li>   <p><code>RICostForUnusedHours</code></p></li>  <li>   <p><code>RealizedSavings</code></p></li>  <li>   <p><code>UnrealizedSavings</code></p></li> </ul> <p>The supported values for <code>SortOrder</code> are <code>ASCENDING</code> and <code>DESCENDING</code>.</p><br>
    ///   - [`next_page_token(impl Into<String>)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::next_page_token) / [`set_next_page_token(Option<String>)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::set_next_page_token):<br>required: **false**<br><p>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.</p><br>
    ///   - [`max_results(i32)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::set_max_results):<br>required: **false**<br><p>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.</p><br>
    /// - On success, responds with [`GetReservationUtilizationOutput`](crate::operation::get_reservation_utilization::GetReservationUtilizationOutput) with field(s):
    ///   - [`utilizations_by_time(Vec::<UtilizationByTime>)`](crate::operation::get_reservation_utilization::GetReservationUtilizationOutput::utilizations_by_time): <p>The amount of time that you used your Reserved Instances (RIs).</p>
    ///   - [`total(Option<ReservationAggregates>)`](crate::operation::get_reservation_utilization::GetReservationUtilizationOutput::total): <p>The total amount of time that you used your Reserved Instances (RIs).</p>
    ///   - [`next_page_token(Option<String>)`](crate::operation::get_reservation_utilization::GetReservationUtilizationOutput::next_page_token): <p>The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.</p>
    /// - On failure, responds with [`SdkError<GetReservationUtilizationError>`](crate::operation::get_reservation_utilization::GetReservationUtilizationError)
    pub fn get_reservation_utilization(&self) -> crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder {
        crate::operation::get_reservation_utilization::builders::GetReservationUtilizationFluentBuilder::new(self.handle.clone())
    }
}