/** * <p> * The marker for the next set of results. (You received this marker from a previous call.) * </p> * * @param marker * The marker for the next set of results. (You received this marker from a previous call.) * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeLoadBalancersRequest withMarker(String marker) { setMarker(marker); return this; }
/** * <p> * The marker for the next set of results. (You received this marker from a previous call.) * </p> * * @param marker * The marker for the next set of results. (You received this marker from a previous call.) * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeLoadBalancersRequest withMarker(String marker) { setMarker(marker); return this; }
/** * Gets the all elbs desc. * * @param elbClient the elb client * @param region the region * @param balancersRequest the balancers request * @return the all elbs desc */ public static List<LoadBalancerDescription> getAllElbsDesc(AmazonElasticLoadBalancing elbClient, Region region, DescribeLoadBalancersRequest balancersRequest) { List<LoadBalancerDescription> loadDescriptionList = new ArrayList<LoadBalancerDescription>(); DescribeLoadBalancersResult balancersResult; String marker; do { balancersResult = elbClient.describeLoadBalancers(balancersRequest); marker = balancersResult.getNextMarker(); balancersRequest.setMarker(marker); loadDescriptionList.addAll(balancersResult.getLoadBalancerDescriptions()); } while (null != marker); return loadDescriptionList; }
private void forEachElb(Region region, Consumer<LoadBalancerDescription> consumer) { DescribeLoadBalancersRequest request = new DescribeLoadBalancersRequest(); String marker = null; do { rateLimit(); DescribeLoadBalancersResult results = getClient().describeLoadBalancers(request.withMarker(marker)); marker = results.getNextMarker(); results.getLoadBalancerDescriptions().forEach(consumer); writeTagsToNeo4j(results, region, getClient()); request.setMarker(marker); } while (tokenHasNext(marker)); }
public void scanLoadBalancerNames(String... loadBalancerNames) { if (loadBalancerNames == null || loadBalancerNames.length == 0) { return; } DescribeLoadBalancersRequest request = new DescribeLoadBalancersRequest(); request.setLoadBalancerNames(Arrays.asList(loadBalancerNames)); String marker = null; do { rateLimit(); DescribeLoadBalancersResult results = getClient().describeLoadBalancers(request); marker = results.getNextMarker(); results.getLoadBalancerDescriptions().forEach(it -> { projectElb(it, null); }); writeTagsToNeo4j(results, getRegion(), getClient()); request.setMarker(marker); } while (tokenHasNext(marker)); }