listNotebookExecutions method

Future<ListNotebookExecutionsOutput> listNotebookExecutions({
  1. String? editorId,
  2. DateTime? from,
  3. String? marker,
  4. NotebookExecutionStatus? status,
  5. 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 ListNotebookExecution calls.

May throw InternalServerError. May throw InvalidRequestException.

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

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,
  DateTime? from,
  String? marker,
  NotebookExecutionStatus? status,
  DateTime? to,
}) async {
  _s.validateStringLength(
    'editorId',
    editorId,
    0,
    256,
  );
  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 (from != null) 'From': unixTimestampToJson(from),
      if (marker != null) 'Marker': marker,
      if (status != null) 'Status': status.toValue(),
      if (to != null) 'To': unixTimestampToJson(to),
    },
  );

  return ListNotebookExecutionsOutput.fromJson(jsonResponse.body);
}