Example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient AmazonEC2AsyncClient

List of usage examples for com.amazonaws.services.ec2 AmazonEC2AsyncClient AmazonEC2AsyncClient

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient AmazonEC2AsyncClient.

Prototype

@Deprecated
public AmazonEC2AsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) 

Source Link

Document

Constructs a new asynchronous client to invoke service methods on Amazon EC2 using the specified AWS account credentials provider and executor service.

Usage

From source file:com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils.java

License:Open Source License

public static AmazonEC2AsyncClient getAsyncClient(AuthCredentialsServiceState credentials, String region,
        ExecutorService executorService) {
    AmazonEC2AsyncClient ec2AsyncClient = new AmazonEC2AsyncClient(
            new BasicAWSCredentials(credentials.privateKeyId, credentials.privateKey), executorService);

    ec2AsyncClient.setRegion(Region.getRegion(Regions.fromName(region)));

    return ec2AsyncClient;

}