aws_sdk_costexplorer/client/
get_savings_plans_utilization.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetSavingsPlansUtilization`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`time_period(DateInterval)`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::time_period) / [`set_time_period(Option<DateInterval>)`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::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>
    ///   - [`granularity(Granularity)`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::granularity) / [`set_granularity(Option<Granularity>)`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::set_granularity):<br>required: **false**<br><p>The granularity of the Amazon Web Services utillization data for your Savings Plans.</p> <p>The <code>GetSavingsPlansUtilization</code> operation supports only <code>DAILY</code> and <code>MONTHLY</code> granularities.</p><br>
    ///   - [`filter(Expression)`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::filter) / [`set_filter(Option<Expression>)`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::set_filter):<br>required: **false**<br><p>Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:</p> <ul>  <li>   <p><code>LINKED_ACCOUNT</code></p></li>  <li>   <p><code>SAVINGS_PLAN_ARN</code></p></li>  <li>   <p><code>SAVINGS_PLANS_TYPE</code></p></li>  <li>   <p><code>REGION</code></p></li>  <li>   <p><code>PAYMENT_OPTION</code></p></li>  <li>   <p><code>INSTANCE_TYPE_FAMILY</code></p></li> </ul> <p><code>GetSavingsPlansUtilization</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.</p><br>
    ///   - [`sort_by(SortDefinition)`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::sort_by) / [`set_sort_by(Option<SortDefinition>)`](crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::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>TotalCommitment</code></p></li>  <li>   <p><code>UsedCommitment</code></p></li>  <li>   <p><code>UnusedCommitment</code></p></li>  <li>   <p><code>NetSavings</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 [`GetSavingsPlansUtilizationOutput`](crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationOutput) with field(s):
    ///   - [`savings_plans_utilizations_by_time(Option<Vec::<SavingsPlansUtilizationByTime>>)`](crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationOutput::savings_plans_utilizations_by_time): <p>The amount of cost/commitment that you used your Savings Plans. You can use it to specify date ranges.</p>
    ///   - [`total(Option<SavingsPlansUtilizationAggregates>)`](crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationOutput::total): <p>The total amount of cost/commitment that you used your Savings Plans, regardless of date ranges.</p>
    /// - On failure, responds with [`SdkError<GetSavingsPlansUtilizationError>`](crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationError)
    pub fn get_savings_plans_utilization(
        &self,
    ) -> crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder {
        crate::operation::get_savings_plans_utilization::builders::GetSavingsPlansUtilizationFluentBuilder::new(self.handle.clone())
    }
}