Class | AWS::EC2::KeyPairCollection |
In: |
lib/aws/ec2/key_pair_collection.rb
|
Parent: | Collection |
@param [String] key_name A name for the key pair. @return [KeyPair] Returns a new key pair.
Yields once for each key pair in your account. @return [nil]
Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with {create}, in which EC2 creates the key pair and gives the keys to you (EC2 keeps a copy of the public key). With ImportKeyPair, you create the key pair and give EC2 just the public key. The private key is never transferred between you and EC2.
DSA keys are not supported. Make sure your key generator is set up to create RSA keys. Supported lengths: 1024, 2048, and 4096.
@param [String] key_name A name for this key pair. @param [String] public_key The RSA public key. @return [KeyPair] Returns a new key pair.