Example usage for com.amazonaws.services.elasticloadbalancing.model CreateLoadBalancerRequest getAvailabilityZones

List of usage examples for com.amazonaws.services.elasticloadbalancing.model CreateLoadBalancerRequest getAvailabilityZones

Introduction

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

Prototype


public java.util.List<String> getAvailabilityZones() 

Source Link

Document

One or more Availability Zones from the same region as the load balancer.

Usage

From source file:web.component.impl.aws.AWSELBImpl.java

@Override
public CreateLoadBalancerResult createLoadBalancer(CreateLoadBalancerRequest request) {

    if (request.getLoadBalancerName() == null || request.getLoadBalancerName().equals(""))
        throw new IllegalArgumentException("Load Balancer Name not specified.");
    if (request.getListeners() == null || request.getListeners().isEmpty())
        throw new IllegalArgumentException("Listeners not specified.");
    if (request.getAvailabilityZones() == null || request.getAvailabilityZones().isEmpty())
        throw new IllegalArgumentException("AvailavilityZones not specified.");

    return awsHttpClient.createLoadBalancer(request);
}