listNotifications method
Lists all Amazon DataZone notifications.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter domainIdentifier :
The identifier of the Amazon DataZone domain.
Parameter type :
The type of notifications.
Parameter afterTimestamp :
The time after which you want to list notifications.
Parameter beforeTimestamp :
The time before which you want to list notifications.
Parameter maxResults :
The maximum number of notifications to return in a single call to
ListNotifications. When the number of notifications to be
listed is greater than the value of MaxResults, the response
contains a NextToken value that you can use in a subsequent
call to ListNotifications to list the next set of
notifications.
Parameter nextToken :
When the number of notifications is greater than the default value for the
MaxResults parameter, or if you explicitly specify a value
for MaxResults that is less than the number of notifications,
the response includes a pagination token named NextToken. You
can specify this NextToken value in a subsequent call to
ListNotifications to list the next set of notifications.
Parameter subjects :
The subjects of notifications.
Parameter taskStatus :
The task status of notifications.
Implementation
Future<ListNotificationsOutput> listNotifications({
required String domainIdentifier,
required NotificationType type,
DateTime? afterTimestamp,
DateTime? beforeTimestamp,
int? maxResults,
String? nextToken,
List<String>? subjects,
TaskStatus? taskStatus,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
'type': [type.value],
if (afterTimestamp != null)
'afterTimestamp': [_s.iso8601ToJson(afterTimestamp).toString()],
if (beforeTimestamp != null)
'beforeTimestamp': [_s.iso8601ToJson(beforeTimestamp).toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (subjects != null) 'subjects': subjects,
if (taskStatus != null) 'taskStatus': [taskStatus.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/notifications',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListNotificationsOutput.fromJson(response);
}