aws_sdk_costexplorer/client/
get_usage_forecast.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 [`GetUsageForecast`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`time_period(DateInterval)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::time_period) / [`set_time_period(Option<DateInterval>)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::set_time_period):<br>required: **true**<br><p>The start and end dates of the period that you want to retrieve usage forecast for. The start date is included in the period, but the end date isn't included in the period. 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>. The start date must be equal to or later than the current date to avoid a validation error.</p><br>
    ///   - [`metric(Metric)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::metric) / [`set_metric(Option<Metric>)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::set_metric):<br>required: **true**<br><p>Which metric Cost Explorer uses to create your forecast.</p> <p>Valid values for a <code>GetUsageForecast</code> call are the following:</p> <ul>  <li>   <p>USAGE_QUANTITY</p></li>  <li>   <p>NORMALIZED_USAGE_AMOUNT</p></li> </ul><br>
    ///   - [`granularity(Granularity)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::granularity) / [`set_granularity(Option<Granularity>)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::set_granularity):<br>required: **true**<br><p>How granular you want the forecast to be. You can get 3 months of <code>DAILY</code> forecasts or 12 months of <code>MONTHLY</code> forecasts.</p> <p>The <code>GetUsageForecast</code> operation supports only <code>DAILY</code> and <code>MONTHLY</code> granularities.</p><br>
    ///   - [`filter(Expression)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::filter) / [`set_filter(Option<Expression>)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::set_filter):<br>required: **false**<br><p>The filters that you want to use to filter your forecast. The <code>GetUsageForecast</code> API supports filtering by the following dimensions:</p> <ul>  <li>   <p><code>AZ</code></p></li>  <li>   <p><code>INSTANCE_TYPE</code></p></li>  <li>   <p><code>LINKED_ACCOUNT</code></p></li>  <li>   <p><code>LINKED_ACCOUNT_NAME</code></p></li>  <li>   <p><code>OPERATION</code></p></li>  <li>   <p><code>PURCHASE_TYPE</code></p></li>  <li>   <p><code>REGION</code></p></li>  <li>   <p><code>SERVICE</code></p></li>  <li>   <p><code>USAGE_TYPE</code></p></li>  <li>   <p><code>USAGE_TYPE_GROUP</code></p></li>  <li>   <p><code>RECORD_TYPE</code></p></li>  <li>   <p><code>OPERATING_SYSTEM</code></p></li>  <li>   <p><code>TENANCY</code></p></li>  <li>   <p><code>SCOPE</code></p></li>  <li>   <p><code>PLATFORM</code></p></li>  <li>   <p><code>SUBSCRIPTION_ID</code></p></li>  <li>   <p><code>LEGAL_ENTITY_NAME</code></p></li>  <li>   <p><code>DEPLOYMENT_OPTION</code></p></li>  <li>   <p><code>DATABASE_ENGINE</code></p></li>  <li>   <p><code>INSTANCE_TYPE_FAMILY</code></p></li>  <li>   <p><code>BILLING_ENTITY</code></p></li>  <li>   <p><code>RESERVATION_ID</code></p></li>  <li>   <p><code>SAVINGS_PLAN_ARN</code></p></li> </ul><br>
    ///   - [`billing_view_arn(impl Into<String>)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::billing_view_arn) / [`set_billing_view_arn(Option<String>)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::set_billing_view_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.</p><br>
    ///   - [`prediction_interval_level(i32)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::prediction_interval_level) / [`set_prediction_interval_level(Option<i32>)`](crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::set_prediction_interval_level):<br>required: **false**<br><p>Amazon Web Services Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction intervals.</p><br>
    /// - On success, responds with [`GetUsageForecastOutput`](crate::operation::get_usage_forecast::GetUsageForecastOutput) with field(s):
    ///   - [`total(Option<MetricValue>)`](crate::operation::get_usage_forecast::GetUsageForecastOutput::total): <p>How much you're forecasted to use over the forecast period.</p>
    ///   - [`forecast_results_by_time(Option<Vec::<ForecastResult>>)`](crate::operation::get_usage_forecast::GetUsageForecastOutput::forecast_results_by_time): <p>The forecasts for your query, in order. For <code>DAILY</code> forecasts, this is a list of days. For <code>MONTHLY</code> forecasts, this is a list of months.</p>
    /// - On failure, responds with [`SdkError<GetUsageForecastError>`](crate::operation::get_usage_forecast::GetUsageForecastError)
    pub fn get_usage_forecast(&self) -> crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder {
        crate::operation::get_usage_forecast::builders::GetUsageForecastFluentBuilder::new(self.handle.clone())
    }
}