getAutoTerminationPolicy method

Future<GetAutoTerminationPolicyOutput> getAutoTerminationPolicy({
  1. required String clusterId,
})

Returns the auto-termination policy for an Amazon EMR cluster.

Parameter clusterId : Specifies the ID of the Amazon EMR cluster for which the auto-termination policy will be fetched.

Implementation

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

  return GetAutoTerminationPolicyOutput.fromJson(jsonResponse.body);
}