addInstanceFleet method
Future<AddInstanceFleetOutput>
addInstanceFleet({
- required String clusterId,
- required InstanceFleetConfig instanceFleet,
Adds an instance fleet to a running cluster.
May throw InternalServerException. May throw InvalidRequestException.
Parameter clusterId
:
The unique identifier of the cluster.
Parameter instanceFleet
:
Specifies the configuration of the instance fleet.
Implementation
Future<AddInstanceFleetOutput> addInstanceFleet({
required String clusterId,
required InstanceFleetConfig instanceFleet,
}) async {
ArgumentError.checkNotNull(clusterId, 'clusterId');
_s.validateStringLength(
'clusterId',
clusterId,
0,
256,
isRequired: true,
);
ArgumentError.checkNotNull(instanceFleet, 'instanceFleet');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ElasticMapReduce.AddInstanceFleet'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterId': clusterId,
'InstanceFleet': instanceFleet,
},
);
return AddInstanceFleetOutput.fromJson(jsonResponse.body);
}