amazonka-ec2-0.0.3: Amazon Elastic Compute Cloud SDK.

Safe HaskellNone




Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.

You can have up to five thousand key pairs per region.

The key pair returned to you is available only in the region in which you create it. To create a key pair that is available in all regions, use ImportKeyPair.

For more information about key pairs, see Key Pairs in the Amazon ElasticCompute Cloud User Guide.



Request constructor

createKeyPair Source

CreateKeyPair constructor.

The fields accessible through corresponding lenses are:

Request lenses

ckpKeyName :: Lens' CreateKeyPair Text Source

A unique name for the key pair.

Constraints: Up to 255 ASCII characters


Response constructor

Response lenses

ckprKeyFingerprint :: Lens' CreateKeyPairResponse Text Source

The SHA-1 digest of the DER encoded private key.

ckprKeyMaterial :: Lens' CreateKeyPairResponse Text Source

An unencrypted PEM encoded RSA private key.

ckprKeyName :: Lens' CreateKeyPairResponse Text Source

The name of the key pair.