Package org.jclouds.aws.ec2.features
Interface AWSKeyPairApi
-
- All Superinterfaces:
KeyPairApi
public interface AWSKeyPairApi extends KeyPairApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyPair
importKeyPairInRegion(String region, String keyName, String publicKeyMaterial)
Imports the public key from an RSA key pair that you created with a third-party tool.-
Methods inherited from interface org.jclouds.ec2.features.KeyPairApi
createKeyPairInRegion, deleteKeyPairInRegion, describeKeyPairsInRegion, describeKeyPairsInRegionWithFilter
-
-
-
-
Method Detail
-
importKeyPairInRegion
@Named("ImportKeyPair") @POST @Path("/") KeyPair importKeyPairInRegion(@Nullable String region, @FormParam("KeyName") String keyName, @FormParam("PublicKeyMaterial") String publicKeyMaterial)
Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with CreateKeyPair, in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS. You can easily create an RSA key pair on Windows and Linux using the ssh-keygen command line tool (provided with the standard OpenSSH installation). Standard library support for RSA key pair creation is also available in Java, Ruby, Python, and many other programming languages.Supported Formats
- OpenSSH public key format (e.g., the format in ~/.ssh/authorized_keys)
- Base64 encoded DER format
- SSH public key file format as specified in RFC4716
- Parameters:
region
- region to import the key intokeyName
- A unique name for the key pair. Accepts alphanumeric characters, spaces, dashes, and underscores.publicKeyMaterial
- The public key- Returns:
- imported key including fingerprint
-
-