describeReleaseLabel method

Future<DescribeReleaseLabelOutput> describeReleaseLabel({
  1. int? maxResults,
  2. String? nextToken,
  3. String? releaseLabel,
})

Provides Amazon EMR release label details, such as the releases available the Region where the API request is run, and the available applications for a specific Amazon EMR release label. Can also list Amazon EMR releases that support a specified version of Spark.

May throw InternalServerException. May throw InvalidRequestException.

Parameter maxResults : Reserved for future use. Currently set to null.

Parameter nextToken : The pagination token. Reserved for future use. Currently set to null.

Parameter releaseLabel : The target release label to be described.

Implementation

Future<DescribeReleaseLabelOutput> describeReleaseLabel({
  int? maxResults,
  String? nextToken,
  String? releaseLabel,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ElasticMapReduce.DescribeReleaseLabel'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (releaseLabel != null) 'ReleaseLabel': releaseLabel,
    },
  );

  return DescribeReleaseLabelOutput.fromJson(jsonResponse.body);
}