Skip to content

list_notebook_runs

list_notebook_runs(
    domain_identifier: DomainId,
    owning_project_identifier: ProjectId,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    notebook_identifier: Optional[NotebookId] = None,
    status: Optional[NotebookRunStatus] = None,
    schedule_identifier: Optional[ScheduleId] = None,
    max_results: Optional[MaxResults] = None,
    sort_order: Optional[SortOrder] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListNotebookRunsOutput

Lists notebook runs in Amazon SageMaker Unified Studio.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon SageMaker Unified Studio domain in which to list notebook runs.

  • owning_project_identifier (ProjectId) –

    The identifier of the project that owns the notebook runs.

  • notebook_identifier (Optional[NotebookId], default: None ) –

    The identifier of the notebook to filter runs by.

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

    The status to filter notebook runs by.

  • schedule_identifier (Optional[ScheduleId], default: None ) –

    The identifier of the schedule to filter notebook runs by.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of notebook runs to return in a single call. When the number of notebook runs exceeds the value of MaxResults, the response contains a NextToken value.

  • sort_order (Optional[SortOrder], default: None ) –

    The sort order for the results.

  • next_token (Optional[PaginationToken], default: None ) –

    When the number of notebook runs is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of notebook runs, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListNotebookRuns to list the next set of notebook runs.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def list_notebook_runs(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    owning_project_identifier: "capo_datazone.types.project_id.ProjectId",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    notebook_identifier: Optional[
        "capo_datazone.types.notebook_id.NotebookId"
    ] = None,
    status: Optional[
        "capo_datazone.types.notebook_run_status.NotebookRunStatus"
    ] = None,
    schedule_identifier: Optional[
        "capo_datazone.types.schedule_id.ScheduleId"
    ] = None,
    max_results: Optional["capo_datazone.types.max_results.MaxResults"] = None,
    sort_order: Optional["capo_datazone.types.sort_order.SortOrder"] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_datazone.types.list_notebook_runs_output.ListNotebookRunsOutput":
    """<p>Lists <a href="https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/notebooks.html">notebook runs</a> in Amazon SageMaker Unified Studio.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon SageMaker Unified Studio domain in which to list notebook runs.</p>
        owning_project_identifier: <p>The identifier of the project that owns the notebook runs.</p>
        notebook_identifier: <p>The identifier of the notebook to filter runs by.</p>
        status: <p>The status to filter notebook runs by.</p>
        schedule_identifier: <p>The identifier of the schedule to filter notebook runs by.</p>
        max_results: <p>The maximum number of notebook runs to return in a single call. When the number of notebook runs exceeds the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value.</p>
        sort_order: <p>The sort order for the results.</p>
        next_token: <p>When the number of notebook runs is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of notebook runs, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListNotebookRuns</code> to list the next set of notebook runs.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.list_notebook_runs_input.ListNotebookRunsInput]",
    ) -> OperationResponse[
        "capo_datazone.types.list_notebook_runs_output.ListNotebookRunsOutput"
    ]:
        import capo_datazone._operations.data_zone.list_notebook_runs

        output, http_response = (
            capo_datazone._operations.data_zone.list_notebook_runs.list_notebook_runs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListNotebookRuns")
    )
    input_: capo_datazone.types.list_notebook_runs_input.ListNotebookRunsInput = {
        "domain_identifier": domain_identifier,
        "owning_project_identifier": owning_project_identifier,
    }
    if notebook_identifier is not None:
        input_["notebook_identifier"] = notebook_identifier
    if status is not None:
        input_["status"] = status
    if schedule_identifier is not None:
        input_["schedule_identifier"] = schedule_identifier
    if max_results is not None:
        input_["max_results"] = max_results
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if next_token is not None:
        input_["next_token"] = next_token

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