Deletes a cost anomaly monitor.
Parameters:
-
monitor_arn
(GenericString)
–
The unique identifier of the cost anomaly monitor that you want to delete.
Raises:
Source code in docs_src/capo_cost_explorer/_services/async_cost_explorer.py
| async def delete_anomaly_monitor(
self,
monitor_arn: "capo_cost_explorer.types.generic_string.GenericString",
*,
config_overrides: Optional[AsyncCostExplorerClientConfig] = None,
) -> "capo_cost_explorer.types.delete_anomaly_monitor_response.DeleteAnomalyMonitorResponse":
"""<p>Deletes a cost anomaly monitor. </p>
Args:
monitor_arn: <p>The unique identifier of the cost anomaly monitor that you want to delete. </p>
Raises:
capo_cost_explorer.errors.limit_exceeded_exception.LimitExceededException: <p>You made too many calls in a short period of time. Try again later.</p>
capo_cost_explorer.errors.unknown_monitor_exception.UnknownMonitorException: <p>The cost anomaly monitor does not exist for the account. </p>
capo_cost_explorer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cost_explorer.types.delete_anomaly_monitor_request.DeleteAnomalyMonitorRequest]",
) -> AsyncOperationResponse[
"capo_cost_explorer.types.delete_anomaly_monitor_response.DeleteAnomalyMonitorResponse"
]:
import capo_cost_explorer._operations.aws_insights_index_service.delete_anomaly_monitor
(
output,
http_response,
) = await capo_cost_explorer._operations.aws_insights_index_service.delete_anomaly_monitor.async_delete_anomaly_monitor(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteAnomalyMonitor")
)
input_: capo_cost_explorer.types.delete_anomaly_monitor_request.DeleteAnomalyMonitorRequest = {
"monitor_arn": monitor_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|