listBlockedGuestUsers method

Future<ListBlockedGuestUsersResponse> listBlockedGuestUsers({
  1. required String networkId,
  2. String? admin,
  3. int? maxResults,
  4. String? nextToken,
  5. SortDirection? sortDirection,
  6. String? sortFields,
  7. String? username,
})

Retrieves a paginated list of guest users who have been blocked from a Wickr network. You can filter and sort the results.

May throw BadRequestError. May throw ForbiddenError. May throw InternalServerError. May throw RateLimitError. May throw ResourceNotFoundError. May throw UnauthorizedError. May throw ValidationError.

Parameter networkId : The ID of the Wickr network from which to list blocked guest users.

Parameter admin : Filter results to only include blocked guest users that were blocked by this administrator.

Parameter maxResults : The maximum number of blocked guest users to return in a single page. Valid range is 1-100. Default is 10.

Parameter nextToken : The token for retrieving the next page of results. This is returned from a previous request when there are more results available.

Parameter sortDirection : The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.

Parameter sortFields : The field to sort blocked guest users by. Accepted values include 'username', 'admin', and 'modified'.

Parameter username : Filter results to only include blocked guest users with usernames matching this value.

Implementation

Future<ListBlockedGuestUsersResponse> listBlockedGuestUsers({
  required String networkId,
  String? admin,
  int? maxResults,
  String? nextToken,
  SortDirection? sortDirection,
  String? sortFields,
  String? username,
}) async {
  final $query = <String, List<String>>{
    if (admin != null) 'admin': [admin],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (sortDirection != null) 'sortDirection': [sortDirection.value],
    if (sortFields != null) 'sortFields': [sortFields],
    if (username != null) 'username': [username],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/networks/${Uri.encodeComponent(networkId)}/guest-users/blocklist',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListBlockedGuestUsersResponse.fromJson(response);
}