Skip to content

About *MaxResults field in DescribeXXXInput #2258

Answered by RanVaknin
sdminonne asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @sdminonne ,
Since some describe* or list* operations may return a large subset of results, the API allows you to set a limit so you can paginate through the entire list of results. In order to paginate through the results you will need to implement a paginator function with logic to set the limit and call next token (also a parameter in the request)
So while this may be a use case for someone that interacts with the API directly, consumers of the SDK have access to the built-in paginators generated for those supported operations.
So for example ec2.DescribeSubnets:
package main

import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ec2"
)

f…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@github-actions
Comment options

Answer selected by github-actions
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants