getWorkgroup method

Future<GetWorkgroupResponse> getWorkgroup({
  1. required String workgroupName,
})

Returns information about a specific workgroup.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter workgroupName : The name of the workgroup to return information for.

Implementation

Future<GetWorkgroupResponse> getWorkgroup({
  required String workgroupName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RedshiftServerless.GetWorkgroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'workgroupName': workgroupName,
    },
  );

  return GetWorkgroupResponse.fromJson(jsonResponse.body);
}