Skip to content

stop_query

stop_query(
    monitor_name: ResourceName,
    query_id: str,
    *,
    config_overrides: Optional[InternetMonitorClientConfig] = None,
) -> StopQueryOutput

Stop a query that is progress for a specific monitor.

Parameters:

  • monitor_name (ResourceName) –

    The name of the monitor.

  • 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/internet_monitor.py
def stop_query(
    self,
    monitor_name: "capo_internetmonitor.types.resource_name.ResourceName",
    query_id: str,
    *,
    config_overrides: Optional[InternetMonitorClientConfig] = 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.
    """

    def _handler(
        req: "OperationRequest[capo_internetmonitor.types.stop_query_input.StopQueryInput]",
    ) -> OperationResponse[
        "capo_internetmonitor.types.stop_query_output.StopQueryOutput"
    ]:
        import capo_internetmonitor._operations.internet_monitor20210603.stop_query

        output, http_response = (
            capo_internetmonitor._operations.internet_monitor20210603.stop_query.stop_query(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output