class AWS::EC2::KeyPair

def private_key

Returns:
  • (String) - An unencrypted PEM encoded RSA private key.

Other tags:
    Note: - Only call this method on newly created keys.

Other tags:
    See: KeyPairCollection#import -
def private_key
  unless @private_key
    raise 'you can only get the private key for just-created keypairs'
  end
  @private_key
end