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 UnauthorizedOperationException. May throw UnauthorizedResourceAccessException. May throw FailedDependencyException. May throw ServiceUnavailableException. May throw InvalidArgumentException. May throw RequestedEntityTooLargeException.

Parameter authenticationToken : Amazon WorkDocs authentication token. Not required when using AWS 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.

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.validateStringLength(
    'authenticationToken',
    authenticationToken,
    1,
    8199,
  );
  _s.validateStringLength(
    'fields',
    fields,
    1,
    256,
  );
  _s.validateNumRange(
    'limit',
    limit,
    1,
    999,
  );
  _s.validateStringLength(
    'marker',
    marker,
    1,
    2048,
  );
  _s.validateStringLength(
    'organizationId',
    organizationId,
    1,
    256,
  );
  _s.validateStringLength(
    'query',
    query,
    1,
    512,
  );
  _s.validateStringLength(
    'userIds',
    userIds,
    1,
    2000,
  );
  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.toValue()],
    if (limit != null) 'limit': [limit.toString()],
    if (marker != null) 'marker': [marker],
    if (order != null) 'order': [order.toValue()],
    if (organizationId != null) 'organizationId': [organizationId],
    if (query != null) 'query': [query],
    if (sort != null) 'sort': [sort.toValue()],
    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);
}