Skip to content

delete_model_monitor_config async

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

Deletes a model monitor configuration. You identify the configuration by its name or Amazon Resource Name (ARN). Deletion is asynchronous: the status of the configuration changes to Deleting, and SageMaker AI removes the configuration when deletion completes. The response is empty.

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:

  • ConflictException –

    There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.

  • ResourceNotFound –

    Resource being access is not found.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def delete_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.delete_model_monitor_config_response.DeleteModelMonitorConfigResponse":
    """<p>Deletes a model monitor configuration. You identify the configuration by its name or Amazon Resource Name (ARN). Deletion is asynchronous: the status of the configuration changes to <code>Deleting</code>, and SageMaker AI removes the configuration when deletion completes. The response is empty.</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.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</p>
        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.delete_model_monitor_config_request.DeleteModelMonitorConfigRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.delete_model_monitor_config_response.DeleteModelMonitorConfigResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.delete_model_monitor_config

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteModelMonitorConfig")
    )
    input_: capo_sagemaker.types.delete_model_monitor_config_request.DeleteModelMonitorConfigRequest = {}
    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