listManagedNotificationEvents method

Future<ListManagedNotificationEventsResponse> listManagedNotificationEvents({
  1. DateTime? endTime,
  2. LocaleCode? locale,
  3. int? maxResults,
  4. String? nextToken,
  5. String? organizationalUnitId,
  6. String? relatedAccount,
  7. String? source,
  8. DateTime? startTime,
})

Returns a list of Managed Notification Events according to specified filters, ordered by creation time in reverse chronological order (newest first).

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter endTime : Latest time of events to return from this call.

Parameter locale : The locale code of the language used for the retrieved NotificationEvent. The default locale is English (en_US).

Parameter maxResults : The maximum number of results to be returned in this call. Defaults to 20.

Parameter nextToken : The start token for paginated calls. Retrieved from the response of a previous ListManagedNotificationChannelAssociations call. Next token uses Base64 encoding.

Parameter organizationalUnitId : The Organizational Unit Id that an Amazon Web Services account belongs to.

Parameter relatedAccount : The Amazon Web Services account ID associated with the Managed Notification Events.

Parameter source : The Amazon Web Services service the event originates from. For example aws.cloudwatch.

Parameter startTime : The earliest time of events to return from this call.

Implementation

Future<ListManagedNotificationEventsResponse> listManagedNotificationEvents({
  DateTime? endTime,
  LocaleCode? locale,
  int? maxResults,
  String? nextToken,
  String? organizationalUnitId,
  String? relatedAccount,
  String? source,
  DateTime? startTime,
}) async {
  final $query = <String, List<String>>{
    if (endTime != null) 'endTime': [_s.iso8601ToJson(endTime).toString()],
    if (locale != null) 'locale': [locale.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (organizationalUnitId != null)
      'organizationalUnitId': [organizationalUnitId],
    if (relatedAccount != null) 'relatedAccount': [relatedAccount],
    if (source != null) 'source': [source],
    if (startTime != null)
      'startTime': [_s.iso8601ToJson(startTime).toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/managed-notification-events',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListManagedNotificationEventsResponse.fromJson(response);
}