listManagedWorkgroups method

Future<ListManagedWorkgroupsResponse> listManagedWorkgroups({
  1. int? maxResults,
  2. String? nextToken,
  3. String? sourceArn,
})

Returns information about a list of specified managed workgroups in your account.

May throw AccessDeniedException. May throw InternalServerException.

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 ListManagedWorkgroups operation returns a nextToken, you can include the returned nextToken in following ListManagedWorkgroups operations, which returns results in the next page.

Parameter sourceArn : The Amazon Resource Name (ARN) for the managed workgroup in the Glue Data Catalog.

Implementation

Future<ListManagedWorkgroupsResponse> listManagedWorkgroups({
  int? maxResults,
  String? nextToken,
  String? sourceArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RedshiftServerless.ListManagedWorkgroups'
  };
  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,
      if (sourceArn != null) 'sourceArn': sourceArn,
    },
  );

  return ListManagedWorkgroupsResponse.fromJson(jsonResponse.body);
}