Skip to content

Commit 127aebf

Browse files
author
AWS
committed
Amazon Personalize Events Update: Adds new APIs to write item and user records to Datasets.
1 parent 4e4bddf commit 127aebf

File tree

2 files changed

+134
-1
lines changed

2 files changed

+134
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Personalize Events",
4+
"description": "Adds new APIs to write item and user records to Datasets."
5+
}

services/personalizeevents/src/main/resources/codegen-resources/service-2.json

Lines changed: 129 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,40 @@
2323
{"shape":"InvalidInputException"}
2424
],
2525
"documentation":"<p>Records user interaction event data. For more information see <a>event-record-api</a>.</p>"
26+
},
27+
"PutItems":{
28+
"name":"PutItems",
29+
"http":{
30+
"method":"POST",
31+
"requestUri":"/items"
32+
},
33+
"input":{"shape":"PutItemsRequest"},
34+
"errors":[
35+
{"shape":"InvalidInputException"},
36+
{"shape":"ResourceNotFoundException"}
37+
],
38+
"documentation":"<p>Adds one or more items to an Items dataset. For more information see <a>importing-items</a>.</p>"
39+
},
40+
"PutUsers":{
41+
"name":"PutUsers",
42+
"http":{
43+
"method":"POST",
44+
"requestUri":"/users"
45+
},
46+
"input":{"shape":"PutUsersRequest"},
47+
"errors":[
48+
{"shape":"InvalidInputException"},
49+
{"shape":"ResourceNotFoundException"}
50+
],
51+
"documentation":"<p>Adds one or more users to a Users dataset. For more information see <a>importing-users</a>.</p>"
2652
}
2753
},
2854
"shapes":{
55+
"Arn":{
56+
"type":"string",
57+
"max":256,
58+
"pattern":"arn:([a-z\\d-]+):personalize:.*:.*:.+"
59+
},
2960
"Date":{"type":"timestamp"},
3061
"ErrorMessage":{"type":"string"},
3162
"Event":{
@@ -41,7 +72,7 @@
4172
},
4273
"eventType":{
4374
"shape":"StringType",
44-
"documentation":"<p>The type of event. This property corresponds to the <code>EVENT_TYPE</code> field of the Interactions schema.</p>"
75+
"documentation":"<p>The type of event, such as click or download. This property corresponds to the <code>EVENT_TYPE</code> field of your Interactions schema and depends on the types of events you are tracking.</p>"
4576
},
4677
"eventValue":{
4778
"shape":"FloatType",
@@ -98,11 +129,38 @@
98129
"error":{"httpStatusCode":400},
99130
"exception":true
100131
},
132+
"Item":{
133+
"type":"structure",
134+
"required":["itemId"],
135+
"members":{
136+
"itemId":{
137+
"shape":"StringType",
138+
"documentation":"<p>The ID associated with the item.</p>"
139+
},
140+
"properties":{
141+
"shape":"ItemProperties",
142+
"documentation":"<p>A string map of item-specific metadata. Each element in the map consists of a key-value pair. For example, </p> <p> <code>{\"numberOfRatings\": \"12\"}</code> </p> <p>The keys use camel case names that match the fields in the Items schema. In the above example, the <code>numberOfRatings</code> would match the 'NUMBER_OF_RATINGS' field defined in the Items schema.</p>",
143+
"jsonvalue":true
144+
}
145+
},
146+
"documentation":"<p>Represents item metadata added to an Items dataset using the <code>PutItems</code> API.</p>"
147+
},
101148
"ItemId":{
102149
"type":"string",
103150
"max":256,
104151
"min":1
105152
},
153+
"ItemList":{
154+
"type":"list",
155+
"member":{"shape":"Item"},
156+
"max":10,
157+
"min":1
158+
},
159+
"ItemProperties":{
160+
"type":"string",
161+
"max":1024,
162+
"min":1
163+
},
106164
"PutEventsRequest":{
107165
"type":"structure",
108166
"required":[
@@ -129,20 +187,90 @@
129187
}
130188
}
131189
},
190+
"PutItemsRequest":{
191+
"type":"structure",
192+
"required":[
193+
"datasetArn",
194+
"items"
195+
],
196+
"members":{
197+
"datasetArn":{
198+
"shape":"Arn",
199+
"documentation":"<p>The Amazon Resource Number (ARN) of the Items dataset you are adding the item or items to.</p>"
200+
},
201+
"items":{
202+
"shape":"ItemList",
203+
"documentation":"<p>A list of item data.</p>"
204+
}
205+
}
206+
},
207+
"PutUsersRequest":{
208+
"type":"structure",
209+
"required":[
210+
"datasetArn",
211+
"users"
212+
],
213+
"members":{
214+
"datasetArn":{
215+
"shape":"Arn",
216+
"documentation":"<p>The Amazon Resource Number (ARN) of the Users dataset you are adding the user or users to.</p>"
217+
},
218+
"users":{
219+
"shape":"UserList",
220+
"documentation":"<p>A list of user data.</p>"
221+
}
222+
}
223+
},
132224
"RecommendationId":{
133225
"type":"string",
134226
"max":40,
135227
"min":1
136228
},
229+
"ResourceNotFoundException":{
230+
"type":"structure",
231+
"members":{
232+
"message":{"shape":"ErrorMessage"}
233+
},
234+
"documentation":"<p>Could not find the specified resource.</p>",
235+
"error":{"httpStatusCode":404},
236+
"exception":true
237+
},
137238
"StringType":{
138239
"type":"string",
139240
"max":256,
140241
"min":1
141242
},
243+
"User":{
244+
"type":"structure",
245+
"required":["userId"],
246+
"members":{
247+
"userId":{
248+
"shape":"StringType",
249+
"documentation":"<p>The ID associated with the user.</p>"
250+
},
251+
"properties":{
252+
"shape":"UserProperties",
253+
"documentation":"<p>A string map of user-specific metadata. Each element in the map consists of a key-value pair. For example, </p> <p> <code>{\"numberOfVideosWatched\": \"45\"}</code> </p> <p>The keys use camel case names that match the fields in the Users schema. In the above example, the <code>numberOfVideosWatched</code> would match the 'NUMBER_OF_VIDEOS_WATCHED' field defined in the Users schema.</p>",
254+
"jsonvalue":true
255+
}
256+
},
257+
"documentation":"<p>Represents user metadata added to a Users dataset using the <code>PutUsers</code> API.</p>"
258+
},
142259
"UserId":{
143260
"type":"string",
144261
"max":256,
145262
"min":1
263+
},
264+
"UserList":{
265+
"type":"list",
266+
"member":{"shape":"User"},
267+
"max":10,
268+
"min":1
269+
},
270+
"UserProperties":{
271+
"type":"string",
272+
"max":1024,
273+
"min":1
146274
}
147275
},
148276
"documentation":"<p>Amazon Personalize can consume real-time user event data, such as <i>stream</i> or <i>click</i> data, and use it for model training either alone or combined with historical data. For more information see <a>recording-events</a>.</p>"

0 commit comments

Comments
 (0)