5.0.0 • Published 5 years ago
@datafire/amazonaws_personalize_runtime v5.0.0
@datafire/amazonaws_personalize_runtime
Client library for Amazon Personalize Runtime
Installation and Usage
npm install --save @datafire/amazonaws_personalize_runtime
let amazonaws_personalize_runtime = require('@datafire/amazonaws_personalize_runtime').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});
.then(data => {
console.log(data);
});
Description
Actions
GetPersonalizedRanking
amazonaws_personalize_runtime.GetPersonalizedRanking({
"campaignArn": "",
"inputList": [],
"userId": ""
}, context)
Input
- input
object
- campaignArn required
string
: The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. - context
object
: The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user's recommendations, such as the user's current location or device type. - filterArn
string
: The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for a given user. For more information, see Filtering Recommendations. - filterValues
object
: The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma. For filter expressions that use an INCLUDE element to include items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an EXCLUDE element to exclude items, you can omit the filter-values.In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations. For more information, see Filtering Recommendations. - inputList required
array
: A list of items (by itemId) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list. The maximum is 500.- items ItemID
- userId required
string
: The user for which you want the campaign to provide a personalized ranking.
- campaignArn required
Output
GetRecommendations
amazonaws_personalize_runtime.GetRecommendations({
"campaignArn": ""
}, context)
Input
- input
object
- campaignArn required
string
: The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. - context
object
: The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user's recommendations, such as the user's current location or device type. - filterArn
string
: The ARN of the filter to apply to the returned recommendations. For more information, see Filtering Recommendations. When using this parameter, be sure the filter resource is ACTIVE. - filterValues
object
: The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma. For filter expressions that use an INCLUDE element to include items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an EXCLUDE element to exclude items, you can omit the filter-values.In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations. For more information, see Filtering Recommendations. - itemId
string
: The item ID to provide recommendations for. Required for RELATED_ITEMS recipe type. - numResults
integer
: The number of results to return. The default is 25. The maximum is 500. - userId
string
: The user ID to provide recommendations for. Required for USER_PERSONALIZATION recipe type.
- campaignArn required
Output
- output GetRecommendationsResponse
Definitions
Arn
- Arn
string
AttributeName
- AttributeName
string
AttributeValue
- AttributeValue
string
Context
- Context
object
FilterAttributeName
- FilterAttributeName
string
FilterAttributeValue
- FilterAttributeValue
string
FilterValues
- FilterValues
object
GetPersonalizedRankingRequest
- GetPersonalizedRankingRequest
object
- campaignArn required
- context
- filterArn
- filterValues
- inputList required
- items ItemID
- userId required
GetPersonalizedRankingResponse
- GetPersonalizedRankingResponse
object
- personalizedRanking
- items PredictedItem
- recommendationId
- personalizedRanking
GetRecommendationsRequest
- GetRecommendationsRequest
object
- campaignArn required
- context
- filterArn
- filterValues
- itemId
- numResults
- userId
GetRecommendationsResponse
- GetRecommendationsResponse
object
- itemList
- items PredictedItem
- recommendationId
- itemList
InputList
- InputList
array
- items ItemID
InvalidInputException
ItemID
- ItemID
string
ItemList
- ItemList
array
- items PredictedItem
NumResults
- NumResults
integer
PredictedItem
- PredictedItem
object
: An object that identifies an item. The and APIs return a list of PredictedItems.- itemId
- score
RecommendationID
- RecommendationID
string
ResourceNotFoundException
Score
- Score
number
UserID
- UserID
string
5.0.0
5 years ago