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:
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/sage_maker.py
| def delete_model_monitor_config(
self,
*,
config_overrides: Optional[SageMakerClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_sagemaker.types.delete_model_monitor_config_request.DeleteModelMonitorConfigRequest]",
) -> OperationResponse[
"capo_sagemaker.types.delete_model_monitor_config_response.DeleteModelMonitorConfigResponse"
]:
import capo_sagemaker._operations.sage_maker.delete_model_monitor_config
output, http_response = (
capo_sagemaker._operations.sage_maker.delete_model_monitor_config.delete_model_monitor_config(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|