in aws-applicationinsights-application/src/main/java/software/amazon/applicationinsights/application/HandlerHelper.java [552:574]
private static List<ApplicationComponent> listApplicationComponents(
String resourceGroupName,
AmazonWebServicesClientProxy proxy,
ApplicationInsightsClient applicationInsightsClient) {
List<ApplicationComponent> appComponents = new ArrayList<>();
String nextToken = null;
do {
ListComponentsResponse response = proxy.injectCredentialsAndInvokeV2(ListComponentsRequest.builder()
.resourceGroupName(resourceGroupName)
.maxResults(MAX_COMPONENTS_PER_LIST_REQUEST)
.nextToken(nextToken)
.build(),
applicationInsightsClient::listComponents);
if (response.applicationComponentList() != null) {
appComponents.addAll(response.applicationComponentList());
}
nextToken = response.nextToken();
} while (nextToken != null);
return appComponents;
}