Skip to content

get_model_monitor_config async

get_model_monitor_config(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    model_monitor_config_name_or_arn: Optional[ModelMonitorConfigNameOrArn] = None,
) -> GetModelMonitorConfigResponse

Returns information about a model monitor configuration. You identify the configuration by its name or Amazon Resource Name (ARN).

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.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def get_model_monitor_config(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    model_monitor_config_name_or_arn: Optional[
        "capo_sagemaker.types.model_monitor_config_name_or_arn.ModelMonitorConfigNameOrArn"
    ] = None,
) -> "capo_sagemaker.types.get_model_monitor_config_response.GetModelMonitorConfigResponse":
    """<p>Returns information about a model monitor configuration. You identify the configuration by its name or Amazon Resource Name (ARN).</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>

    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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.get_model_monitor_config_request.GetModelMonitorConfigRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.get_model_monitor_config_response.GetModelMonitorConfigResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.get_model_monitor_config

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetModelMonitorConfig")
    )
    input_: capo_sagemaker.types.get_model_monitor_config_request.GetModelMonitorConfigRequest = {}
    if model_monitor_config_name_or_arn is not None:
        input_["model_monitor_config_name_or_arn"] = (
            model_monitor_config_name_or_arn
        )

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