Skip to content

get_model_monitor_execution

get_model_monitor_execution(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    model_monitor_config_name_or_arn: Optional[ModelMonitorConfigNameOrArn] = None,
    scheduled_at: Optional[Timestamp] = None,
) -> GetModelMonitorExecutionResponse

Returns information about one execution of a model monitor configuration. You identify the execution by the name or Amazon Resource Name (ARN) of the configuration and the time that the execution was scheduled to run.

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.

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

    The date and time that the execution was scheduled to run.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def get_model_monitor_execution(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    model_monitor_config_name_or_arn: Optional[
        "capo_sagemaker.types.model_monitor_config_name_or_arn.ModelMonitorConfigNameOrArn"
    ] = None,
    scheduled_at: Optional["capo_sagemaker.types.timestamp.Timestamp"] = None,
) -> "capo_sagemaker.types.get_model_monitor_execution_response.GetModelMonitorExecutionResponse":
    """<p>Returns information about one execution of a model monitor configuration. You identify the execution by the name or Amazon Resource Name (ARN) of the configuration and the time that the execution was scheduled to run.</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>
        scheduled_at: <p>The date and time that the execution was scheduled to run.</p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.get_model_monitor_execution_request.GetModelMonitorExecutionRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.get_model_monitor_execution_response.GetModelMonitorExecutionResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.get_model_monitor_execution

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetModelMonitorExecution")
    )
    input_: capo_sagemaker.types.get_model_monitor_execution_request.GetModelMonitorExecutionRequest = {}
    if model_monitor_config_name_or_arn is not None:
        input_["model_monitor_config_name_or_arn"] = (
            model_monitor_config_name_or_arn
        )
    if scheduled_at is not None:
        input_["scheduled_at"] = scheduled_at

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