awswrangler.cloudwatch.wait_query¶
- awswrangler.cloudwatch.wait_query(query_id: str, boto3_session: Session | None = None, cloudwatch_query_wait_polling_delay: float = 1.0) dict[str, Any] ¶
Wait query ends.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html
Note
This function has arguments which can be configured globally through wr.config or environment variables:
cloudwatch_query_wait_polling_delay
Check out the Global Configurations Tutorial for details.
- Parameters:
query_id (
str
) – Query ID.boto3_session (
Session
|None
) – The default boto3 session will be used if boto3_session isNone
.cloudwatch_query_wait_polling_delay (
float
) – Interval in seconds for how often the function will check if the CloudWatch query has completed.
- Return type:
dict
[str
,Any
]- Returns:
Query result payload.
Examples
>>> import awswrangler as wr >>> query_id = wr.cloudwatch.start_query( ... log_group_names=["loggroup"], ... query="fields @timestamp, @message | sort @timestamp desc | limit 5", ... ) ... response = wr.cloudwatch.wait_query(query_id=query_id)