Interface PersonalizeRuntimeClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface PersonalizeRuntimeClient extends AwsClient
Service client for accessing Amazon Personalize Runtime. This can be created using the staticbuilder()method.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static PersonalizeRuntimeClientBuilderbuilder()Create a builder that can be used to configure and create aPersonalizeRuntimeClient.static PersonalizeRuntimeClientcreate()Create aPersonalizeRuntimeClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default GetActionRecommendationsResponsegetActionRecommendations(Consumer<GetActionRecommendationsRequest.Builder> getActionRecommendationsRequest)Returns a list of recommended actions in sorted in descending order by prediction score.default GetActionRecommendationsResponsegetActionRecommendations(GetActionRecommendationsRequest getActionRecommendationsRequest)Returns a list of recommended actions in sorted in descending order by prediction score.default GetPersonalizedRankingResponsegetPersonalizedRanking(Consumer<GetPersonalizedRankingRequest.Builder> getPersonalizedRankingRequest)Re-ranks a list of recommended items for the given user.default GetPersonalizedRankingResponsegetPersonalizedRanking(GetPersonalizedRankingRequest getPersonalizedRankingRequest)Re-ranks a list of recommended items for the given user.default GetRecommendationsResponsegetRecommendations(Consumer<GetRecommendationsRequest.Builder> getRecommendationsRequest)Returns a list of recommended items.default GetRecommendationsResponsegetRecommendations(GetRecommendationsRequest getRecommendationsRequest)Returns a list of recommended items.default PersonalizeRuntimeServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
getActionRecommendations
default GetActionRecommendationsResponse getActionRecommendations(GetActionRecommendationsRequest getActionRecommendationsRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, PersonalizeRuntimeException
Returns a list of recommended actions in sorted in descending order by prediction score. Use the
GetActionRecommendationsAPI 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.
- Parameters:
getActionRecommendationsRequest-- Returns:
- Result of the GetActionRecommendations operation returned by the service.
- Throws:
InvalidInputException- Provide a valid value for the field or parameter.ResourceNotFoundException- The specified resource does not exist.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.PersonalizeRuntimeException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getActionRecommendations
default GetActionRecommendationsResponse getActionRecommendations(Consumer<GetActionRecommendationsRequest.Builder> getActionRecommendationsRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, PersonalizeRuntimeException
Returns a list of recommended actions in sorted in descending order by prediction score. Use the
GetActionRecommendationsAPI 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.
This is a convenience which creates an instance of the
GetActionRecommendationsRequest.Builderavoiding the need to create one manually viaGetActionRecommendationsRequest.builder()- Parameters:
getActionRecommendationsRequest- AConsumerthat will call methods onGetActionRecommendationsRequest.Builderto create a request.- Returns:
- Result of the GetActionRecommendations operation returned by the service.
- Throws:
InvalidInputException- Provide a valid value for the field or parameter.ResourceNotFoundException- The specified resource does not exist.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.PersonalizeRuntimeException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getPersonalizedRanking
default GetPersonalizedRankingResponse getPersonalizedRanking(GetPersonalizedRankingRequest getPersonalizedRankingRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, PersonalizeRuntimeException
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.
The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING.
- Parameters:
getPersonalizedRankingRequest-- Returns:
- Result of the GetPersonalizedRanking operation returned by the service.
- Throws:
InvalidInputException- Provide a valid value for the field or parameter.ResourceNotFoundException- The specified resource does not exist.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.PersonalizeRuntimeException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getPersonalizedRanking
default GetPersonalizedRankingResponse getPersonalizedRanking(Consumer<GetPersonalizedRankingRequest.Builder> getPersonalizedRankingRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, PersonalizeRuntimeException
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.
The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING.
This is a convenience which creates an instance of the
GetPersonalizedRankingRequest.Builderavoiding the need to create one manually viaGetPersonalizedRankingRequest.builder()- Parameters:
getPersonalizedRankingRequest- AConsumerthat will call methods onGetPersonalizedRankingRequest.Builderto create a request.- Returns:
- Result of the GetPersonalizedRanking operation returned by the service.
- Throws:
InvalidInputException- Provide a valid value for the field or parameter.ResourceNotFoundException- The specified resource does not exist.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.PersonalizeRuntimeException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getRecommendations
default GetRecommendationsResponse getRecommendations(GetRecommendationsRequest getRecommendationsRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, PersonalizeRuntimeException
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
Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
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.
- Parameters:
getRecommendationsRequest-- Returns:
- Result of the GetRecommendations operation returned by the service.
- Throws:
InvalidInputException- Provide a valid value for the field or parameter.ResourceNotFoundException- The specified resource does not exist.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.PersonalizeRuntimeException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
-
getRecommendations
default GetRecommendationsResponse getRecommendations(Consumer<GetRecommendationsRequest.Builder> getRecommendationsRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, PersonalizeRuntimeException
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
Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
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.
This is a convenience which creates an instance of the
GetRecommendationsRequest.Builderavoiding the need to create one manually viaGetRecommendationsRequest.builder()- Parameters:
getRecommendationsRequest- AConsumerthat will call methods onGetRecommendationsRequest.Builderto create a request.- Returns:
- Result of the GetRecommendations operation returned by the service.
- Throws:
InvalidInputException- Provide a valid value for the field or parameter.ResourceNotFoundException- The specified resource does not exist.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.PersonalizeRuntimeException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
-
create
static PersonalizeRuntimeClient create()
Create aPersonalizeRuntimeClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static PersonalizeRuntimeClientBuilder builder()
Create a builder that can be used to configure and create aPersonalizeRuntimeClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default PersonalizeRuntimeServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-