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

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.ImportKeyPair

Contents

Description

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.

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

See: AWS API Reference for ImportKeyPair.

Synopsis

Creating a Request

importKeyPair Source

Creates a value of ImportKeyPair with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

ikpDryRun :: Lens' ImportKeyPair (Maybe Bool) Source

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

ikpKeyName :: Lens' ImportKeyPair Text Source

A unique name for the key pair.

ikpPublicKeyMaterial :: Lens' ImportKeyPair ByteString Source

The public key. You must base64 encode the public key material before sending it to AWS.

Note: This Lens automatically encodes and decodes Base64 data, despite what the AWS documentation might say. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.

Destructuring the Response

importKeyPairResponse Source

Creates a value of ImportKeyPairResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

ikprsKeyFingerprint :: Lens' ImportKeyPairResponse (Maybe Text) Source

The MD5 public key fingerprint as specified in section 4 of RFC 4716.

ikprsKeyName :: Lens' ImportKeyPairResponse (Maybe Text) Source

The key pair name you provided.

ikprsStatus :: Lens' ImportKeyPairResponse Int Source

The response status code.