1{
2    "smithy": "1.0",
3    "metadata": {
4        "suppressions": [
5            {
6                "id": "HttpMethodSemantics",
7                "namespace": "*"
8            },
9            {
10                "id": "HttpResponseCodeSemantics",
11                "namespace": "*"
12            },
13            {
14                "id": "PaginatedTrait",
15                "namespace": "*"
16            },
17            {
18                "id": "HttpHeaderTrait",
19                "namespace": "*"
20            },
21            {
22                "id": "HttpUriConflict",
23                "namespace": "*"
24            },
25            {
26                "id": "Service",
27                "namespace": "*"
28            }
29        ]
30    },
31    "shapes": {
32        "com.amazonaws.personalizeruntime#AmazonPersonalizeRuntime": {
33            "type": "service",
34            "version": "2018-05-22",
35            "operations": [
36                {
37                    "target": "com.amazonaws.personalizeruntime#GetPersonalizedRanking"
38                },
39                {
40                    "target": "com.amazonaws.personalizeruntime#GetRecommendations"
41                }
42            ],
43            "traits": {
44                "aws.api#service": {
45                    "sdkId": "Personalize Runtime",
46                    "arnNamespace": "personalize",
47                    "cloudFormationName": "PersonalizeRuntime",
48                    "cloudTrailEventSource": "personalizeruntime.amazonaws.com",
49                    "endpointPrefix": "personalize-runtime"
50                },
51                "aws.auth#sigv4": {
52                    "name": "personalize"
53                },
54                "aws.protocols#restJson1": {},
55                "smithy.api#documentation": "<p></p>",
56                "smithy.api#title": "Amazon Personalize Runtime"
57            }
58        },
59        "com.amazonaws.personalizeruntime#Arn": {
60            "type": "string",
61            "traits": {
62                "smithy.api#length": {
63                    "min": 0,
64                    "max": 256
65                },
66                "smithy.api#pattern": "arn:([a-z\\d-]+):personalize:.*:.*:.+"
67            }
68        },
69        "com.amazonaws.personalizeruntime#AttributeName": {
70            "type": "string",
71            "traits": {
72                "smithy.api#length": {
73                    "min": 0,
74                    "max": 150
75                },
76                "smithy.api#pattern": "[A-Za-z\\d_]+"
77            }
78        },
79        "com.amazonaws.personalizeruntime#AttributeValue": {
80            "type": "string",
81            "traits": {
82                "smithy.api#length": {
83                    "min": 0,
84                    "max": 1000
85                },
86                "smithy.api#sensitive": {}
87            }
88        },
89        "com.amazonaws.personalizeruntime#Context": {
90            "type": "map",
91            "key": {
92                "target": "com.amazonaws.personalizeruntime#AttributeName"
93            },
94            "value": {
95                "target": "com.amazonaws.personalizeruntime#AttributeValue"
96            },
97            "traits": {
98                "smithy.api#length": {
99                    "min": 0,
100                    "max": 150
101                }
102            }
103        },
104        "com.amazonaws.personalizeruntime#ErrorMessage": {
105            "type": "string"
106        },
107        "com.amazonaws.personalizeruntime#FilterAttributeName": {
108            "type": "string",
109            "traits": {
110                "smithy.api#length": {
111                    "min": 0,
112                    "max": 50
113                },
114                "smithy.api#pattern": "[A-Za-z0-9_]+"
115            }
116        },
117        "com.amazonaws.personalizeruntime#FilterAttributeValue": {
118            "type": "string",
119            "traits": {
120                "smithy.api#length": {
121                    "min": 0,
122                    "max": 1000
123                },
124                "smithy.api#sensitive": {}
125            }
126        },
127        "com.amazonaws.personalizeruntime#FilterValues": {
128            "type": "map",
129            "key": {
130                "target": "com.amazonaws.personalizeruntime#FilterAttributeName"
131            },
132            "value": {
133                "target": "com.amazonaws.personalizeruntime#FilterAttributeValue"
134            },
135            "traits": {
136                "smithy.api#length": {
137                    "min": 0,
138                    "max": 25
139                }
140            }
141        },
142        "com.amazonaws.personalizeruntime#GetPersonalizedRanking": {
143            "type": "operation",
144            "input": {
145                "target": "com.amazonaws.personalizeruntime#GetPersonalizedRankingRequest"
146            },
147            "output": {
148                "target": "com.amazonaws.personalizeruntime#GetPersonalizedRankingResponse"
149            },
150            "errors": [
151                {
152                    "target": "com.amazonaws.personalizeruntime#InvalidInputException"
153                },
154                {
155                    "target": "com.amazonaws.personalizeruntime#ResourceNotFoundException"
156                }
157            ],
158            "traits": {
159                "smithy.api#documentation": "<p>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.</p>\n         <note>\n            <p>The solution backing the campaign must have been created using a recipe of type\n        PERSONALIZED_RANKING.</p>\n         </note>",
160                "smithy.api#http": {
161                    "method": "POST",
162                    "uri": "/personalize-ranking",
163                    "code": 200
164                },
165                "smithy.api#idempotent": {}
166            }
167        },
168        "com.amazonaws.personalizeruntime#GetPersonalizedRankingRequest": {
169            "type": "structure",
170            "members": {
171                "campaignArn": {
172                    "target": "com.amazonaws.personalizeruntime#Arn",
173                    "traits": {
174                        "smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the campaign to use for generating the personalized\n      ranking.</p>",
175                        "smithy.api#required": {}
176                    }
177                },
178                "inputList": {
179                    "target": "com.amazonaws.personalizeruntime#InputList",
180                    "traits": {
181                        "smithy.api#documentation": "<p>A list of items (by <code>itemId</code>) 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.</p>",
182                        "smithy.api#required": {}
183                    }
184                },
185                "userId": {
186                    "target": "com.amazonaws.personalizeruntime#UserID",
187                    "traits": {
188                        "smithy.api#documentation": "<p>The user for which you want the campaign to provide a personalized ranking.</p>",
189                        "smithy.api#required": {}
190                    }
191                },
192                "context": {
193                    "target": "com.amazonaws.personalizeruntime#Context",
194                    "traits": {
195                        "smithy.api#documentation": "<p>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.</p>"
196                    }
197                },
198                "filterArn": {
199                    "target": "com.amazonaws.personalizeruntime#Arn",
200                    "traits": {
201                        "smithy.api#documentation": "<p>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      <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/filter.html\">Filtering Recommendations</a>.</p>"
202                    }
203                },
204                "filterValues": {
205                    "target": "com.amazonaws.personalizeruntime#FilterValues",
206                    "traits": {
207                        "smithy.api#documentation": "<p>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    </p> \n         <p>For filter expressions that use an <code>INCLUDE</code> 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 <code>EXCLUDE</code> element to exclude items, you\n      can omit the <code>filter-values</code>.In this case, Amazon Personalize doesn't use that portion of\n      the expression to filter recommendations.</p>\n         <p>For more information, see\n      <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/filter.html\">Filtering Recommendations</a>.</p>"
208                    }
209                }
210            }
211        },
212        "com.amazonaws.personalizeruntime#GetPersonalizedRankingResponse": {
213            "type": "structure",
214            "members": {
215                "personalizedRanking": {
216                    "target": "com.amazonaws.personalizeruntime#ItemList",
217                    "traits": {
218                        "smithy.api#documentation": "<p>A list of items in order of most likely interest to the user. The maximum is 500.</p>"
219                    }
220                },
221                "recommendationId": {
222                    "target": "com.amazonaws.personalizeruntime#RecommendationID",
223                    "traits": {
224                        "smithy.api#documentation": "<p>The ID of the recommendation.</p>"
225                    }
226                }
227            }
228        },
229        "com.amazonaws.personalizeruntime#GetRecommendations": {
230            "type": "operation",
231            "input": {
232                "target": "com.amazonaws.personalizeruntime#GetRecommendationsRequest"
233            },
234            "output": {
235                "target": "com.amazonaws.personalizeruntime#GetRecommendationsResponse"
236            },
237            "errors": [
238                {
239                    "target": "com.amazonaws.personalizeruntime#InvalidInputException"
240                },
241                {
242                    "target": "com.amazonaws.personalizeruntime#ResourceNotFoundException"
243                }
244            ],
245            "traits": {
246                "smithy.api#documentation": "<p>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:</p>\n         <ul>\n            <li>\n               <p>RELATED_ITEMS - <code>itemId</code> required, <code>userId</code> not used</p>\n            </li>\n            <li>\n               <p>USER_PERSONALIZATION - <code>itemId</code> optional, <code>userId</code>\n          required</p>\n            </li>\n         </ul>\n         <note>\n            <p>Campaigns that are backed by a solution created using a recipe of type\n        PERSONALIZED_RANKING use the  API.</p>\n         </note>",
247                "smithy.api#http": {
248                    "method": "POST",
249                    "uri": "/recommendations",
250                    "code": 200
251                },
252                "smithy.api#idempotent": {}
253            }
254        },
255        "com.amazonaws.personalizeruntime#GetRecommendationsRequest": {
256            "type": "structure",
257            "members": {
258                "campaignArn": {
259                    "target": "com.amazonaws.personalizeruntime#Arn",
260                    "traits": {
261                        "smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the campaign to use for getting recommendations.</p>",
262                        "smithy.api#required": {}
263                    }
264                },
265                "itemId": {
266                    "target": "com.amazonaws.personalizeruntime#ItemID",
267                    "traits": {
268                        "smithy.api#documentation": "<p>The item ID to provide recommendations for.</p>\n         <p>Required for <code>RELATED_ITEMS</code> recipe type.</p>"
269                    }
270                },
271                "userId": {
272                    "target": "com.amazonaws.personalizeruntime#UserID",
273                    "traits": {
274                        "smithy.api#documentation": "<p>The user ID to provide recommendations for.</p>\n         <p>Required for <code>USER_PERSONALIZATION</code> recipe type.</p>"
275                    }
276                },
277                "numResults": {
278                    "target": "com.amazonaws.personalizeruntime#NumResults",
279                    "traits": {
280                        "smithy.api#documentation": "<p>The number of results to return. The default is 25. The maximum is 500.</p>"
281                    }
282                },
283                "context": {
284                    "target": "com.amazonaws.personalizeruntime#Context",
285                    "traits": {
286                        "smithy.api#documentation": "<p>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.</p>"
287                    }
288                },
289                "filterArn": {
290                    "target": "com.amazonaws.personalizeruntime#Arn",
291                    "traits": {
292                        "smithy.api#documentation": "<p>The ARN of the filter to apply to the returned recommendations. For more information, see\n      <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/filter.html\">Filtering Recommendations</a>.</p>\n         <p>When using this parameter, be sure the filter resource is <code>ACTIVE</code>.</p>"
293                    }
294                },
295                "filterValues": {
296                    "target": "com.amazonaws.personalizeruntime#FilterValues",
297                    "traits": {
298                        "smithy.api#documentation": "<p>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    </p> \n         <p>For filter expressions that use an <code>INCLUDE</code> 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 <code>EXCLUDE</code> element to exclude items, you\n      can omit the <code>filter-values</code>.In this case, Amazon Personalize doesn't use that portion of\n    the expression to filter recommendations.</p>\n         <p>For more information, see\n      <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/filter.html\">Filtering Recommendations</a>.</p>"
299                    }
300                }
301            }
302        },
303        "com.amazonaws.personalizeruntime#GetRecommendationsResponse": {
304            "type": "structure",
305            "members": {
306                "itemList": {
307                    "target": "com.amazonaws.personalizeruntime#ItemList",
308                    "traits": {
309                        "smithy.api#documentation": "<p>A list of recommendations sorted in ascending order by prediction score. There can be a\n      maximum of 500 items in the list.</p>"
310                    }
311                },
312                "recommendationId": {
313                    "target": "com.amazonaws.personalizeruntime#RecommendationID",
314                    "traits": {
315                        "smithy.api#documentation": "<p>The ID of the recommendation.</p>"
316                    }
317                }
318            }
319        },
320        "com.amazonaws.personalizeruntime#InputList": {
321            "type": "list",
322            "member": {
323                "target": "com.amazonaws.personalizeruntime#ItemID"
324            }
325        },
326        "com.amazonaws.personalizeruntime#InvalidInputException": {
327            "type": "structure",
328            "members": {
329                "message": {
330                    "target": "com.amazonaws.personalizeruntime#ErrorMessage"
331                }
332            },
333            "traits": {
334                "smithy.api#documentation": "<p>Provide a valid value for the field or parameter.</p>",
335                "smithy.api#error": "client",
336                "smithy.api#httpError": 400
337            }
338        },
339        "com.amazonaws.personalizeruntime#ItemID": {
340            "type": "string",
341            "traits": {
342                "smithy.api#length": {
343                    "min": 0,
344                    "max": 256
345                }
346            }
347        },
348        "com.amazonaws.personalizeruntime#ItemList": {
349            "type": "list",
350            "member": {
351                "target": "com.amazonaws.personalizeruntime#PredictedItem"
352            }
353        },
354        "com.amazonaws.personalizeruntime#NumResults": {
355            "type": "integer",
356            "traits": {
357                "smithy.api#range": {
358                    "min": 0
359                }
360            }
361        },
362        "com.amazonaws.personalizeruntime#PredictedItem": {
363            "type": "structure",
364            "members": {
365                "itemId": {
366                    "target": "com.amazonaws.personalizeruntime#ItemID",
367                    "traits": {
368                        "smithy.api#documentation": "<p>The recommended item ID.</p>"
369                    }
370                },
371                "score": {
372                    "target": "com.amazonaws.personalizeruntime#Score",
373                    "traits": {
374                        "smithy.api#documentation": "<p>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 <a>how-scores-work</a>.</p>"
375                    }
376                }
377            },
378            "traits": {
379                "smithy.api#documentation": "<p>An object that identifies an item.</p>\n         <p>The  and  APIs return a list of\n      <code>PredictedItem</code>s.</p>"
380            }
381        },
382        "com.amazonaws.personalizeruntime#RecommendationID": {
383            "type": "string"
384        },
385        "com.amazonaws.personalizeruntime#ResourceNotFoundException": {
386            "type": "structure",
387            "members": {
388                "message": {
389                    "target": "com.amazonaws.personalizeruntime#ErrorMessage"
390                }
391            },
392            "traits": {
393                "smithy.api#documentation": "<p>The specified resource does not exist.</p>",
394                "smithy.api#error": "client",
395                "smithy.api#httpError": 404
396            }
397        },
398        "com.amazonaws.personalizeruntime#Score": {
399            "type": "double",
400            "traits": {
401                "smithy.api#box": {}
402            }
403        },
404        "com.amazonaws.personalizeruntime#UserID": {
405            "type": "string",
406            "traits": {
407                "smithy.api#length": {
408                    "min": 0,
409                    "max": 256
410                }
411            }
412        }
413    }
414}
415