getManagedScalingPolicy method

Future<GetManagedScalingPolicyOutput> getManagedScalingPolicy({
  1. required String clusterId,
})

Fetches the attached managed scaling policy for an Amazon EMR cluster.

Parameter clusterId : Specifies the ID of the cluster for which the managed scaling policy will be fetched.

Implementation

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

  return GetManagedScalingPolicyOutput.fromJson(jsonResponse.body);
}