listStreamGroups method

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

Retrieves a list of all Amazon GameLift Streams stream groups that are associated with the Amazon Web Services account in use. This operation returns stream groups in all statuses, in no particular order. You can paginate the results as needed.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter maxResults : The number of results to return. Use this parameter with NextToken to return results in sequential pages. Default value is 25.

Parameter nextToken : A token that marks the start of the next set of results. Use this token when you retrieve results as sequential pages. To get the first page of results, omit a token value. To get the remaining pages, provide the token returned with the previous result set.

Implementation

Future<ListStreamGroupsOutput> listStreamGroups({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/streamgroups',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListStreamGroupsOutput.fromJson(response);
}