listStreams method

Future<ListStreamsResponse> listStreams({
  1. bool? ascendingOrder,
  2. int? maxResults,
  3. String? nextToken,
})

Lists all of the streams in your Amazon Web Services account.

Requires permission to access the ListStreams action.

May throw InternalFailureException. May throw InvalidRequestException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedException.

Parameter ascendingOrder : Set to true to return the list of streams in ascending order.

Parameter maxResults : The maximum number of results to return at a time.

Parameter nextToken : A token used to get the next set of results.

Implementation

Future<ListStreamsResponse> listStreams({
  bool? ascendingOrder,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    if (ascendingOrder != null)
      'isAscendingOrder': [ascendingOrder.toString()],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/streams',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListStreamsResponse.fromJson(response);
}