--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.
Nirmal,Here's my EC2 cheat sheet:ContextBuilder builder = ContextBuilder.newBuilder("aws-ec2").credentials(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).modules(ImmutableSet.<Module>of(new SLF4JLoggingModule())).overrides(overrides);ComputeService computeService = builder.buildView(ComputeServiceContext.class).getComputeService();ComputeServiceContext context = computeService.getContext();Logger logger = context.getUtils().getLoggerFactory().getLogger(MyClass.class.getName());RestContext<AWSEC2Client, AWSEC2AsyncClient> restContext = context.unwrap(RestContext.class);AWSEC2Client syncApi = restContext.getApi();AWSEC2AsyncClient asyncApi = restContext.getAsyncApi();Possibly it's not the ideal version - the furtling with ComputeService and ComputeServiceContext could probably be done in fewer keystrokes! - but in the last couple of lines you can see where an AWSEC2Client reference can be obtained.
Hi, Nirmal.
I can't seem to find the doc we have on this, but here's the quick answer. This is a synchronous proxy to AWSEC2AsyncClient which is implemented by reading jaxrs and other annotations.
HTH
--