Skip to content

CloudWatchLogsClient.get_query_results

rboto-cloudwatch-logs==0.4.0 · Service index · Types

Model summary (excerpt): Returns the results from the specified query. Only the fields requested in the query are returned, along with a @ptr field, which is the identifier for the log record. You can use the value of @ptr in a GetLogRecord operation to get the full log record. GetQueryResults does not start running a query. To run a query, use StartQuery . For more information about how long results of previous...

Install and imports

python -m pip install "rboto[cloudwatch-logs]==0.4.0"
from rboto import CloudWatchLogsClient
from rboto_cloudwatch_logs.types import (
    GetQueryResultsOutput,
)

Signature

async def get_query_results(
    *,
    query_id: str,
    next_token: str | None = None,
    max_items: int | None = None,
) -> GetQueryResultsOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
query_id Yes The ID number of the query.
next_token No The token for the next set of items to return. The token expires after 1 hour.
max_items No The maximum number of log events to return in the response. The maximum is 10,000 log events per request. You can retrieve up to 100,000 log event results from a query by paginating with the nextToken .

Output

GetQueryResultsOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
query_language QueryLanguageOutput | None Always present QueryLanguageOutput
results list[list[ResultFieldOutput]] | None Always present ResultFieldOutput
statistics QueryStatisticsOutput | None Always present QueryStatisticsOutput
status QueryStatusOutput | None Always present QueryStatusOutput
encryption_key str | None Always present —
next_token str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

GetQueryResultsOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_cloudwatch_logs.exceptions:

InvalidParameterError, ResourceNotFoundError, ServiceUnavailableError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model