searchSpendingLimits method

Future<SearchSpendingLimitsResponse> searchSpendingLimits({
  1. List<SearchSpendingLimitsFilter>? filters,
  2. int? maxResults,
  3. String? nextToken,
})

Searches and lists spending limits based on specified filters. This operation supports pagination and allows filtering by various criteria to find specific spending limits. We recommend using pagination to ensure that the operation returns quickly and successfully.

May throw AccessDeniedException. May throw InternalServiceException. May throw ThrottlingException. May throw ValidationException.

Parameter filters : The filters to apply when searching for spending limits. Use filters to narrow down the results based on specific criteria.

Parameter maxResults : The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.

Parameter nextToken : The token to retrieve the next page of results. This value is returned from a previous call to SearchSpendingLimits when there are more results available.

Implementation

Future<SearchSpendingLimitsResponse> searchSpendingLimits({
  List<SearchSpendingLimitsFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  final $payload = <String, dynamic>{
    if (filters != null) 'filters': filters,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/spending-limits',
    exceptionFnMap: _exceptionFns,
  );
  return SearchSpendingLimitsResponse.fromJson(response);
}