Skip to content

list_model_monitor_executions

list_model_monitor_executions(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    model_monitor_config_name_or_arn: Optional[ModelMonitorConfigNameOrArn] = None,
    status_equals: Optional[ModelMonitorExecutionStatus] = None,
    scheduled_after: Optional[Timestamp] = None,
    scheduled_before: Optional[Timestamp] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListModelMonitorExecutionsResponse

Lists the executions of a model monitor configuration, newest first. Results are paginated. To get the next page, use NextToken.

This operation is in public preview release for Amazon SageMaker AI and is subject to change. This feature is not recommended for production environments.

Parameters:

  • model_monitor_config_name_or_arn (Optional[ModelMonitorConfigNameOrArn], default: None ) –

    The name or Amazon Resource Name (ARN) of the model monitor configuration. Specify one of the following:

    • The name of the model monitor configuration.

    • The Amazon Resource Name (ARN) of the model monitor configuration.

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

    A filter that returns only executions with the specified status.

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

    A filter that returns only executions that were scheduled to run after the specified time.

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

    A filter that returns only executions that were scheduled to run before the specified time.

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

    If the previous response was truncated, you receive this token. To get the next set of results, use it in your next request.

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

    The maximum number of results to return in the response.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_model_monitor_executions(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    model_monitor_config_name_or_arn: Optional[
        "capo_sagemaker.types.model_monitor_config_name_or_arn.ModelMonitorConfigNameOrArn"
    ] = None,
    status_equals: Optional[
        "capo_sagemaker.types.model_monitor_execution_status.ModelMonitorExecutionStatus"
    ] = None,
    scheduled_after: Optional["capo_sagemaker.types.timestamp.Timestamp"] = None,
    scheduled_before: Optional["capo_sagemaker.types.timestamp.Timestamp"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
) -> "capo_sagemaker.types.list_model_monitor_executions_response.ListModelMonitorExecutionsResponse":
    """<p>Lists the executions of a model monitor configuration, newest first. Results are paginated. To get the next page, use <code>NextToken</code>.</p> <note> <p>This operation is in public preview release for Amazon SageMaker AI and is subject to change. This feature is not recommended for production environments.</p> </note>

    Args:
        model_monitor_config_name_or_arn: <p>The name or Amazon Resource Name (ARN) of the model monitor configuration. Specify one of the following:</p> <ul> <li> <p>The name of the model monitor configuration.</p> </li> <li> <p>The Amazon Resource Name (ARN) of the model monitor configuration.</p> </li> </ul>
        status_equals: <p>A filter that returns only executions with the specified status.</p>
        scheduled_after: <p>A filter that returns only executions that were scheduled to run after the specified time.</p>
        scheduled_before: <p>A filter that returns only executions that were scheduled to run before the specified time.</p>
        next_token: <p>If the previous response was truncated, you receive this token. To get the next set of results, use it in your next request.</p>
        max_results: <p>The maximum number of results to return in the response.</p>

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

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_model_monitor_executions_request.ListModelMonitorExecutionsRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_model_monitor_executions_response.ListModelMonitorExecutionsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_model_monitor_executions

        output, http_response = (
            capo_sagemaker._operations.sage_maker.list_model_monitor_executions.list_model_monitor_executions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListModelMonitorExecutions")
    )
    input_: capo_sagemaker.types.list_model_monitor_executions_request.ListModelMonitorExecutionsRequest = {}
    if model_monitor_config_name_or_arn is not None:
        input_["model_monitor_config_name_or_arn"] = (
            model_monitor_config_name_or_arn
        )
    if status_equals is not None:
        input_["status_equals"] = status_equals
    if scheduled_after is not None:
        input_["scheduled_after"] = scheduled_after
    if scheduled_before is not None:
        input_["scheduled_before"] = scheduled_before
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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