listTracks method

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

List the Amazon Redshift Serverless versions.

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

Parameter maxResults : The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.

Parameter nextToken : If your initial ListTracksRequest operation returns a nextToken, you can include the returned nextToken in following ListTracksRequest operations, which returns results in the next page.

Implementation

Future<ListTracksResponse> listTracks({
  int? maxResults,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RedshiftServerless.ListTracks'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListTracksResponse.fromJson(jsonResponse.body);
}