listWorkspaces method
Retrieves information about workspaces in the current account.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results to return at one time. The default is 25.
Valid Range: Minimum value of 1. Maximum value of 250.
Parameter nextToken :
The string that specifies the next page of results.
Implementation
Future<ListWorkspacesResponse> listWorkspaces({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
200,
);
final $payload = <String, dynamic>{
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/workspaces-list',
exceptionFnMap: _exceptionFns,
);
return ListWorkspacesResponse.fromJson(response);
}