@@ -176,26 +176,45 @@ public function describeLogStreams($input = []): DescribeLogStreamsResponse
176176 }
177177
178178 /**
179- * Lists log events from the specified log group. You can list all the log events or filter the results using a filter
180- * pattern, a time range, and the name of the log stream.
179+ * Lists log events from the specified log group. You can list all the log events or filter the results using one or
180+ * more of the following:
181+ *
182+ * - A filter pattern
183+ * - A time range
184+ * - The log stream name, or a log stream name prefix that matches mutltiple log streams
181185 *
182186 * You must have the `logs:FilterLogEvents` permission to perform this operation.
183187 *
184188 * You can specify the log group to search by using either `logGroupIdentifier` or `logGroupName`. You must include one
185189 * of these two parameters, but you can't include both.
186190 *
187- * By default, this operation returns as many log events as can fit in 1 MB (up to 10,000 log events) or all the events
188- * found within the specified time range. If the results include a token, that means there are more log events
189- * available. You can get additional results by specifying the token in a subsequent call. This operation can return
190- * empty results while there are more log events available through the token.
191+ * `FilterLogEvents` is a paginated operation. Each page returned can contain up to 1 MB of log events or up to 10,000
192+ * log events. A returned page might only be partially full, or even empty. For example, if the result of a query would
193+ * return 15,000 log events, the first page isn't guaranteed to have 10,000 log events even if they all fit into 1 MB.
194+ *
195+ * Partially full or empty pages don't necessarily mean that pagination is finished. If the results include a
196+ * `nextToken`, there might be more log events available. You can return these additional log events by providing the
197+ * nextToken in a subsequent `FilterLogEvents` operation. If the results don't include a `nextToken`, then pagination is
198+ * finished.
199+ *
200+ * > If you set `startFromHead` to `true` and you don’t include `endTime` in your request, you can end up in a
201+ * > situation where the pagination doesn't terminate. This can happen when the new log events are being added to the
202+ * > target log streams faster than they are being read. This situation is a good use case for the CloudWatch Logs Live
203+ * > Tail [^1] feature.
191204 *
192205 * The returned log events are sorted by event timestamp, the timestamp when the event was ingested by CloudWatch Logs,
193206 * and the ID of the `PutLogEvents` request.
194207 *
195208 * If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view
196- * data from the linked source accounts. For more information, see CloudWatch cross-account observability [^1 ].
209+ * data from the linked source accounts. For more information, see CloudWatch cross-account observability [^2 ].
197210 *
198- * [^1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
211+ * > If you are using log transformation [^3], the `FilterLogEvents` operation returns only the original versions of log
212+ * > events, before they were transformed. To view the transformed versions, you must use a CloudWatch Logs query. [^4]
213+ *
214+ * [^1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs_LiveTail.html
215+ * [^2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
216+ * [^3]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html
217+ * [^4]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html
199218 *
200219 * @see https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html
201220 * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-logs-2014-03-28.html#filterlogevents
0 commit comments