describeLoadBalancers does not show classic load balancers

Viewed 1047

I'm trying to get a list of load balancer using the AWS Java API.

    AmazonElasticLoadBalancing elbClient = AmazonElasticLoadBalancingClient
            .builder()
            .withCredentials(new DefaultAWSCredentialsProviderChain())
            .withRegion(Regions.EU_WEST_1)
            .build();
    DescribeLoadBalancersResult result = elbClient.describeLoadBalancers(
            new DescribeLoadBalancersRequest());
    for (LoadBalancer lb : result.getLoadBalancers()) {
        System.out.println(lb.getLoadBalancerName());
    }

The call works, but only the new application load balancers are listed. I don't see any of the classic load balancers. My credentials are unrestricted.

How do I get a handle to classic load balancers?

2 Answers
Related