listNotebookExecutions method

Future<ListNotebookExecutionsOutput> listNotebookExecutions({
  1. String? editorId,
  2. String? executionEngineId,
  3. DateTime? from,
  4. String? marker,
  5. NotebookExecutionStatus? status,
  6. DateTime? to,
})

Provides summaries of all notebook executions. You can filter the list based on multiple criteria such as status, time range, and editor id. Returns a maximum of 50 notebook executions and a marker to track the paging of a longer notebook execution list across multiple ListNotebookExecutions calls.

May throw InternalServerError. May throw InvalidRequestException.

Parameter editorId : The unique ID of the editor associated with the notebook execution.

Parameter executionEngineId : The unique ID of the execution engine.

Parameter from : The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.

Parameter marker : The pagination token, returned by a previous ListNotebookExecutions call, that indicates the start of the list for this ListNotebookExecutions call.

Parameter status : The status filter for listing notebook executions.

  • START_PENDING indicates that the cluster has received the execution request but execution has not begun.
  • STARTING indicates that the execution is starting on the cluster.
  • RUNNING indicates that the execution is being processed by the cluster.
  • FINISHING indicates that execution processing is in the final stages.
  • FINISHED indicates that the execution has completed without error.
  • FAILING indicates that the execution is failing and will not finish successfully.
  • FAILED indicates that the execution failed.
  • STOP_PENDING indicates that the cluster has received a StopNotebookExecution request and the stop is pending.
  • STOPPING indicates that the cluster is in the process of stopping the execution as a result of a StopNotebookExecution request.
  • STOPPED indicates that the execution stopped because of a StopNotebookExecution request.

Parameter to : The end of time range filter for listing notebook executions. The default is the current timestamp.

Implementation

Future<ListNotebookExecutionsOutput> listNotebookExecutions({
  String? editorId,
  String? executionEngineId,
  DateTime? from,
  String? marker,
  NotebookExecutionStatus? status,
  DateTime? to,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ElasticMapReduce.ListNotebookExecutions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (editorId != null) 'EditorId': editorId,
      if (executionEngineId != null) 'ExecutionEngineId': executionEngineId,
      if (from != null) 'From': unixTimestampToJson(from),
      if (marker != null) 'Marker': marker,
      if (status != null) 'Status': status.value,
      if (to != null) 'To': unixTimestampToJson(to),
    },
  );

  return ListNotebookExecutionsOutput.fromJson(jsonResponse.body);
}