listUsersIndexCapacity method

Future<ListUsersIndexCapacityResponse> listUsersIndexCapacity({
  1. required String awsAccountId,
  2. List<UserIndexCapacityFilter>? filters,
  3. int? maxResults,
  4. String? namespace,
  5. String? nextToken,
  6. UserIndexCapacitySortBy? sortBy,
  7. UserIndexCapacitySortOrder? sortOrder,
})

Lists per-user index capacity consumption for an account.

May throw AccessDeniedException. May throw InternalFailureException. May throw InvalidRequestException. May throw PreconditionNotMetException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the index capacity data.

Parameter filters : Filters to apply. Only one filter is supported per request. The userNameOrEmail and totalCapacityBytes filters are mutually exclusive.

Parameter maxResults : The maximum number of results to return per page.

Parameter namespace : The namespace to scope the user search to. Required when the userNameOrEmail filter is present.

Parameter nextToken : The token for the next set of results, received from a previous call.

Parameter sortBy : The field to sort results by.

Parameter sortOrder : The sort order for results. Defaults to DESC if not specified.

Implementation

Future<ListUsersIndexCapacityResponse> listUsersIndexCapacity({
  required String awsAccountId,
  List<UserIndexCapacityFilter>? filters,
  int? maxResults,
  String? namespace,
  String? nextToken,
  UserIndexCapacitySortBy? sortBy,
  UserIndexCapacitySortOrder? sortOrder,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    if (filters != null) 'filters': filters,
    if (maxResults != null) 'maxResults': maxResults,
    if (namespace != null) 'namespace': namespace,
    if (nextToken != null) 'nextToken': nextToken,
    if (sortBy != null) 'sortBy': sortBy.value,
    if (sortOrder != null) 'sortOrder': sortOrder.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/quick-index/user-capacity',
    exceptionFnMap: _exceptionFns,
  );
  return ListUsersIndexCapacityResponse.fromJson(response);
}