listAccountActivities method
Returns a list of activities that are available. This operation supports pagination and filtering by status.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter filterActivityStatuses :
The activity status filter. This field can be used to filter the response
by activities status.
Parameter languageCode :
The language code used to return translated titles.
Parameter maxResults :
The maximum number of items to return for this request. To get the next
page of items, make another request with the token returned in the output.
Parameter nextToken :
A token from a previous paginated response. If this is specified, the
response includes records beginning from this token (inclusive), up to the
number specified by maxResults.
Implementation
Future<ListAccountActivitiesResponse> listAccountActivities({
List<ActivityStatus>? filterActivityStatuses,
LanguageCode? languageCode,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSFreeTierService.ListAccountActivities'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filterActivityStatuses != null)
'filterActivityStatuses':
filterActivityStatuses.map((e) => e.value).toList(),
if (languageCode != null) 'languageCode': languageCode.value,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListAccountActivitiesResponse.fromJson(jsonResponse.body);
}