aws_sdk_personalizeruntime/client/
get_action_recommendations.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetActionRecommendations`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`campaign_arn(impl Into<String>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::campaign_arn) / [`set_campaign_arn(Option<String>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::set_campaign_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.</p><br>
7    ///   - [`user_id(impl Into<String>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::user_id) / [`set_user_id(Option<String>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::set_user_id):<br>required: **false**<br><p>The user ID of the user to provide action recommendations for.</p><br>
8    ///   - [`num_results(i32)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::num_results) / [`set_num_results(Option<i32>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::set_num_results):<br>required: **false**<br><p>The number of results to return. The default is 5. The maximum is 100.</p><br>
9    ///   - [`filter_arn(impl Into<String>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::filter_arn) / [`set_filter_arn(Option<String>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::set_filter_arn):<br>required: **false**<br><p>The ARN of the filter to apply to the returned recommendations. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering Recommendations</a>.</p> <p>When using this parameter, be sure the filter resource is <code>ACTIVE</code>.</p><br>
10    ///   - [`filter_values(impl Into<String>, impl Into<String>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::filter_values) / [`set_filter_values(Option<HashMap::<String, String>>)`](crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::set_filter_values):<br>required: **false**<br><p>The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.</p> <p>For filter expressions that use an <code>INCLUDE</code> element to include actions, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an <code>EXCLUDE</code> element to exclude actions, you can omit the <code>filter-values</code>. In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering recommendations and user segments</a>.</p><br>
11    /// - On success, responds with [`GetActionRecommendationsOutput`](crate::operation::get_action_recommendations::GetActionRecommendationsOutput) with field(s):
12    ///   - [`action_list(Option<Vec::<PredictedAction>>)`](crate::operation::get_action_recommendations::GetActionRecommendationsOutput::action_list): <p>A list of action recommendations sorted in descending order by prediction score. There can be a maximum of 100 actions in the list. For information about action scores, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/how-action-recommendation-scoring-works.html">How action recommendation scoring works</a>.</p>
13    ///   - [`recommendation_id(Option<String>)`](crate::operation::get_action_recommendations::GetActionRecommendationsOutput::recommendation_id): <p>The ID of the recommendation.</p>
14    /// - On failure, responds with [`SdkError<GetActionRecommendationsError>`](crate::operation::get_action_recommendations::GetActionRecommendationsError)
15    pub fn get_action_recommendations(&self) -> crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder {
16        crate::operation::get_action_recommendations::builders::GetActionRecommendationsFluentBuilder::new(self.handle.clone())
17    }
18}