Example usage for com.amazonaws.services.ec2.model CreateKeyPairRequest getKeyName

List of usage examples for com.amazonaws.services.ec2.model CreateKeyPairRequest getKeyName

Introduction

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

Prototype


public String getKeyName() 

Source Link

Document

A unique name for the key pair.

Usage

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

License:Open Source License

@Override
public CreateKeyPairResult createKeyPair(CreateKeyPairRequest createKeyPairRequest) {
    try {/*  www . j  a  v  a2  s .  c  o m*/
        com.xerox.amazonws.ec2.KeyPairInfo info = jec2.createKeyPair(createKeyPairRequest.getKeyName());
        KeyPair keyPair = new KeyPairConverter().convert(info);
        return new CreateKeyPairResult().withKeyPair(keyPair);
    } catch (EC2Exception e) {
        throw new AmazonClientException(e);
    }
}