Class: Aws::PersonalizeRuntime::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::PersonalizeRuntime::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-personalizeruntime/client.rb
Overview
An API client for PersonalizeRuntime. To construct a client, you need to configure a :region and :credentials.
client = Aws::PersonalizeRuntime::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#get_action_recommendations(params = {}) ⇒ Types::GetActionRecommendationsResponse
Returns a list of recommended actions in sorted in descending order by prediction score.
-
#get_personalized_ranking(params = {}) ⇒ Types::GetPersonalizedRankingResponse
Re-ranks a list of recommended items for the given user.
-
#get_recommendations(params = {}) ⇒ Types::GetRecommendationsResponse
Returns a list of recommended items.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
473 474 475 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 473 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
874 875 876 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 874 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
877 878 879 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 877 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 847 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::PersonalizeRuntime') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-personalizeruntime' context[:gem_version] = '1.80.0' Seahorse::Client::Request.new(handlers, context) end |
#get_action_recommendations(params = {}) ⇒ Types::GetActionRecommendationsResponse
Returns a list of recommended actions in sorted in descending order by prediction score. Use the GetActionRecommendations API if you have a custom campaign that deploys a solution version trained with a PERSONALIZED_ACTIONS recipe.
For more information about PERSONALIZED_ACTIONS recipes, see [PERSONALIZED_ACTIONS recipes]. For more information about getting action recommendations, see [Getting action recommendations].
[1]: docs.aws.amazon.com/personalize/latest/dg/nexts-best-action-recipes.html [2]: docs.aws.amazon.com/personalize/latest/dg/get-action-recommendations.html
562 563 564 565 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 562 def get_action_recommendations(params = {}, = {}) req = build_request(:get_action_recommendations, params) req.send_request() end |
#get_personalized_ranking(params = {}) ⇒ Types::GetPersonalizedRankingResponse
Re-ranks a list of recommended items for the given user. The first item in the list is deemed the most likely item to be of interest to the user.
<note markdown=“1”> The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING.
</note>
677 678 679 680 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 677 def get_personalized_ranking(params = {}, = {}) req = build_request(:get_personalized_ranking, params) req.send_request() end |
#get_recommendations(params = {}) ⇒ Types::GetRecommendationsResponse
Returns a list of recommended items. For campaigns, the campaign’s Amazon Resource Name (ARN) is required and the required user and item input depends on the recipe type used to create the solution backing the campaign as follows:
-
USER_PERSONALIZATION -
userIdrequired,itemIdnot used -
RELATED_ITEMS -
itemIdrequired,userIdnot used
<note markdown=“1”> Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
</note>
For recommenders, the recommender’s ARN is required and the required item and user input depends on the use case (domain-based recipe) backing the recommender. For information on use case requirements see [Choosing recommender use cases].
[1]: docs.aws.amazon.com/personalize/latest/dg/domain-use-cases.html
838 839 840 841 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 838 def get_recommendations(params = {}, = {}) req = build_request(:get_recommendations, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
867 868 869 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 867 def waiter_names [] end |