listReleaseLabels method
Retrieves release labels of Amazon EMR services in the Region where the API is called.
May throw InternalServerException.
May throw InvalidRequestException.
Parameter filters :
Filters the results of the request. Prefix specifies the
prefix of release labels to return. Application specifies the
application (with/without version) of release labels to return.
Parameter maxResults :
Defines the maximum number of release labels to return in a single
response. The default is 100.
Parameter nextToken :
Specifies the next page of results. If NextToken is not
specified, which is usually the case for the first request of
ListReleaseLabels, the first page of results are determined by other
filtering parameters or by the latest version. The
ListReleaseLabels request fails if the identity (Amazon Web
Services account ID) and all filtering parameters are different from the
original request, or if the NextToken is expired or tampered
with.
Implementation
Future<ListReleaseLabelsOutput> listReleaseLabels({
ReleaseLabelFilter? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ElasticMapReduce.ListReleaseLabels'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListReleaseLabelsOutput.fromJson(jsonResponse.body);
}