aws_sdk_costexplorer/client/get_reservation_purchase_recommendation.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`GetReservationPurchaseRecommendation`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`account_id(impl Into<String>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::account_id) / [`set_account_id(Option<String>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_account_id):<br>required: **false**<br><p>The account ID that's associated with the recommendation.</p><br>
/// - [`service(impl Into<String>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::service) / [`set_service(Option<String>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_service):<br>required: **true**<br><p>The specific service that you want recommendations for.</p><br>
/// - [`filter(Expression)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::filter) / [`set_filter(Option<Expression>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_filter):<br>required: **false**<br><p>Use <code>Expression</code> to filter in various Cost Explorer APIs.</p> <p>Not all <code>Expression</code> types are supported in each API. Refer to the documentation for each specific API to see what is supported.</p> <p>There are two patterns:</p> <ul> <li> <p>Simple dimension values.</p> <ul> <li> <p>There are three types of simple dimension values: <code>CostCategories</code>, <code>Tags</code>, and <code>Dimensions</code>.</p> <ul> <li> <p>Specify the <code>CostCategories</code> field to define a filter that acts on Cost Categories.</p></li> <li> <p>Specify the <code>Tags</code> field to define a filter that acts on Cost Allocation Tags.</p></li> <li> <p>Specify the <code>Dimensions</code> field to define a filter that acts on the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html"> <code>DimensionValues</code> </a>.</p></li> </ul></li> <li> <p>For each filter type, you can set the dimension name and values for the filters that you plan to use.</p> <ul> <li> <p>For example, you can filter for <code>REGION==us-east-1 OR REGION==us-west-1</code>. For <code>GetRightsizingRecommendation</code>, the Region is a full name (for example, <code>REGION==US East (N. Virginia)</code>.</p></li> <li> <p>The corresponding <code>Expression</code> for this example is as follows: <code>{ "Dimensions": { "Key": "REGION", "Values": \[ "us-east-1", "us-west-1" \] } }</code></p></li> <li> <p>As shown in the previous example, lists of dimension values are combined with <code>OR</code> when applying the filter.</p></li> </ul></li> <li> <p>You can also set different match options to further control how the filter behaves. Not all APIs support match options. Refer to the documentation for each specific API to see what is supported.</p> <ul> <li> <p>For example, you can filter for linked account names that start with "a".</p></li> <li> <p>The corresponding <code>Expression</code> for this example is as follows: <code>{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": \[ "STARTS_WITH" \], "Values": \[ "a" \] } }</code></p></li> </ul></li> </ul></li> <li> <p>Compound <code>Expression</code> types with logical operations.</p> <ul> <li> <p>You can use multiple <code>Expression</code> types and the logical operators <code>AND/OR/NOT</code> to create a list of one or more <code>Expression</code> objects. By doing this, you can filter by more advanced options.</p></li> <li> <p>For example, you can filter by <code>((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)</code>.</p></li> <li> <p>The corresponding <code>Expression</code> for this example is as follows: <code>{ "And": \[ {"Or": \[ {"Dimensions": { "Key": "REGION", "Values": \[ "us-east-1", "us-west-1" \] }}, {"Tags": { "Key": "TagName", "Values": \["Value1"\] } } \]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": \["DataTransfer"\] }}} \] }</code></p></li> </ul><note> <p>Because each <code>Expression</code> can have only one operator, the service returns an error if more than one is specified. The following example shows an <code>Expression</code> object that creates an error: <code>{ "And": \[ ... \], "Dimensions": { "Key": "USAGE_TYPE", "Values": \[ "DataTransfer" \] } }</code></p> <p>The following is an example of the corresponding error message: <code>"Expression has more than one roots. Only one root operator is allowed for each expression: And, Or, Not, Dimensions, Tags, CostCategories"</code></p> </note></li> </ul><note> <p>For the <code>GetRightsizingRecommendation</code> action, a combination of OR and NOT isn't supported. OR isn't supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to <code>LINKED_ACCOUNT</code>, <code>REGION</code>, or <code>RIGHTSIZING_TYPE</code>.</p> <p>For the <code>GetReservationPurchaseRecommendation</code> action, only NOT is supported. AND and OR aren't supported. Dimensions are limited to <code>LINKED_ACCOUNT</code>.</p> </note><br>
/// - [`account_scope(AccountScope)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::account_scope) / [`set_account_scope(Option<AccountScope>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_account_scope):<br>required: **false**<br><p>The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to <code>PAYER</code>. If the value is <code>LINKED</code>, recommendations are calculated for individual member accounts only.</p><br>
/// - [`lookback_period_in_days(LookbackPeriodInDays)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::lookback_period_in_days) / [`set_lookback_period_in_days(Option<LookbackPeriodInDays>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_lookback_period_in_days):<br>required: **false**<br><p>The number of previous days that you want Amazon Web Services to consider when it calculates your recommendations.</p><br>
/// - [`term_in_years(TermInYears)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::term_in_years) / [`set_term_in_years(Option<TermInYears>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_term_in_years):<br>required: **false**<br><p>The reservation term that you want recommendations for.</p><br>
/// - [`payment_option(PaymentOption)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::payment_option) / [`set_payment_option(Option<PaymentOption>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_payment_option):<br>required: **false**<br><p>The reservation purchase option that you want recommendations for.</p><br>
/// - [`service_specification(ServiceSpecification)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::service_specification) / [`set_service_specification(Option<ServiceSpecification>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_service_specification):<br>required: **false**<br><p>The hardware specifications for the service instances that you want recommendations for, such as standard or convertible Amazon EC2 instances.</p><br>
/// - [`page_size(i32)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::page_size) / [`set_page_size(Option<i32>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_page_size):<br>required: **false**<br><p>The number of recommendations that you want returned in a single response object.</p><br>
/// - [`next_page_token(impl Into<String>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::next_page_token) / [`set_next_page_token(Option<String>)`](crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::set_next_page_token):<br>required: **false**<br><p>The pagination token that indicates the next set of results that you want to retrieve.</p><br>
/// - On success, responds with [`GetReservationPurchaseRecommendationOutput`](crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationOutput) with field(s):
/// - [`metadata(Option<ReservationPurchaseRecommendationMetadata>)`](crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationOutput::metadata): <p>Information about this specific recommendation call, such as the time stamp for when Cost Explorer generated this recommendation.</p>
/// - [`recommendations(Option<Vec::<ReservationPurchaseRecommendation>>)`](crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationOutput::recommendations): <p>Recommendations for reservations to purchase.</p>
/// - [`next_page_token(Option<String>)`](crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationOutput::next_page_token): <p>The pagination token for the next set of retrievable results.</p>
/// - On failure, responds with [`SdkError<GetReservationPurchaseRecommendationError>`](crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError)
pub fn get_reservation_purchase_recommendation(
&self,
) -> crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder {
crate::operation::get_reservation_purchase_recommendation::builders::GetReservationPurchaseRecommendationFluentBuilder::new(
self.handle.clone(),
)
}
}