List of usage examples for com.amazonaws.services.elasticloadbalancing.model LoadBalancerAttributes getCrossZoneLoadBalancing
public CrossZoneLoadBalancing getCrossZoneLoadBalancing()
If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones.
From source file:com.netflix.simianarmy.aws.conformity.rule.CrossZoneLoadBalancing.java
License:Apache License
/** * Gets the cross-zone load balancing option for an ELB. Can be overridden in subclasses. * @param region the region// w ww .ja va2 s .com * @param lbName the ELB name * @return {@code true} if cross-zone load balancing is enabled */ protected boolean isCrossZoneLoadBalancingEnabled(String region, String lbName) { LoadBalancerAttributes attrs = getAwsClient(region).describeElasticLoadBalancerAttributes(lbName); return attrs.getCrossZoneLoadBalancing().isEnabled(); }