describeUsers method

Future<DescribeUsersResponse> describeUsers({
  1. String? authenticationToken,
  2. String? fields,
  3. UserFilterType? include,
  4. int? limit,
  5. String? marker,
  6. OrderType? order,
  7. String? organizationId,
  8. String? query,
  9. UserSortType? sort,
  10. String? userIds,
})

Describes the specified users. You can describe all users or filter the results (for example, by status or organization).

By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.

May throw EntityNotExistsException. May throw FailedDependencyException. May throw InvalidArgumentException. May throw RequestedEntityTooLargeException. May throw ServiceUnavailableException. May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException.

Parameter authenticationToken : Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Parameter fields : A comma-separated list of values. Specify "STORAGE_METADATA" to include the user storage quota and utilization information.

Parameter include : The state of the users. Specify "ALL" to include inactive users.

Parameter limit : The maximum number of items to return.

Parameter marker : The marker for the next set of results. (You received this marker from a previous call.)

Parameter order : The order for the results.

Parameter organizationId : The ID of the organization.

Parameter query : A query to filter users by user name. Remember the following about the Userids and Query parameters:

  • If you don't use either parameter, the API returns a paginated list of all users on the site.
  • If you use both parameters, the API ignores the Query parameter.
  • The Userid parameter only returns user names that match a corresponding user ID.
  • The Query parameter runs a "prefix" search for users by the GivenName, SurName, or UserName fields included in a CreateUser API call. For example, querying on Ma returns Márcia Oliveira, María García, and Mateo Jackson. If you use multiple characters, the API only returns data that matches all characters. For example, querying on Ma J only returns Mateo Jackson.

Parameter sort : The sorting criteria.

Parameter userIds : The IDs of the users.

Implementation

Future<DescribeUsersResponse> describeUsers({
  String? authenticationToken,
  String? fields,
  UserFilterType? include,
  int? limit,
  String? marker,
  OrderType? order,
  String? organizationId,
  String? query,
  UserSortType? sort,
  String? userIds,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    999,
  );
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  final $query = <String, List<String>>{
    if (fields != null) 'fields': [fields],
    if (include != null) 'include': [include.value],
    if (limit != null) 'limit': [limit.toString()],
    if (marker != null) 'marker': [marker],
    if (order != null) 'order': [order.value],
    if (organizationId != null) 'organizationId': [organizationId],
    if (query != null) 'query': [query],
    if (sort != null) 'sort': [sort.value],
    if (userIds != null) 'userIds': [userIds],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/api/v1/users',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeUsersResponse.fromJson(response);
}