Example usage for com.amazonaws.services.elasticloadbalancing.model LoadBalancerAttributes getCrossZoneLoadBalancing

List of usage examples for com.amazonaws.services.elasticloadbalancing.model LoadBalancerAttributes getCrossZoneLoadBalancing

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticloadbalancing.model LoadBalancerAttributes getCrossZoneLoadBalancing.

Prototype


public CrossZoneLoadBalancing getCrossZoneLoadBalancing() 

Source Link

Document

If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones.

Usage

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();
}