listWorkspaces method

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

Returns a list of Amazon Managed Grafana workspaces in the account, with some information about each workspace. For more complete information about one workspace, use DescribeWorkspace.

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

Parameter maxResults : The maximum number of workspaces to include in the results.

Parameter nextToken : The token for the next set of workspaces to return. (You receive this token from a previous ListWorkspaces operation.)

Implementation

Future<ListWorkspacesResponse> listWorkspaces({
  int? maxResults,
  String? nextToken,
}) async {
  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: '/workspaces',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListWorkspacesResponse.fromJson(response);
}