@Generated(value="software.amazon.awssdk:codegen") public interface PersonalizeRuntimeClient extends SdkClient
builder()
method.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider . |
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
static PersonalizeRuntimeClientBuilder |
builder()
Create a builder that can be used to configure and create a
PersonalizeRuntimeClient . |
static PersonalizeRuntimeClient |
create()
Create a
PersonalizeRuntimeClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default GetPersonalizedRankingResponse |
getPersonalizedRanking(Consumer<GetPersonalizedRankingRequest.Builder> getPersonalizedRankingRequest)
Re-ranks a list of recommended items for the given user.
|
default GetPersonalizedRankingResponse |
getPersonalizedRanking(GetPersonalizedRankingRequest getPersonalizedRankingRequest)
Re-ranks a list of recommended items for the given user.
|
default GetRecommendationsResponse |
getRecommendations(Consumer<GetRecommendationsRequest.Builder> getRecommendationsRequest)
Returns a list of recommended items.
|
default GetRecommendationsResponse |
getRecommendations(GetRecommendationsRequest getRecommendationsRequest)
Returns a list of recommended items.
|
static ServiceMetadata |
serviceMetadata() |
serviceName
close
static final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider
.static PersonalizeRuntimeClient create()
PersonalizeRuntimeClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static PersonalizeRuntimeClientBuilder builder()
PersonalizeRuntimeClient
.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.
getPersonalizedRankingRequest
- 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
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.Builder
avoiding the
need to create one manually via GetPersonalizedRankingRequest.builder()
getPersonalizedRankingRequest
- A Consumer
that will call methods on GetPersonalizedRankingRequest.Builder
to create a
request.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
default GetRecommendationsResponse getRecommendations(GetRecommendationsRequest getRecommendationsRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, PersonalizeRuntimeException
Returns a list of recommended items. The required input depends on the recipe type used to create the solution backing the campaign, as follows:
RELATED_ITEMS - itemId
required, userId
not used
USER_PERSONALIZATION - itemId
optional, userId
required
Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
getRecommendationsRequest
- 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
default GetRecommendationsResponse getRecommendations(Consumer<GetRecommendationsRequest.Builder> getRecommendationsRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, PersonalizeRuntimeException
Returns a list of recommended items. The required input depends on the recipe type used to create the solution backing the campaign, as follows:
RELATED_ITEMS - itemId
required, userId
not used
USER_PERSONALIZATION - itemId
optional, userId
required
Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
This is a convenience which creates an instance of the GetRecommendationsRequest.Builder
avoiding the
need to create one manually via GetRecommendationsRequest.builder()
getRecommendationsRequest
- A Consumer
that will call methods on GetRecommendationsRequest.Builder
to create a
request.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
static ServiceMetadata serviceMetadata()