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.
471 472 473 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 471 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.
872 873 874 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 872 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.
875 876 877 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 875 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.
845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 845 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.84.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
560 561 562 563 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 560 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>
675 676 677 678 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 675 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 - ‘userId` required, `itemId` not used
-
RELATED_ITEMS - ‘itemId` required, `userId` not 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
836 837 838 839 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 836 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.
865 866 867 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 865 def waiter_names [] end |