jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <andr...@apache.org>
Subject Re: AWS ELB Availability Zone
Date Thu, 21 Nov 2013 00:36:11 GMT
> 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

Mime
View raw message