Stop a query that is progress for a specific monitor.
Parameters:
-
monitor_name
(ResourceName)
–
-
query_id
(str)
–
The ID of the query that you want to stop. A QueryId is an internally-generated identifier for a specific query.
Raises:
Source code in docs_src/capo_internetmonitor/_services/async_internet_monitor.py
| async def stop_query(
self,
monitor_name: "capo_internetmonitor.types.resource_name.ResourceName",
query_id: str,
*,
config_overrides: Optional[AsyncInternetMonitorClientConfig] = None,
) -> "capo_internetmonitor.types.stop_query_output.StopQueryOutput":
"""<p>Stop a query that is progress for a specific monitor.</p>
Args:
monitor_name: <p>The name of the monitor.</p>
query_id: <p>The ID of the query that you want to stop. A <code>QueryId</code> is an internally-generated identifier for a specific query.</p>
Raises:
capo_internetmonitor.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
capo_internetmonitor.errors.internal_server_exception.InternalServerException: <p>An internal error occurred.</p>
capo_internetmonitor.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeded a service quota.</p>
capo_internetmonitor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_internetmonitor.errors.validation_exception.ValidationException: <p>Invalid request.</p>
capo_internetmonitor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_internetmonitor.types.stop_query_input.StopQueryInput]",
) -> AsyncOperationResponse[
"capo_internetmonitor.types.stop_query_output.StopQueryOutput"
]:
import capo_internetmonitor._operations.internet_monitor20210603.stop_query
(
output,
http_response,
) = await capo_internetmonitor._operations.internet_monitor20210603.stop_query.async_stop_query(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopQuery")
)
input_: capo_internetmonitor.types.stop_query_input.StopQueryInput = {
"monitor_name": monitor_name,
"query_id": query_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|