Closed mtboren closed 1 year ago
Hello, thanks for opening this issue. Unfortunately the GetLogEvents API has an unconventional pagination mechanism that we cannot automatically support with the existing code generation. But I will take this feature request open for future improvements.
Also reported under https://github.com/aws/aws-tools-for-powershell/issues/147
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.
This is to track the feature request of adding AutoIteration to the rest of the
AWS.Tools.*
cmdlets that do not already have it and on which it makes sense. I have come across just one cmdlet so far (listed below), but this Issue could cover the same for any such remaining cmdlet (there are already hundreds of cmdlets that do support auto-iteration -- hurray!). And, this has been discussed/addressed for other cmdlets in #30 Support automated pagination for operations returning multiple listsCmdlets still needing auto-iteration:
Expected Behavior
When a request would yield more than the "limit" for one response, the cmdlet should auto-iterate through the subsequent responses (presumably using the
NextForwardToken
andNextBackwardToken
values accordingly). Example of a cmdlet that already has this expected behavior:Get-CWLFilteredLogEvent
Current Behavior
The current behavior is that the response limit (1MB or 10,000 items) is hit, and a single object is returned with the events, and with the
NextForwardToken
andNextBackwardToken
properties with which a user can iterate on their own. This differs, obviously, in that the desired behavior is that the cmdlet will auto-iterate for the user (unless the user specifies the-NoAutoIteration
parameter that would be added in this new feature, too).Possible Solution
Seems like the how-to is established with the hundreds of other cmdlets that already support auto-iteration. This feature request is just to add such functionality to remaining cmdlet(s) that do not already support it.
Context
This is in efforts to more easily (for the user) retrieve things from AWS (CWLLogEvents, for example), adding the feature of auto-iteration of item retrieval to the cmdlet itself, removing the need for users to write their own iteration code.
Your Environment
Include as many relevant details about the environment where the bug was discovered.
Get-AWSPowerShellVersion
: 4.0.2.0$PSVersionTable.OS
: Microsoft Windows 6.1.7601 S$PSVersionTable.PSEdition
: Core