listNamespaces method

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

Returns information about a list of specified namespaces.

May throw InternalServerException. May throw ValidationException.

Parameter maxResults : An optional parameter that specifies the maximum number of results to return. You can use nextToken to display the next page of results.

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

Implementation

Future<ListNamespacesResponse> listNamespaces({
  int? maxResults,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RedshiftServerless.ListNamespaces'
  };
  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 ListNamespacesResponse.fromJson(jsonResponse.body);
}