List of usage examples for com.amazonaws.services.ec2.model DescribeKeyPairsResult setKeyPairs
public void setKeyPairs(java.util.Collection<KeyPairInfo> keyPairs)
Information about the key pairs.
From source file:org.jenkinsci.plugins.ec2harness.MockAmazonEC2.java
License:Open Source License
public DescribeKeyPairsResult describeKeyPairs() throws AmazonServiceException, AmazonClientException { printcall();/*from ww w .j a v a2s. co m*/ DescribeKeyPairsResult describeKeyPairsResult = new DescribeKeyPairsResult(); ArrayList<KeyPairInfo> keyPairs = new ArrayList<KeyPairInfo>(); KeyPairInfo myKey = new KeyPairInfo(); myKey.setKeyFingerprint(fingerprint); myKey.setKeyName(keyName); keyPairs.add(myKey); describeKeyPairsResult.setKeyPairs(keyPairs); return describeKeyPairsResult; }