listStoredQueries method

Future<ListStoredQueriesResponse> listStoredQueries({
  1. int? maxResults,
  2. String? nextToken,
})

List the stored queries for an AWS account in an AWS Region. The default is 100.

May throw ValidationException. May throw InvalidNextTokenException.

Parameter maxResults : The maximum number of results to be returned with a single call.

Parameter nextToken : The nextToken string returned in a previous request that you use to request the next page of results in a paginated response.

Implementation

Future<ListStoredQueriesResponse> listStoredQueries({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.ListStoredQueries'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListStoredQueriesResponse.fromJson(jsonResponse.body);
}