You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To paginate responses from GetLogEvents api currently requires either nextForwardToken or nextBackwardToken depending on is startFromHead is true. This means it does not seem to neatly fit into the pagination model and adding
Describe the solution you'd like
Ideally, API would be return a single nextToken in the response that would either go forward or backward based on the original starting request.
Thanks very much for reviewing my issue. I'm not sure if this belongs in this repo or if this something that's controlled by the internal AWS Cloudwatch logs team. Feel free to close if this doesn't belong here.
The text was updated successfully, but these errors were encountered:
Thanks for your comment. You assume correctly - the internal AWS Cloudwatch team controls the naming of the parameters here. But it looks like here you're just requesting that this operation be paginated!
The name of that parameter is an implementation detail, as the AWS CLI, Python SDK (boto3) and other AWS SDKs abstract over this and provide paginator functionality:
I can certainly request that a paginator be added for this operation by the AWS Cloudwatch team - paginator models are used by other AWS SDKs so are added upstream.
Perhaps my issue is based on a misunderstanding of how the paginator works. The complexity with GetLogEvents is not so much the name of the next token but more that a different field is used as the next token depending on if you're going forward or backward in time.
If the value is true, the earliest log events are returned first. If the value is false, the latest log events are returned first. The default value is false.
If you are using a previous nextForwardToken value as the nextToken in this operation, you must specify true for startFromHead.
If there's a way to support pagination even with that complexity I am all for it! Thanks for taking the time to triage and notify upstream.
To paginate responses from
GetLogEvents
api currently requires eithernextForwardToken
ornextBackwardToken
depending on isstartFromHead
is true. This means it does not seem to neatly fit into the pagination model and addingto https://github.com/frosforever/botocore/blob/develop/botocore/data/logs/2014-03-28/paginators-1.json would not work to automatically paginate results.
Describe the solution you'd like
Ideally, API would be return a single
nextToken
in the response that would either go forward or backward based on the original starting request.Thanks very much for reviewing my issue. I'm not sure if this belongs in this repo or if this something that's controlled by the internal AWS Cloudwatch logs team. Feel free to close if this doesn't belong here.
The text was updated successfully, but these errors were encountered: