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.
444 445 446 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 444 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.
845 846 847 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 845 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.
848 849 850 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 848 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.
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 818 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.63.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
533 534 535 536 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 533 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>
648 649 650 651 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 648 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
809 810 811 812 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 809 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.
838 839 840 |
# File 'lib/aws-sdk-personalizeruntime/client.rb', line 838 def waiter_names [] end |