searchNotifications method
Searches for notifications based on specified criteria and filters. Returns a paginated list of notifications matching the search parameters, ordered by descending creation time. Supports filtering by content and tags.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter instanceId :
The identifier of the Amazon Connect instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter maxResults :
The maximum number of results to return per page. Valid range is 1-100.
Parameter nextToken :
The token for the next set of results. Use the value returned in the
previous response to retrieve the next page of results.
Parameter searchCriteria :
The search criteria to apply when searching for notifications. Supports
filtering by notification ID and message content using comparison types
such as STARTS_WITH, CONTAINS, and EXACT.
Parameter searchFilter :
Filters to apply to the search results, such as tag-based filters.
Implementation
Future<SearchNotificationsResponse> searchNotifications({
required String instanceId,
int? maxResults,
String? nextToken,
NotificationSearchCriteria? searchCriteria,
NotificationSearchFilter? searchFilter,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
'InstanceId': instanceId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (searchCriteria != null) 'SearchCriteria': searchCriteria,
if (searchFilter != null) 'SearchFilter': searchFilter,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/search-notifications',
exceptionFnMap: _exceptionFns,
);
return SearchNotificationsResponse.fromJson(response);
}