-
Notifications
You must be signed in to change notification settings - Fork 970
Description
Describe the bug
According to the documentation and the definition here https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/cloudfront/paginators/ListDistributionsIterable.html and the paginator information defined here https://github.com/aws/aws-sdk-java-v2/blob/master/services/directconnect/src/main/resources/codegen-resources/paginators-1.json#L3, the CloudFrontAsyncClient class should provide a method named listDistributionsPaginator.
However it doesn't exist, at least in version 2.4.11.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
The class CloudFrontAsyncClient should provide a method named listDistributionsPaginator.
Current Behavior
The method doesn't exist. There is an alternative approach by using the following code:
package com.example;
import software.amazon.awssdk.services.cloudfront.CloudFrontClient;
import software.amazon.awssdk.services.cloudfront.model.ListDistributionsRequest;
import software.amazon.awssdk.services.cloudfront.paginators.ListDistributionsIterable;
public class ListDistributions {
public static void main(String[] args) {
try (CloudFrontClient client = CloudFrontClient.create()) {
ListDistributionsRequest request = ListDistributionsRequest.builder().build();
ListDistributionsIterable iterable = new ListDistributionsIterable(client, request);
iterable.items().stream()
.forEach(dist -> System.out.println("ID: " + dist.id() +
", Domain: " + dist.domainName() +
", Status: " + dist.status()));
}
}
}However, our solution is based on the use of paginators, and this solution requires a huge rework.
Reproduction Steps
Here is the code that we would need to work:
software.amazon.awssdk.services.cloudfront.paginators.ListDistributionsIterable responses = client.listDistributionsPaginator(request);
responses.iterator().forEachRemaining(....);Possible Solution
No response
Additional Information/Context
I already opened a case at AWS support, for reference [CASE 176579724400345].
I'm opening this issue for tracking.
AWS Java SDK version used
2.40.11
JDK version used
openjdk version "21" 2023-09-19 LTS OpenJDK Runtime Environment Temurin-21+35 (build 21+35-LTS) OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode, sharing)
Operating System and version
Ubuntu 24.04.3 LTS