listSpaces method

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

Returns a list of AWS re:Post Private private re:Posts in the account with some information about each private re:Post.

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

Parameter maxResults : The maximum number of private re:Posts to include in the results.

Parameter nextToken : The token for the next set of private re:Posts to return. You receive this token from a previous ListSpaces operation.

Implementation

Future<ListSpacesOutput> listSpaces({
  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: '/spaces',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListSpacesOutput.fromJson(response);
}