listInstanceGroups method
Provides all available details about the instance groups in a cluster.
May throw InternalServerException. May throw InvalidRequestException.
Parameter clusterId
:
The identifier of the cluster for which to list the instance groups.
Parameter marker
:
The pagination token that indicates the next set of results to retrieve.
Implementation
Future<ListInstanceGroupsOutput> listInstanceGroups({
required String clusterId,
String? marker,
}) async {
ArgumentError.checkNotNull(clusterId, 'clusterId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ElasticMapReduce.ListInstanceGroups'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterId': clusterId,
if (marker != null) 'Marker': marker,
},
);
return ListInstanceGroupsOutput.fromJson(jsonResponse.body);
}