describeJobFlows method

  1. @Deprecated('Deprecated')
Future<DescribeJobFlowsOutput> describeJobFlows({
  1. DateTime? createdAfter,
  2. DateTime? createdBefore,
  3. List<String>? jobFlowIds,
  4. List<JobFlowExecutionState>? jobFlowStates,
})

This API is no longer supported and will eventually be removed. We recommend you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.

DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow IDs, job flow states, and restrictions on job flow creation date and time.

Regardless of supplied parameters, only job flows created within the last two months are returned.

If no parameters are supplied, then job flows matching either of the following criteria are returned:

  • Job flows created and completed in the last two weeks
  • Job flows created within the last two months that are in one of the following states: RUNNING, WAITING, SHUTTING_DOWN, STARTING
Amazon EMR can return a maximum of 512 job flow descriptions.

May throw InternalServerError.

Parameter createdAfter : Return only job flows created after this date and time.

Parameter createdBefore : Return only job flows created before this date and time.

Parameter jobFlowIds : Return only job flows whose job flow ID is contained in this list.

Parameter jobFlowStates : Return only job flows whose state is contained in this list.

Implementation

@Deprecated('Deprecated')
Future<DescribeJobFlowsOutput> describeJobFlows({
  DateTime? createdAfter,
  DateTime? createdBefore,
  List<String>? jobFlowIds,
  List<JobFlowExecutionState>? jobFlowStates,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ElasticMapReduce.DescribeJobFlows'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (createdAfter != null)
        'CreatedAfter': unixTimestampToJson(createdAfter),
      if (createdBefore != null)
        'CreatedBefore': unixTimestampToJson(createdBefore),
      if (jobFlowIds != null) 'JobFlowIds': jobFlowIds,
      if (jobFlowStates != null)
        'JobFlowStates': jobFlowStates.map((e) => e.toValue()).toList(),
    },
  );

  return DescribeJobFlowsOutput.fromJson(jsonResponse.body);
}