listVersions method

Future<ListVersionsResponse> listVersions({
  1. int? maxResults,
  2. String? nextToken,
  3. String? workspaceId,
})

Lists available versions of Grafana. These are available when calling CreateWorkspace. Optionally, include a workspace to list the versions to which it can be upgraded.

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

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

Parameter nextToken : The token to use when requesting the next set of results. You receive this token from a previous ListVersions operation.

Parameter workspaceId : The ID of the workspace to list the available upgrade versions. If not included, lists all versions of Grafana that are supported for CreateWorkspace.

Implementation

Future<ListVersionsResponse> listVersions({
  int? maxResults,
  String? nextToken,
  String? workspaceId,
}) async {
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (workspaceId != null) 'workspace-id': [workspaceId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/versions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListVersionsResponse.fromJson(response);
}