listStreams method

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

Gets summary information about live streams in your account, in the Amazon Web Services region where the API request is processed.

May throw AccessDeniedException. May throw ValidationException.

Parameter filterBy : Filters the stream list to match the specified criterion.

Parameter maxResults : Maximum number of streams to return. Default: 100.

Parameter nextToken : The first stream to retrieve. This is used for pagination; see the nextToken response field.

Implementation

Future<ListStreamsResponse> listStreams({
  StreamFilters? filterBy,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    if (filterBy != null) 'filterBy': filterBy,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ListStreams',
    exceptionFnMap: _exceptionFns,
  );
  return ListStreamsResponse.fromJson(response);
}