Example usage for com.amazonaws.services.ec2.model DescribeKeyPairsResult setKeyPairs

List of usage examples for com.amazonaws.services.ec2.model DescribeKeyPairsResult setKeyPairs

Introduction

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

Prototype


public void setKeyPairs(java.util.Collection<KeyPairInfo> keyPairs) 

Source Link

Document

Information about the key pairs.

Usage

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;
}