{ "smithy": "1.0", "metadata": { "suppressions": [ { "id": "HttpMethodSemantics", "namespace": "*" }, { "id": "HttpResponseCodeSemantics", "namespace": "*" }, { "id": "PaginatedTrait", "namespace": "*" }, { "id": "HttpHeaderTrait", "namespace": "*" }, { "id": "HttpUriConflict", "namespace": "*" }, { "id": "Service", "namespace": "*" } ] }, "shapes": { "com.amazonaws.personalizeruntime#AmazonPersonalizeRuntime": { "type": "service", "version": "2018-05-22", "operations": [ { "target": "com.amazonaws.personalizeruntime#GetPersonalizedRanking" }, { "target": "com.amazonaws.personalizeruntime#GetRecommendations" } ], "traits": { "aws.api#service": { "sdkId": "Personalize Runtime", "arnNamespace": "personalize", "cloudFormationName": "PersonalizeRuntime", "cloudTrailEventSource": "personalizeruntime.amazonaws.com", "endpointPrefix": "personalize-runtime" }, "aws.auth#sigv4": { "name": "personalize" }, "aws.protocols#restJson1": {}, "smithy.api#documentation": "

", "smithy.api#title": "Amazon Personalize Runtime" } }, "com.amazonaws.personalizeruntime#Arn": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 256 }, "smithy.api#pattern": "arn:([a-z\\d-]+):personalize:.*:.*:.+" } }, "com.amazonaws.personalizeruntime#AttributeName": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 150 }, "smithy.api#pattern": "[A-Za-z\\d_]+" } }, "com.amazonaws.personalizeruntime#AttributeValue": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 1000 }, "smithy.api#sensitive": {} } }, "com.amazonaws.personalizeruntime#Context": { "type": "map", "key": { "target": "com.amazonaws.personalizeruntime#AttributeName" }, "value": { "target": "com.amazonaws.personalizeruntime#AttributeValue" }, "traits": { "smithy.api#length": { "min": 0, "max": 150 } } }, "com.amazonaws.personalizeruntime#ErrorMessage": { "type": "string" }, "com.amazonaws.personalizeruntime#FilterAttributeName": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 50 }, "smithy.api#pattern": "[A-Za-z0-9_]+" } }, "com.amazonaws.personalizeruntime#FilterAttributeValue": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 1000 }, "smithy.api#sensitive": {} } }, "com.amazonaws.personalizeruntime#FilterValues": { "type": "map", "key": { "target": "com.amazonaws.personalizeruntime#FilterAttributeName" }, "value": { "target": "com.amazonaws.personalizeruntime#FilterAttributeValue" }, "traits": { "smithy.api#length": { "min": 0, "max": 25 } } }, "com.amazonaws.personalizeruntime#GetPersonalizedRanking": { "type": "operation", "input": { "target": "com.amazonaws.personalizeruntime#GetPersonalizedRankingRequest" }, "output": { "target": "com.amazonaws.personalizeruntime#GetPersonalizedRankingResponse" }, "errors": [ { "target": "com.amazonaws.personalizeruntime#InvalidInputException" }, { "target": "com.amazonaws.personalizeruntime#ResourceNotFoundException" } ], "traits": { "smithy.api#documentation": "

Re-ranks a list of recommended items for the given user. The first item in the list is\n deemed the most likely item to be of interest to the user.

\n \n

The solution backing the campaign must have been created using a recipe of type\n PERSONALIZED_RANKING.

\n
", "smithy.api#http": { "method": "POST", "uri": "/personalize-ranking", "code": 200 }, "smithy.api#idempotent": {} } }, "com.amazonaws.personalizeruntime#GetPersonalizedRankingRequest": { "type": "structure", "members": { "campaignArn": { "target": "com.amazonaws.personalizeruntime#Arn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the campaign to use for generating the personalized\n ranking.

", "smithy.api#required": {} } }, "inputList": { "target": "com.amazonaws.personalizeruntime#InputList", "traits": { "smithy.api#documentation": "

A list of items (by itemId) to rank. If an item was not included in the training dataset,\n the item is appended to the end of the reranked list. The maximum is 500.

", "smithy.api#required": {} } }, "userId": { "target": "com.amazonaws.personalizeruntime#UserID", "traits": { "smithy.api#documentation": "

The user for which you want the campaign to provide a personalized ranking.

", "smithy.api#required": {} } }, "context": { "target": "com.amazonaws.personalizeruntime#Context", "traits": { "smithy.api#documentation": "

The contextual metadata to use when getting recommendations. Contextual metadata includes\n any interaction information that might be relevant when getting a user's recommendations, such\n as the user's current location or device type.

" } }, "filterArn": { "target": "com.amazonaws.personalizeruntime#Arn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for a given user. \n For more information, see\n Filtering Recommendations.

" } }, "filterValues": { "target": "com.amazonaws.personalizeruntime#FilterValues", "traits": { "smithy.api#documentation": "

The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case)\n as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.\n

\n

For filter expressions that use an INCLUDE element to include items,\n you must provide values for all parameters that are defined in the expression. For\n filters with expressions that use an EXCLUDE element to exclude items, you\n can omit the filter-values.In this case, Amazon Personalize doesn't use that portion of\n the expression to filter recommendations.

\n

For more information, see\n Filtering Recommendations.

" } } } }, "com.amazonaws.personalizeruntime#GetPersonalizedRankingResponse": { "type": "structure", "members": { "personalizedRanking": { "target": "com.amazonaws.personalizeruntime#ItemList", "traits": { "smithy.api#documentation": "

A list of items in order of most likely interest to the user. The maximum is 500.

" } }, "recommendationId": { "target": "com.amazonaws.personalizeruntime#RecommendationID", "traits": { "smithy.api#documentation": "

The ID of the recommendation.

" } } } }, "com.amazonaws.personalizeruntime#GetRecommendations": { "type": "operation", "input": { "target": "com.amazonaws.personalizeruntime#GetRecommendationsRequest" }, "output": { "target": "com.amazonaws.personalizeruntime#GetRecommendationsResponse" }, "errors": [ { "target": "com.amazonaws.personalizeruntime#InvalidInputException" }, { "target": "com.amazonaws.personalizeruntime#ResourceNotFoundException" } ], "traits": { "smithy.api#documentation": "

Returns a list of recommended items. The required input depends on the recipe type used to\n create the solution backing the campaign, as follows:

\n \n \n

Campaigns that are backed by a solution created using a recipe of type\n PERSONALIZED_RANKING use the API.

\n
", "smithy.api#http": { "method": "POST", "uri": "/recommendations", "code": 200 }, "smithy.api#idempotent": {} } }, "com.amazonaws.personalizeruntime#GetRecommendationsRequest": { "type": "structure", "members": { "campaignArn": { "target": "com.amazonaws.personalizeruntime#Arn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the campaign to use for getting recommendations.

", "smithy.api#required": {} } }, "itemId": { "target": "com.amazonaws.personalizeruntime#ItemID", "traits": { "smithy.api#documentation": "

The item ID to provide recommendations for.

\n

Required for RELATED_ITEMS recipe type.

" } }, "userId": { "target": "com.amazonaws.personalizeruntime#UserID", "traits": { "smithy.api#documentation": "

The user ID to provide recommendations for.

\n

Required for USER_PERSONALIZATION recipe type.

" } }, "numResults": { "target": "com.amazonaws.personalizeruntime#NumResults", "traits": { "smithy.api#documentation": "

The number of results to return. The default is 25. The maximum is 500.

" } }, "context": { "target": "com.amazonaws.personalizeruntime#Context", "traits": { "smithy.api#documentation": "

The contextual metadata to use when getting recommendations. Contextual metadata includes\n any interaction information that might be relevant when getting a user's recommendations, such\n as the user's current location or device type.

" } }, "filterArn": { "target": "com.amazonaws.personalizeruntime#Arn", "traits": { "smithy.api#documentation": "

The ARN of the filter to apply to the returned recommendations. For more information, see\n Filtering Recommendations.

\n

When using this parameter, be sure the filter resource is ACTIVE.

" } }, "filterValues": { "target": "com.amazonaws.personalizeruntime#FilterValues", "traits": { "smithy.api#documentation": "

The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case)\n as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.\n

\n

For filter expressions that use an INCLUDE element to include items,\n you must provide values for all parameters that are defined in the expression. For\n filters with expressions that use an EXCLUDE element to exclude items, you\n can omit the filter-values.In this case, Amazon Personalize doesn't use that portion of\n the expression to filter recommendations.

\n

For more information, see\n Filtering Recommendations.

" } } } }, "com.amazonaws.personalizeruntime#GetRecommendationsResponse": { "type": "structure", "members": { "itemList": { "target": "com.amazonaws.personalizeruntime#ItemList", "traits": { "smithy.api#documentation": "

A list of recommendations sorted in ascending order by prediction score. There can be a\n maximum of 500 items in the list.

" } }, "recommendationId": { "target": "com.amazonaws.personalizeruntime#RecommendationID", "traits": { "smithy.api#documentation": "

The ID of the recommendation.

" } } } }, "com.amazonaws.personalizeruntime#InputList": { "type": "list", "member": { "target": "com.amazonaws.personalizeruntime#ItemID" } }, "com.amazonaws.personalizeruntime#InvalidInputException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.personalizeruntime#ErrorMessage" } }, "traits": { "smithy.api#documentation": "

Provide a valid value for the field or parameter.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.personalizeruntime#ItemID": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 256 } } }, "com.amazonaws.personalizeruntime#ItemList": { "type": "list", "member": { "target": "com.amazonaws.personalizeruntime#PredictedItem" } }, "com.amazonaws.personalizeruntime#NumResults": { "type": "integer", "traits": { "smithy.api#range": { "min": 0 } } }, "com.amazonaws.personalizeruntime#PredictedItem": { "type": "structure", "members": { "itemId": { "target": "com.amazonaws.personalizeruntime#ItemID", "traits": { "smithy.api#documentation": "

The recommended item ID.

" } }, "score": { "target": "com.amazonaws.personalizeruntime#Score", "traits": { "smithy.api#documentation": "

A numeric representation of the model's certainty that the item will be the next user\n selection. For more information on scoring logic, see how-scores-work.

" } } }, "traits": { "smithy.api#documentation": "

An object that identifies an item.

\n

The and APIs return a list of\n PredictedItems.

" } }, "com.amazonaws.personalizeruntime#RecommendationID": { "type": "string" }, "com.amazonaws.personalizeruntime#ResourceNotFoundException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.personalizeruntime#ErrorMessage" } }, "traits": { "smithy.api#documentation": "

The specified resource does not exist.

", "smithy.api#error": "client", "smithy.api#httpError": 404 } }, "com.amazonaws.personalizeruntime#Score": { "type": "double", "traits": { "smithy.api#box": {} } }, "com.amazonaws.personalizeruntime#UserID": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 256 } } } } }