listSteps method
Provides a list of steps for the cluster in reverse order unless you
specify stepIds
with the request of filter by
StepStates
. You can specify a maximum of ten
stepIDs
.
May throw InternalServerException. May throw InvalidRequestException.
Parameter clusterId
:
The identifier of the cluster for which to list the steps.
Parameter marker
:
The pagination token that indicates the next set of results to retrieve.
Parameter stepIds
:
The filter to limit the step list based on the identifier of the steps.
You can specify a maximum of ten Step IDs. The character constraint
applies to the overall length of the array.
Parameter stepStates
:
The filter to limit the step list based on certain states.
Implementation
Future<ListStepsOutput> listSteps({
required String clusterId,
String? marker,
List<String>? stepIds,
List<StepState>? stepStates,
}) async {
ArgumentError.checkNotNull(clusterId, 'clusterId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ElasticMapReduce.ListSteps'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterId': clusterId,
if (marker != null) 'Marker': marker,
if (stepIds != null) 'StepIds': stepIds,
if (stepStates != null)
'StepStates': stepStates.map((e) => e.toValue()).toList(),
},
);
return ListStepsOutput.fromJson(jsonResponse.body);
}