PersonalizeRuntime
public struct PersonalizeRuntime
Client object for interacting with AWS PersonalizeRuntime service.
-
Undocumented
Declaration
Swift
public let client: AWSClient
-
Initialize the PersonalizeRuntime client
Declaration
Swift
public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared)
Parameters
accessKeyId
Public access key provided by AWS
secretAccessKey
Private access key provided by AWS
sessionToken
Token provided by STS.AssumeRole() which allows access to another AWS account
region
Region of server you want to communicate with
endpoint
Custom endpoint URL to use instead of standard AWS servers
middlewares
Array of middlewares to apply to requests and responses
eventLoopGroupProvider
EventLoopGroup to use. Use
useAWSClientShared
if the client shall manage its own EventLoopGroup.
-
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.
Declaration
Swift
public func getPersonalizedRanking(_ input: GetPersonalizedRankingRequest) -> EventLoopFuture<GetPersonalizedRankingResponse>
-
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.
Declaration
Swift
public func getRecommendations(_ input: GetRecommendationsRequest) -> EventLoopFuture<GetRecommendationsResponse>