Deletes a scheduled query and stops all future executions. This operation also removes any configured actions and associated resources.
Parameters:
Raises:
Source code in docs_src/capo_cloudwatch_logs/_services/async_cloud_watch_logs.py
| async def delete_scheduled_query(
self,
identifier: "capo_cloudwatch_logs.types.scheduled_query_identifier.ScheduledQueryIdentifier",
*,
config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
) -> "capo_cloudwatch_logs.types.delete_scheduled_query_response.DeleteScheduledQueryResponse":
"""<p>Deletes a scheduled query and stops all future executions. This operation also removes any configured actions and associated resources.</p>
Args:
identifier: <p>The ARN or name of the scheduled query to delete.</p>
Raises:
capo_cloudwatch_logs.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
capo_cloudwatch_logs.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request. This exception is returned when the service encounters an unexpected condition that prevents it from fulfilling the request.</p>
capo_cloudwatch_logs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_cloudwatch_logs.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
capo_cloudwatch_logs.errors.validation_exception.ValidationException: <p>One of the parameters for the request is not valid.</p>
capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudwatch_logs.types.delete_scheduled_query_request.DeleteScheduledQueryRequest]",
) -> AsyncOperationResponse[
"capo_cloudwatch_logs.types.delete_scheduled_query_response.DeleteScheduledQueryResponse"
]:
import capo_cloudwatch_logs._operations.logs_20140328.delete_scheduled_query
(
output,
http_response,
) = await capo_cloudwatch_logs._operations.logs_20140328.delete_scheduled_query.async_delete_scheduled_query(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteScheduledQuery")
)
input_: capo_cloudwatch_logs.types.delete_scheduled_query_request.DeleteScheduledQueryRequest = {
"identifier": identifier
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|