Could someone help me understand how to set Availability Zones for
when creating a AWS ELB? I have included the error message as well
as my code below.
In this lines:
context.getLoadBalancerService().createLoadBalancerInLocation(null,
loadBalancer.getLoadBalancerId(),
loadBalancer.getProtocol(),
Integer.parseInt(loadBalancer.getPort()),
Integer.parseInt(loadBalancer.getInstancePort()),
nodes);
where is "loadBalancer" defined?
Could you put the full code sample (minus secret keys etc., obviously)
in a Gist [1] or Pastie [2]? And which version of jclouds are you using?
Also, as a temporary workaround or, if you're not looking to write
portable code, alternative approach, you can also talk to the ELB API
[3] directly [4]. One of the "createListeningIn*" methods on the
elbApi.getLoadBalancerApi() [5] might be what you're looking for.
Regards
ap
[1] http://gist.github.com
[2] http://pastie.org
[3]
https://github.com/jclouds/jclouds-labs-aws/blob/master/elb/src/main/java/org/jclouds/elb/ELBApi.java
[4]
https://github.com/jclouds/jclouds-labs-aws/blob/master/elb/src/test/java/org/jclouds/elb/loadbalancer/ELBLoadBalancerServiceLiveTest.java#L64
[5]
https://github.com/jclouds/jclouds-labs-aws/blob/master/elb/src/main/java/org/jclouds/elb/features/LoadBalancerApi.java