modifyInstanceGroups method

Future<void> modifyInstanceGroups({
  1. String? clusterId,
  2. List<InstanceGroupModifyConfig>? instanceGroups,
})

ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group. The input parameters include the new target instance count for the group and the instance group ID. The call will either succeed or fail atomically.

May throw InternalServerError.

Parameter clusterId : The ID of the cluster to which the instance group belongs.

Parameter instanceGroups : Instance groups to change.

Implementation

Future<void> modifyInstanceGroups({
  String? clusterId,
  List<InstanceGroupModifyConfig>? instanceGroups,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ElasticMapReduce.ModifyInstanceGroups'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (clusterId != null) 'ClusterId': clusterId,
      if (instanceGroups != null) 'InstanceGroups': instanceGroups,
    },
  );
}