Some AWS operations return results that are incomplete and require subsequent requests in order to attain the entire result set. The process of sending subsequent requests to continue where a previous request left off is called pagination. For example, the list_objects operation of Amazon S3 returns up to 1000 objects at a time, and you must send subsequent requests with the appropriate Marker in order to retrieve the next page of results.
paginate(
Operation,
PageSize = NULL,
MaxItems = NULL,
StartingToken = NULL,
StopOnSameToken = FALSE
)
paginate_lapply(
Operation,
FUN,
...,
PageSize = NULL,
MaxItems = NULL,
StartingToken = NULL,
StopOnSameToken = FALSE
)
paginate_sapply(
Operation,
FUN,
...,
simplify = TRUE,
PageSize = NULL,
MaxItems = NULL,
StartingToken = NULL,
StopOnSameToken = FALSE
)
The operation for example an s3 operation: svc$list_buckets()
The size of each page.
Limits the maximum number of total returned items returned while paginating.
Can be used to modify the starting marker or token of a paginator. This argument if useful for resuming pagination from a previous token or starting pagination at a known position.
Exits paginator if previous token matches current token.
For some APIs, such as CloudWatchLogs events, the next page token will always be present.
When set to TRUE
, the paginator will stop when the token doesn't change.
the function to be applied to each response element of operation
.
optional arguments to FUN
.
See base::sapply().
list of responses from the operation.
if (FALSE) { # \dontrun{
# The following example retrieves object list. The request specifies max
# keys to limit response to include only 2 object keys.
paginate(
svc$list_objects_v2(
Bucket = "DOC-EXAMPLE-BUCKET"
),
MaxItems = 50
)
} # }