Skip to content

get_telemetry_query_results

get_telemetry_query_results(
    query_id: str,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> GetTelemetryQueryResultsResponse

Returns the results for the specified query.

Parameters:

  • query_id (str) –

    The unique ID of the query.

  • next_token (Optional[str], default: None ) –

    A token to retrieve the next page of results.

  • max_results (Optional[int], default: None ) –

    The maximum number of result rows to return per page.

Raises:

Examples:

Get telemetry query results The following example retrieves a page of results for a completed query, along with execution statistics. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> client.get_telemetry_query_results(query_id='3b2a1c0d-7e6f-4a5b-8c9d-0e1f2a3b4c5d', max_results=100)
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
def get_telemetry_query_results(
    self,
    query_id: str,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> "capo_cloudwatchomni.types.get_telemetry_query_results_response.GetTelemetryQueryResultsResponse":
    """Returns the results for the specified query.

    Args:
        query_id: The unique ID of the query.
        next_token: A token to retrieve the next page of results.
        max_results: The maximum number of result rows to return per page.

    Raises:
        capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
        capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
        capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
        capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Get telemetry query results
        The following example retrieves a page of results for a completed query, along with execution statistics. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> client.get_telemetry_query_results(query_id='3b2a1c0d-7e6f-4a5b-8c9d-0e1f2a3b4c5d', max_results=100)
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatchomni.types.get_telemetry_query_results_request.GetTelemetryQueryResultsRequest]",
    ) -> OperationResponse[
        "capo_cloudwatchomni.types.get_telemetry_query_results_response.GetTelemetryQueryResultsResponse"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.get_telemetry_query_results

        output, http_response = (
            capo_cloudwatchomni._operations.cloud_watch_omni_frontend.get_telemetry_query_results.get_telemetry_query_results(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTelemetryQueryResults")
    )
    input_: capo_cloudwatchomni.types.get_telemetry_query_results_request.GetTelemetryQueryResultsRequest = {
        "query_id": query_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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