Skip to content

get_query_status_monitor_top_contributors async

get_query_status_monitor_top_contributors(
    monitor_name: ResourceName,
    query_id: str,
    *,
    config_overrides: Optional[AsyncNetworkFlowMonitorClientConfig] = None,
) -> GetQueryStatusMonitorTopContributorsOutput

Returns the current status of a query for the Network Flow Monitor query interface, for a specified query ID and monitor. This call returns the query status for the top contributors for a monitor.

When you create a query, use this call to check the status of the query to make sure that it has has SUCCEEDED before you review the results. Use the same query ID that you used for the corresponding API call to start (create) the query, StartQueryMonitorTopContributors.

When you run a query, use this call to check the status of the query to make sure that the query has SUCCEEDED before you review the results.

Parameters:

  • monitor_name (ResourceName) –

    The name of the monitor.

  • query_id (str) –

    The identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.

Raises:

Source code in docs_src/capo_networkflowmonitor/_services/async_network_flow_monitor.py
async def get_query_status_monitor_top_contributors(
    self,
    monitor_name: "capo_networkflowmonitor.types.resource_name.ResourceName",
    query_id: str,
    *,
    config_overrides: Optional[AsyncNetworkFlowMonitorClientConfig] = None,
) -> "capo_networkflowmonitor.types.get_query_status_monitor_top_contributors_output.GetQueryStatusMonitorTopContributorsOutput":
    """<p>Returns the current status of a query for the Network Flow Monitor query interface, for a specified query ID and monitor. This call returns the query status for the top contributors for a monitor.</p> <p>When you create a query, use this call to check the status of the query to make sure that it has has <code>SUCCEEDED</code> before you review the results. Use the same query ID that you used for the corresponding API call to start (create) the query, <code>StartQueryMonitorTopContributors</code>.</p> <p>When you run a query, use this call to check the status of the query to make sure that the query has <code>SUCCEEDED</code> before you review the results.</p>

    Args:
        monitor_name: <p>The name of the monitor.</p>
        query_id: <p>The identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.</p>

    Raises:
        capo_networkflowmonitor.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
        capo_networkflowmonitor.errors.internal_server_exception.InternalServerException: <p>An internal error occurred.</p>
        capo_networkflowmonitor.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeded a service quota.</p>
        capo_networkflowmonitor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_networkflowmonitor.errors.validation_exception.ValidationException: <p>Invalid request.</p>
        capo_networkflowmonitor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_networkflowmonitor.types.get_query_status_monitor_top_contributors_input.GetQueryStatusMonitorTopContributorsInput]",
    ) -> AsyncOperationResponse[
        "capo_networkflowmonitor.types.get_query_status_monitor_top_contributors_output.GetQueryStatusMonitorTopContributorsOutput"
    ]:
        import capo_networkflowmonitor._operations.network_flow_monitor.get_query_status_monitor_top_contributors

        (
            output,
            http_response,
        ) = await capo_networkflowmonitor._operations.network_flow_monitor.get_query_status_monitor_top_contributors.async_get_query_status_monitor_top_contributors(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetQueryStatusMonitorTopContributors")
    )
    input_: capo_networkflowmonitor.types.get_query_status_monitor_top_contributors_input.GetQueryStatusMonitorTopContributorsInput = {
        "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