CreateEventTracker
Creates an event tracker that you use when adding event data to a specified dataset group using the PutEvents API.
Note
Only one event tracker can be associated with a dataset group. You will get
an error if you call CreateEventTracker
using the same dataset group as an
existing event tracker.
When you create an event tracker, the response includes a tracking ID, which you pass as a parameter when you use the PutEvents operation. Amazon Personalize then appends the event data to the Item interactions dataset of the dataset group you specify in your event tracker.
The event tracker can be in one of the following states:
-
CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
-
DELETE PENDING > DELETE IN_PROGRESS
To get the status of the event tracker, call DescribeEventTracker.
Note
The event tracker must be in the ACTIVE state before using the tracking ID.
Related APIs
Request Syntax
{
"datasetGroupArn": "string
",
"name": "string
",
"tags": [
{
"tagKey": "string
",
"tagValue": "string
"
}
]
}
Request Parameters
The request accepts the following data in JSON format.
- datasetGroupArn
-
The Amazon Resource Name (ARN) of the dataset group that receives the event data.
Type: String
Length Constraints: Maximum length of 256.
Pattern:
arn:([a-z\d-]+):personalize:.*:.*:.+
Required: Yes
- name
-
The name for the event tracker.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 63.
Pattern:
^[a-zA-Z0-9][a-zA-Z0-9\-_]*
Required: Yes
-
A list of tags to apply to the event tracker.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 200 items.
Required: No
Response Syntax
{
"eventTrackerArn": "string",
"trackingId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- eventTrackerArn
-
The ARN of the event tracker.
Type: String
Length Constraints: Maximum length of 256.
Pattern:
arn:([a-z\d-]+):personalize:.*:.*:.+
- trackingId
-
The ID of the event tracker. Include this ID in requests to the PutEvents API.
Type: String
Length Constraints: Maximum length of 256.
Errors
- InvalidInputException
-
Provide a valid value for the field or parameter.
HTTP Status Code: 400
- LimitExceededException
-
The limit on the number of requests per second has been exceeded.
HTTP Status Code: 400
- ResourceAlreadyExistsException
-
The specified resource already exists.
HTTP Status Code: 400
- ResourceInUseException
-
The specified resource is in use.
HTTP Status Code: 400
- ResourceNotFoundException
-
Could not find the specified resource.
HTTP Status Code: 400
- TooManyTagsException
-
You have exceeded the maximum number of tags you can apply to this resource.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: