listEventTrackers method
Returns the list of event trackers associated with the account. The response provides the properties for each event tracker, including the Amazon Resource Name (ARN) and tracking ID. For more information on event trackers, see CreateEventTracker.
May throw InvalidInputException. May throw InvalidNextTokenException.
Parameter datasetGroupArn
:
The ARN of a dataset group used to filter the response.
Parameter maxResults
:
The maximum number of event trackers to return.
Parameter nextToken
:
A token returned from the previous call to ListEventTrackers
for getting the next set of event trackers (if they exist).
Implementation
Future<ListEventTrackersResponse> listEventTrackers({
String? datasetGroupArn,
int? maxResults,
String? nextToken,
}) async {
_s.validateStringLength(
'datasetGroupArn',
datasetGroupArn,
0,
256,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
1300,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.ListEventTrackers'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (datasetGroupArn != null) 'datasetGroupArn': datasetGroupArn,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListEventTrackersResponse.fromJson(jsonResponse.body);
}