Skip to content

list_monitoring_executions async

list_monitoring_executions(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    monitoring_schedule_name: Optional[MonitoringScheduleName] = None,
    endpoint_name: Optional[EndpointName] = None,
    sort_by: Optional[MonitoringExecutionSortKey] = None,
    sort_order: Optional[SortOrder] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    scheduled_time_before: Optional[Timestamp] = None,
    scheduled_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    creation_time_after: Optional[Timestamp] = None,
    last_modified_time_before: Optional[Timestamp] = None,
    last_modified_time_after: Optional[Timestamp] = None,
    status_equals: Optional[ExecutionStatus] = None,
    monitoring_job_definition_name: Optional[MonitoringJobDefinitionName] = None,
    monitoring_type_equals: Optional[MonitoringType] = None,
) -> ListMonitoringExecutionsResponse

Returns list of all monitoring job executions.

Parameters:

  • monitoring_schedule_name (Optional[MonitoringScheduleName], default: None ) –

    Name of a specific schedule to fetch jobs for.

  • endpoint_name (Optional[EndpointName], default: None ) –

    Name of a specific endpoint to fetch jobs for.

  • sort_by (Optional[MonitoringExecutionSortKey], default: None ) –

    Whether to sort the results by the Status, CreationTime, or ScheduledTime field. The default is CreationTime.

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

    Whether to sort the results in Ascending or Descending order. The default is Descending.

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

    The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

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

    The maximum number of jobs to return in the response. The default value is 10.

  • scheduled_time_before (Optional[Timestamp], default: None ) –

    Filter for jobs scheduled before a specified time.

  • scheduled_time_after (Optional[Timestamp], default: None ) –

    Filter for jobs scheduled after a specified time.

  • creation_time_before (Optional[Timestamp], default: None ) –

    A filter that returns only jobs created before a specified time.

  • creation_time_after (Optional[Timestamp], default: None ) –

    A filter that returns only jobs created after a specified time.

  • last_modified_time_before (Optional[Timestamp], default: None ) –

    A filter that returns only jobs modified after a specified time.

  • last_modified_time_after (Optional[Timestamp], default: None ) –

    A filter that returns only jobs modified before a specified time.

  • status_equals (Optional[ExecutionStatus], default: None ) –

    A filter that retrieves only jobs with a specific status.

  • monitoring_job_definition_name (Optional[MonitoringJobDefinitionName], default: None ) –

    Gets a list of the monitoring job runs of the specified monitoring job definitions.

  • monitoring_type_equals (Optional[MonitoringType], default: None ) –

    A filter that returns only the monitoring job runs of the specified monitoring type.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def list_monitoring_executions(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    monitoring_schedule_name: Optional[
        "capo_sagemaker.types.monitoring_schedule_name.MonitoringScheduleName"
    ] = None,
    endpoint_name: Optional[
        "capo_sagemaker.types.endpoint_name.EndpointName"
    ] = None,
    sort_by: Optional[
        "capo_sagemaker.types.monitoring_execution_sort_key.MonitoringExecutionSortKey"
    ] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    scheduled_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    scheduled_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    last_modified_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    last_modified_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    status_equals: Optional[
        "capo_sagemaker.types.execution_status.ExecutionStatus"
    ] = None,
    monitoring_job_definition_name: Optional[
        "capo_sagemaker.types.monitoring_job_definition_name.MonitoringJobDefinitionName"
    ] = None,
    monitoring_type_equals: Optional[
        "capo_sagemaker.types.monitoring_type.MonitoringType"
    ] = None,
) -> "capo_sagemaker.types.list_monitoring_executions_response.ListMonitoringExecutionsResponse":
    """<p>Returns list of all monitoring job executions.</p>

    Args:
        monitoring_schedule_name: <p>Name of a specific schedule to fetch jobs for.</p>
        endpoint_name: <p>Name of a specific endpoint to fetch jobs for.</p>
        sort_by: <p>Whether to sort the results by the <code>Status</code>, <code>CreationTime</code>, or <code>ScheduledTime</code> field. The default is <code>CreationTime</code>.</p>
        sort_order: <p>Whether to sort the results in <code>Ascending</code> or <code>Descending</code> order. The default is <code>Descending</code>.</p>
        next_token: <p>The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.</p>
        max_results: <p>The maximum number of jobs to return in the response. The default value is 10.</p>
        scheduled_time_before: <p>Filter for jobs scheduled before a specified time.</p>
        scheduled_time_after: <p>Filter for jobs scheduled after a specified time.</p>
        creation_time_before: <p>A filter that returns only jobs created before a specified time.</p>
        creation_time_after: <p>A filter that returns only jobs created after a specified time.</p>
        last_modified_time_before: <p>A filter that returns only jobs modified after a specified time.</p>
        last_modified_time_after: <p>A filter that returns only jobs modified before a specified time.</p>
        status_equals: <p>A filter that retrieves only jobs with a specific status.</p>
        monitoring_job_definition_name: <p>Gets a list of the monitoring job runs of the specified monitoring job definitions.</p>
        monitoring_type_equals: <p>A filter that returns only the monitoring job runs of the specified monitoring type.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.list_monitoring_executions_request.ListMonitoringExecutionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.list_monitoring_executions_response.ListMonitoringExecutionsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_monitoring_executions

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.list_monitoring_executions.async_list_monitoring_executions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMonitoringExecutions")
    )
    input_: capo_sagemaker.types.list_monitoring_executions_request.ListMonitoringExecutionsRequest = {}
    if monitoring_schedule_name is not None:
        input_["monitoring_schedule_name"] = monitoring_schedule_name
    if endpoint_name is not None:
        input_["endpoint_name"] = endpoint_name
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if scheduled_time_before is not None:
        input_["scheduled_time_before"] = scheduled_time_before
    if scheduled_time_after is not None:
        input_["scheduled_time_after"] = scheduled_time_after
    if creation_time_before is not None:
        input_["creation_time_before"] = creation_time_before
    if creation_time_after is not None:
        input_["creation_time_after"] = creation_time_after
    if last_modified_time_before is not None:
        input_["last_modified_time_before"] = last_modified_time_before
    if last_modified_time_after is not None:
        input_["last_modified_time_after"] = last_modified_time_after
    if status_equals is not None:
        input_["status_equals"] = status_equals
    if monitoring_job_definition_name is not None:
        input_["monitoring_job_definition_name"] = monitoring_job_definition_name
    if monitoring_type_equals is not None:
        input_["monitoring_type_equals"] = monitoring_type_equals

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output