removeAutoScalingPolicy method

Future<void> removeAutoScalingPolicy({
  1. required String clusterId,
  2. required String instanceGroupId,
})

Removes an automatic scaling policy from a specified instance group within an EMR cluster.

Parameter clusterId : Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

Parameter instanceGroupId : Specifies the ID of the instance group to which the scaling policy is applied.

Implementation

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