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
The aws go sdk v2 introduced a nice way to handle paginated results. e.g. for ECS clusters:
client := ecs.NewFromConfig(cfg)
// initialize the ListClustersPaginator with the ListClustersInput
paginator := ecs.NewListClustersPaginator(client, &ecs.ListClustersInput{})
// Loop until there are no more pages left
for paginator.HasMorePages() {
output, err := paginator.NextPage(context.TODO())
if err != nil {
log.Fatalf("failed to get a page, %v", err)
}
// process the page's results
fmt.Println("Page results:", output.ClusterArns)
}
if paginator.Err() != nil {
log.Fatalf("error occurred during pagination, %v", paginator.Err())
}
The text was updated successfully, but these errors were encountered:
Currently, we only get one page of results.
The aws go sdk v2 introduced a nice way to handle paginated results. e.g. for ECS clusters:
The text was updated successfully, but these errors were encountered: