describeCluster method

Future<DescribeClusterOutput> describeCluster({
  1. required String clusterId,
})

Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.

May throw InternalServerException. May throw InvalidRequestException.

Parameter clusterId : The identifier of the cluster to describe.

Implementation

Future<DescribeClusterOutput> describeCluster({
  required String clusterId,
}) async {
  ArgumentError.checkNotNull(clusterId, 'clusterId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ElasticMapReduce.DescribeCluster'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ClusterId': clusterId,
    },
  );

  return DescribeClusterOutput.fromJson(jsonResponse.body);
}