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.
467 468 469 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 467 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.
868 869 870 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 868 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.
871 872 873 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 871 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.
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 841 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.66.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
556 557 558 559 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 556 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>
671 672 673 674 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 671 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
832 833 834 835 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 832 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.
861 862 863 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 861 def waiter_names [] end |