In the original post, I included all the code and the stack trace is from the execution of the included code. "loadBalancer" is just a bean that has the following id="webLoadBalancer" which is just a name I picked randomly protocol="HTTP" port="80" instanceProtocol="HTTP" instancePort="8080" I've attached my POM <dependency> <groupId>org.apache.jclouds</groupId> <artifactId>jclouds-all</artifactId> <version>1.6.2-incubating</version> </dependency> <dependency> <groupId>org.apache.jclouds.labs</groupId> <artifactId>aws-elb</artifactId> <version>1.6.2-incubating</version> </dependency> <dependency> <groupId>org.apache.jclouds.driver</groupId> <artifactId>jclouds-log4j</artifactId> <version>1.6.2-incubating</version> <exclusions> <exclusion> <artifactId>log4j</artifactId> <groupId>log4j</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.jclouds.driver</groupId> <artifactId>jclouds-sshj</artifactId> <version>1.6.2-incubating</version> </dependency>
On Wednesday, November 20, 2013 4:36 PM, Andrew Phillips <[email protected]> wrote: > 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
