Skip to content

list_notebook_executions

list_notebook_executions(
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    editor_id: Optional[XmlStringMaxLen256] = None,
    status: Optional[NotebookExecutionStatus] = None,
    from_: Optional[Date] = None,
    to: Optional[Date] = None,
    marker: Optional[Marker] = None,
    execution_engine_id: Optional[XmlString] = None,
) -> ListNotebookExecutionsOutput

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.

Parameters:

  • editor_id (Optional[XmlStringMaxLen256], default: None ) –

    The unique ID of the editor associated with the notebook execution.

  • status (Optional[NotebookExecutionStatus], default: None ) –

    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.

  • from_ (Optional[Date], default: None ) –

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

  • to (Optional[Date], default: None ) –

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

  • marker (Optional[Marker], default: None ) –

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

  • execution_engine_id (Optional[XmlString], default: None ) –

    The unique ID of the execution engine.

Raises:

  • InternalServerError –

    Indicates that an error occurred while processing the request and that the request was not completed.

  • InvalidRequestException –

    This exception occurs when there is something wrong with user input.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_emr/_services/emr.py
def list_notebook_executions(
    self,
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    editor_id: Optional[
        "capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
    ] = None,
    status: Optional[
        "capo_emr.types.notebook_execution_status.NotebookExecutionStatus"
    ] = None,
    from_: Optional["capo_emr.types.date.Date"] = None,
    to: Optional["capo_emr.types.date.Date"] = None,
    marker: Optional["capo_emr.types.marker.Marker"] = None,
    execution_engine_id: Optional["capo_emr.types.xml_string.XmlString"] = None,
) -> "capo_emr.types.list_notebook_executions_output.ListNotebookExecutionsOutput":
    """<p>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 <code>ListNotebookExecutions</code> calls.</p>

    Args:
        editor_id: <p>The unique ID of the editor associated with the notebook execution.</p>
        status: <p>The status filter for listing notebook executions.</p> <ul> <li> <p> <code>START_PENDING</code> indicates that the cluster has received the execution request but execution has not begun.</p> </li> <li> <p> <code>STARTING</code> indicates that the execution is starting on the cluster.</p> </li> <li> <p> <code>RUNNING</code> indicates that the execution is being processed by the cluster.</p> </li> <li> <p> <code>FINISHING</code> indicates that execution processing is in the final stages.</p> </li> <li> <p> <code>FINISHED</code> indicates that the execution has completed without error.</p> </li> <li> <p> <code>FAILING</code> indicates that the execution is failing and will not finish successfully.</p> </li> <li> <p> <code>FAILED</code> indicates that the execution failed.</p> </li> <li> <p> <code>STOP_PENDING</code> indicates that the cluster has received a <code>StopNotebookExecution</code> request and the stop is pending.</p> </li> <li> <p> <code>STOPPING</code> indicates that the cluster is in the process of stopping the execution as a result of a <code>StopNotebookExecution</code> request.</p> </li> <li> <p> <code>STOPPED</code> indicates that the execution stopped because of a <code>StopNotebookExecution</code> request.</p> </li> </ul>
        from_: <p>The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.</p>
        to: <p>The end of time range filter for listing notebook executions. The default is the current timestamp.</p>
        marker: <p>The pagination token, returned by a previous <code>ListNotebookExecutions</code> call, that indicates the start of the list for this <code>ListNotebookExecutions</code> call.</p>
        execution_engine_id: <p>The unique ID of the execution engine.</p>

    Raises:
        capo_emr.errors.internal_server_error.InternalServerError: <p>Indicates that an error occurred while processing the request and that the request was not completed.</p>
        capo_emr.errors.invalid_request_exception.InvalidRequestException: <p>This exception occurs when there is something wrong with user input.</p>
        capo_emr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_emr.types.list_notebook_executions_input.ListNotebookExecutionsInput]",
    ) -> OperationResponse[
        "capo_emr.types.list_notebook_executions_output.ListNotebookExecutionsOutput"
    ]:
        import capo_emr._operations.elastic_map_reduce.list_notebook_executions

        output, http_response = (
            capo_emr._operations.elastic_map_reduce.list_notebook_executions.list_notebook_executions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListNotebookExecutions")
    )
    input_: capo_emr.types.list_notebook_executions_input.ListNotebookExecutionsInput = {}
    if editor_id is not None:
        input_["editor_id"] = editor_id
    if status is not None:
        input_["status"] = status
    if from_ is not None:
        input_["from"] = from_
    if to is not None:
        input_["to"] = to
    if marker is not None:
        input_["marker"] = marker
    if execution_engine_id is not None:
        input_["execution_engine_id"] = execution_engine_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output