Example usage for com.amazonaws.services.ec2.model AllocateAddressResult AllocateAddressResult

List of usage examples for com.amazonaws.services.ec2.model AllocateAddressResult AllocateAddressResult

Introduction

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

Prototype

AllocateAddressResult

Source Link

Usage

From source file:jp.primecloud.auto.aws.typica.EucaEc2Client.java

License:Open Source License

@Override
public AllocateAddressResult allocateAddress(AllocateAddressRequest allocateAddressRequest) {
    try {/*from w w  w.jav  a2  s .  com*/
        String publicIp = jec2.allocateAddress();
        return new AllocateAddressResult().withPublicIp(publicIp);
    } catch (EC2Exception e) {
        throw new AmazonClientException(e);
    }
}