Skip to content

stop_query_workload_insights_top_contributors

stop_query_workload_insights_top_contributors(
    scope_id: ScopeId,
    query_id: str,
    *,
    config_overrides: Optional[NetworkFlowMonitorClientConfig] = None,
) -> StopQueryWorkloadInsightsTopContributorsOutput

Stop a top contributors query for workload insights. Specify the query that you want to stop by providing a query ID and a scope ID.

Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned.

Parameters:

  • scope_id (ScopeId) –

    The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.

  • 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 create a query.

Raises:

Source code in docs_src/capo_networkflowmonitor/_services/network_flow_monitor.py
def stop_query_workload_insights_top_contributors(
    self,
    scope_id: "capo_networkflowmonitor.types.scope_id.ScopeId",
    query_id: str,
    *,
    config_overrides: Optional[NetworkFlowMonitorClientConfig] = None,
) -> "capo_networkflowmonitor.types.stop_query_workload_insights_top_contributors_output.StopQueryWorkloadInsightsTopContributorsOutput":
    """<p>Stop a top contributors query for workload insights. Specify the query that you want to stop by providing a query ID and a scope ID. </p> <p>Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned.</p>

    Args:
        scope_id: <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</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 create 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.
    """

    def _handler(
        req: "OperationRequest[capo_networkflowmonitor.types.stop_query_workload_insights_top_contributors_input.StopQueryWorkloadInsightsTopContributorsInput]",
    ) -> OperationResponse[
        "capo_networkflowmonitor.types.stop_query_workload_insights_top_contributors_output.StopQueryWorkloadInsightsTopContributorsOutput"
    ]:
        import capo_networkflowmonitor._operations.network_flow_monitor.stop_query_workload_insights_top_contributors

        output, http_response = (
            capo_networkflowmonitor._operations.network_flow_monitor.stop_query_workload_insights_top_contributors.stop_query_workload_insights_top_contributors(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("StopQueryWorkloadInsightsTopContributors"),
    )
    input_: capo_networkflowmonitor.types.stop_query_workload_insights_top_contributors_input.StopQueryWorkloadInsightsTopContributorsInput = {
        "scope_id": scope_id,
        "query_id": query_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output