aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
68 stars 13 forks source link

NextToken field is not populated in DescribeScalableTargetsResult #595

Closed emilsedai closed 3 months ago

emilsedai commented 10 months ago

Describe the bug

The result of the function describeScalableTargets of the class AWSApplicationAutoscaling does not have the field nextToken populated.

Pagination doesn't work for this request because nextToken will always be null.

Expected Behavior

The nextToken field would have the token for requesting the next page of the API response.

Current Behavior

The nextToken field in the DescribeScalableTargetsResult is always null.

Reproduction Steps

DescribeScalableTargetsResult result = awsApplicationAutoScalingClient.describeScalableTargets(
        new DescribeScalableTargetsRequest.withMaxResults(2).withServiceNamespace("ecs"));
System.out.println(result.getNextToken()); // this will be null

Possible Solution

No response

Additional Information/Context

The problem was reproduced in accounts with multiple autoscalers.

AWS Java SDK version used

1.12.400

JDK version used

17.0.8

Operating System and version

Ubuntu 22.04.1 LTS

meenakshi8016 commented 10 months ago

Token is returned if the maxResults parameter is not specified, but the documentation mentions the following

If this parameter is used, the operation returns up to MaxResults results at a time,
along with a NextToken value. To get the next set of results, include the NextToken 
value in a subsequent call. If this parameter is not used, the operation returns up to 
50 results and a NextToken value, if applicable.
debora-ito commented 10 months ago

@meenakshi8016 to see if I understand the issue:

How many results do you get in the first call when maxResults is not provided?

meenakshi8016 commented 10 months ago

@debora-ito when maxResults is not populated I get results 50 at a time

debora-ito commented 10 months ago

Understood. I'll reach out to the ApplicationAutoScaling team and keep this issue updated.

Moving this to the central aws-sdk repo for cross-SDK visibility.

debora-ito commented 10 months ago

P98567392

ashishdhingra commented 3 months ago

Reached out to service team for the backlog item in their feature list. As of now, no ETA is available for prioritization and fix. Closing this issue since it is already tracked in service team backlog.

github-actions[bot] commented 3 months ago

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.