/** * Constructs a new DescribeLoadBalancersRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param loadBalancerNames * The names of the load balancers. */ public DescribeLoadBalancersRequest(java.util.List<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); }
/** * <p> * The names of the load balancers. * </p> * * @param loadBalancerNames * The names of the load balancers. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeLoadBalancersRequest withLoadBalancerNames(java.util.Collection<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); return this; }
/** * <p> * The names of the load balancers. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setLoadBalancerNames(java.util.Collection)} or {@link #withLoadBalancerNames(java.util.Collection)} if * you want to override the existing values. * </p> * * @param loadBalancerNames * The names of the load balancers. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeLoadBalancersRequest withLoadBalancerNames(String... loadBalancerNames) { if (this.loadBalancerNames == null) { setLoadBalancerNames(new com.amazonaws.internal.SdkInternalList<String>(loadBalancerNames.length)); } for (String ele : loadBalancerNames) { this.loadBalancerNames.add(ele); } return this; }
/** * Constructs a new DescribeLoadBalancersRequest object. Callers should use * the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param loadBalancerNames <p> * The names of the load balancers. * </p> */ public DescribeLoadBalancersRequest(java.util.List<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); }
/** * <p> * The names of the load balancers. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param loadBalancerNames <p> * The names of the load balancers. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeLoadBalancersRequest withLoadBalancerNames( java.util.Collection<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); return this; }
/** * Constructs a new DescribeLoadBalancersRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param loadBalancerNames * The names of the load balancers. */ public DescribeLoadBalancersRequest(java.util.List<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); }
/** * <p> * The names of the load balancers. * </p> * * @param loadBalancerNames * The names of the load balancers. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeLoadBalancersRequest withLoadBalancerNames(java.util.Collection<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); return this; }
private boolean isBalancerAlive(String name) { Collection<String> names = new HashSet<String>(); names.add(name); DescribeLoadBalancersRequest describe = new DescribeLoadBalancersRequest(); describe.setLoadBalancerNames(names); try { DescribeLoadBalancersResult result = elb.describeLoadBalancers(describe); List<LoadBalancerDescription> description = result.getLoadBalancerDescriptions(); if (description.isEmpty()) { return false; } return true; } catch (AmazonServiceException e) { LOGGER.fatal("Exception in isBalancerAlive(" + name + ')', e); } return false; }
/** * <p> * The names of the load balancers. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setLoadBalancerNames(java.util.Collection)} or {@link #withLoadBalancerNames(java.util.Collection)} if * you want to override the existing values. * </p> * * @param loadBalancerNames * The names of the load balancers. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeLoadBalancersRequest withLoadBalancerNames(String... loadBalancerNames) { if (this.loadBalancerNames == null) { setLoadBalancerNames(new com.amazonaws.internal.SdkInternalList<String>(loadBalancerNames.length)); } for (String ele : loadBalancerNames) { this.loadBalancerNames.add(ele); } return this; }
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)); }