Example usage for com.amazonaws.services.ec2.model DescribeKeyPairsRequest getKeyNames

List of usage examples for com.amazonaws.services.ec2.model DescribeKeyPairsRequest getKeyNames

Introduction

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

Prototype


public java.util.List<String> getKeyNames() 

Source Link

Document

The key pair names.

Usage

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

License:Open Source License

@Override
public DescribeKeyPairsResult describeKeyPairs(DescribeKeyPairsRequest describeKeyPairsRequest) {
    try {/*  www.  j av  a2  s. com*/
        List<com.xerox.amazonws.ec2.KeyPairInfo> infos = jec2
                .describeKeyPairs(describeKeyPairsRequest.getKeyNames());
        List<KeyPairInfo> keyPairs = new KeyPairInfoConverter().convert(infos);
        return new DescribeKeyPairsResult().withKeyPairs(keyPairs);
    } catch (EC2Exception e) {
        throw new AmazonClientException(e);
    }
}