aws_sdk_costexplorer/client/
get_reservation_coverage.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetReservationCoverage`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`time_period(DateInterval)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::time_period) / [`set_time_period(Option<DateInterval>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::set_time_period):<br>required: **true**<br><p>The start and end dates of the period that you want to retrieve data about reservation coverage for. You can retrieve data for a maximum of 13 months: the last 12 months and the current month. 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_coverage::builders::GetReservationCoverageFluentBuilder::group_by) / [`set_group_by(Option<Vec::<GroupDefinition>>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::set_group_by):<br>required: **false**<br><p>You can group the data by the following attributes:</p> <ul>  <li>   <p>AZ</p></li>  <li>   <p>CACHE_ENGINE</p></li>  <li>   <p>DATABASE_ENGINE</p></li>  <li>   <p>DEPLOYMENT_OPTION</p></li>  <li>   <p>INSTANCE_TYPE</p></li>  <li>   <p>INVOICING_ENTITY</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>TENANCY</p></li> </ul><br>
    ///   - [`granularity(Granularity)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::granularity) / [`set_granularity(Option<Granularity>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::set_granularity):<br>required: **false**<br><p>The granularity of the Amazon Web Services cost data for the reservation. Valid values are <code>MONTHLY</code> and <code>DAILY</code>.</p> <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>.</p> <p>The <code>GetReservationCoverage</code> operation supports only <code>DAILY</code> and <code>MONTHLY</code> granularities.</p><br>
    ///   - [`filter(Expression)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::filter) / [`set_filter(Option<Expression>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::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>DATABASE_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></li>  <li>   <p>TAG</p></li>  <li>   <p>TENANCY</p></li> </ul> <p><code>GetReservationCoverage</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. You can nest only one level deep. If there are multiple values for a dimension, they are OR'd together.</p> <p>If you don't provide a <code>SERVICE</code> filter, Cost Explorer defaults to EC2.</p> <p>Cost category is also supported.</p><br>
    ///   - [`metrics(impl Into<String>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::metrics) / [`set_metrics(Option<Vec::<String>>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::set_metrics):<br>required: **false**<br><p>The measurement that you want your reservation coverage reported in.</p> <p>Valid values are <code>Hour</code>, <code>Unit</code>, and <code>Cost</code>. You can use multiple values in a request.</p><br>
    ///   - [`next_page_token(impl Into<String>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::next_page_token) / [`set_next_page_token(Option<String>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::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>
    ///   - [`sort_by(SortDefinition)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::sort_by) / [`set_sort_by(Option<SortDefinition>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::set_sort_by):<br>required: **false**<br><p>The value by which you want to sort the data.</p> <p>The following values are supported for <code>Key</code>:</p> <ul>  <li>   <p><code>OnDemandCost</code></p></li>  <li>   <p><code>CoverageHoursPercentage</code></p></li>  <li>   <p><code>OnDemandHours</code></p></li>  <li>   <p><code>ReservedHours</code></p></li>  <li>   <p><code>TotalRunningHours</code></p></li>  <li>   <p><code>CoverageNormalizedUnitsPercentage</code></p></li>  <li>   <p><code>OnDemandNormalizedUnits</code></p></li>  <li>   <p><code>ReservedNormalizedUnits</code></p></li>  <li>   <p><code>TotalRunningNormalizedUnits</code></p></li>  <li>   <p><code>Time</code></p></li> </ul> <p>Supported values for <code>SortOrder</code> are <code>ASCENDING</code> or <code>DESCENDING</code>.</p><br>
    ///   - [`max_results(i32)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::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 [`GetReservationCoverageOutput`](crate::operation::get_reservation_coverage::GetReservationCoverageOutput) with field(s):
    ///   - [`coverages_by_time(Vec::<CoverageByTime>)`](crate::operation::get_reservation_coverage::GetReservationCoverageOutput::coverages_by_time): <p>The amount of time that your reservations covered.</p>
    ///   - [`total(Option<Coverage>)`](crate::operation::get_reservation_coverage::GetReservationCoverageOutput::total): <p>The total amount of instance usage that a reservation covered.</p>
    ///   - [`next_page_token(Option<String>)`](crate::operation::get_reservation_coverage::GetReservationCoverageOutput::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<GetReservationCoverageError>`](crate::operation::get_reservation_coverage::GetReservationCoverageError)
    pub fn get_reservation_coverage(&self) -> crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder {
        crate::operation::get_reservation_coverage::builders::GetReservationCoverageFluentBuilder::new(self.handle.clone())
    }
}