Hi

Thank you for the given example

Regards

On Mon, Mar 16, 2015 at 7:23 AM, Yaron Rosenbaum <[email protected]>
wrote:

> Nipun,
> For what it’s worth:
>
> <dependency>
> <groupId>org.apache.jclouds.labs</groupId>
> <artifactId>aws-elb</artifactId>
> <version>1.8.0</version>
> </dependency>
>
>
> import org.jclouds.elb.ELBApi;
>
> private synchronized ELBApi getLoadBalancer() {
> if (null == _elb) _elb = 
> ContextBuilder.newBuilder("aws-elb").credentials(getAccount(),
> getSecret()).buildApi(ELBApi.class);
> return _elb;
> }
>
> @Override
> public void addServerToLoadBalancer(ComputeMetadata node, final
> MetaLocation location) {
> getLoadBalancer().getInstanceApiForRegion(location
> .getRegion()).registerInstanceWithLoadBalancer(node.getProviderId(),
> location.getLoadBalancerName());
> }
>
>
> @Override
> public void removeServerFromLoadBalancer(ComputeMetadata node, final
> MetaLocation location) {
> getLoadBalancer().getInstanceApiForRegion(location
> .getRegion()).deregisterInstanceFromLoadBalancer(node.getProviderId(),
> location.getLoadBalancerName());
> }
>
> MetaLocation is not a jClouds API, nor is getAccount() and getSecret(),
> but you get the gist of it.
>
> Maybe it would be a good idea to add something like this to the wiki.
>
> (Y)
>
> On Mar 16, 2015, at 9:57 AM, Nipun Udara <[email protected]> wrote:
>
> Hi all
>
> Is there any examples for using aws elastic loadbalancer with jclouds
>
> Regards
> Nipun Udara
>
>
>
>
>


-- 
Nipun Udara

*Undergraduate*
*Department of Computer Science & Engineering*
*University of Moratuwa*
*Sri Lanka*

Reply via email to