aws_sdk_costexplorer/client/
get_savings_plans_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 [`GetSavingsPlansCoverage`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`time_period(DateInterval)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::time_period) / [`set_time_period(Option<DateInterval>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::set_time_period):<br>required: **true**<br><p>The time period that you want the usage and costs for. The <code>Start</code> date must be within 13 months. The <code>End</code> date must be after the <code>Start</code> date, and before the current date. Future dates can't be used as an <code>End</code> date.</p><br>
    ///   - [`group_by(GroupDefinition)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::group_by) / [`set_group_by(Option<Vec::<GroupDefinition>>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::set_group_by):<br>required: **false**<br><p>You can group the data using the attributes <code>INSTANCE_FAMILY</code>, <code>REGION</code>, or <code>SERVICE</code>.</p><br>
    ///   - [`granularity(Granularity)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::granularity) / [`set_granularity(Option<Granularity>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::set_granularity):<br>required: **false**<br><p>The granularity of the Amazon Web Services cost data for your Savings Plans. <code>Granularity</code> can't be set if <code>GroupBy</code> is set.</p> <p>The <code>GetSavingsPlansCoverage</code> operation supports only <code>DAILY</code> and <code>MONTHLY</code> granularities.</p><br>
    ///   - [`filter(Expression)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::filter) / [`set_filter(Option<Expression>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::set_filter):<br>required: **false**<br><p>Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:</p> <ul>  <li>   <p><code>LINKED_ACCOUNT</code></p></li>  <li>   <p><code>REGION</code></p></li>  <li>   <p><code>SERVICE</code></p></li>  <li>   <p><code>INSTANCE_FAMILY</code></p></li> </ul> <p><code>GetSavingsPlansCoverage</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. If there are multiple values for a dimension, they are OR'd together.</p> <p>Cost category is also supported.</p><br>
    ///   - [`metrics(impl Into<String>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::metrics) / [`set_metrics(Option<Vec::<String>>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::set_metrics):<br>required: **false**<br><p>The measurement that you want your Savings Plans coverage reported in. The only valid value is <code>SpendCoveredBySavingsPlans</code>.</p><br>
    ///   - [`next_token(impl Into<String>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::set_next_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_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::set_max_results):<br>required: **false**<br><p>The number of items to be returned in a response. The default is <code>20</code>, with a minimum value of <code>1</code>.</p><br>
    ///   - [`sort_by(SortDefinition)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::sort_by) / [`set_sort_by(Option<SortDefinition>)`](crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::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>SpendCoveredBySavingsPlan</code></p></li>  <li>   <p><code>OnDemandCost</code></p></li>  <li>   <p><code>CoveragePercentage</code></p></li>  <li>   <p><code>TotalCost</code></p></li>  <li>   <p><code>InstanceFamily</code></p></li>  <li>   <p><code>Region</code></p></li>  <li>   <p><code>Service</code></p></li> </ul> <p>The supported values for <code>SortOrder</code> are <code>ASCENDING</code> and <code>DESCENDING</code>.</p><br>
    /// - On success, responds with [`GetSavingsPlansCoverageOutput`](crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageOutput) with field(s):
    ///   - [`savings_plans_coverages(Vec::<SavingsPlansCoverage>)`](crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageOutput::savings_plans_coverages): <p>The amount of spend that your Savings Plans covered.</p>
    ///   - [`next_token(Option<String>)`](crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageOutput::next_token): <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>
    /// - On failure, responds with [`SdkError<GetSavingsPlansCoverageError>`](crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError)
    pub fn get_savings_plans_coverage(&self) -> crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder {
        crate::operation::get_savings_plans_coverage::builders::GetSavingsPlansCoverageFluentBuilder::new(self.handle.clone())
    }
}