Returns the current status of a query for the Amazon CloudWatch Internet Monitor query interface, for a specified query ID and monitor. When you run a query, check the status to make sure that the query has SUCCEEDED before you review the results.
-
QUEUED: The query is scheduled to run.
-
RUNNING: The query is in progress but not complete.
-
SUCCEEDED: The query completed sucessfully.
-
FAILED: The query failed due to an error.
-
CANCELED: The query was canceled.
Parameters:
-
monitor_name
(ResourceName)
–
-
query_id
(str)
–
The ID of the query that you want to return the status for. A QueryId is an internally-generated dentifier for a specific query.
Raises:
Source code in docs_src/capo_internetmonitor/_services/internet_monitor.py
| def get_query_status(
self,
monitor_name: "capo_internetmonitor.types.resource_name.ResourceName",
query_id: str,
*,
config_overrides: Optional[InternetMonitorClientConfig] = None,
) -> "capo_internetmonitor.types.get_query_status_output.GetQueryStatusOutput":
"""<p>Returns the current status of a query for the Amazon CloudWatch Internet Monitor query interface, for a specified query ID and monitor. When you run a query, check the status to make sure that the query has <code>SUCCEEDED</code> before you review the results.</p> <ul> <li> <p> <code>QUEUED</code>: The query is scheduled to run.</p> </li> <li> <p> <code>RUNNING</code>: The query is in progress but not complete.</p> </li> <li> <p> <code>SUCCEEDED</code>: The query completed sucessfully.</p> </li> <li> <p> <code>FAILED</code>: The query failed due to an error.</p> </li> <li> <p> <code>CANCELED</code>: The query was canceled.</p> </li> </ul>
Args:
monitor_name: <p>The name of the monitor.</p>
query_id: <p>The ID of the query that you want to return the status for. A <code>QueryId</code> is an internally-generated dentifier 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.get_query_status_input.GetQueryStatusInput]",
) -> OperationResponse[
"capo_internetmonitor.types.get_query_status_output.GetQueryStatusOutput"
]:
import capo_internetmonitor._operations.internet_monitor20210603.get_query_status
output, http_response = (
capo_internetmonitor._operations.internet_monitor20210603.get_query_status.get_query_status(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetQueryStatus")
)
input_: capo_internetmonitor.types.get_query_status_input.GetQueryStatusInput = {
"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
|