Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- importKeyPair :: Text -> ByteString -> ImportKeyPair
- data ImportKeyPair
- ikpDryRun :: Lens' ImportKeyPair (Maybe Bool)
- ikpKeyName :: Lens' ImportKeyPair Text
- ikpPublicKeyMaterial :: Lens' ImportKeyPair ByteString
- importKeyPairResponse :: Int -> ImportKeyPairResponse
- data ImportKeyPairResponse
- ikprsKeyFingerprint :: Lens' ImportKeyPairResponse (Maybe Text)
- ikprsKeyName :: Lens' ImportKeyPairResponse (Maybe Text)
- ikprsResponseStatus :: Lens' ImportKeyPairResponse Int
Creating a Request
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:
data ImportKeyPair Source
See: importKeyPair
smart constructor.
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
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:
data ImportKeyPairResponse Source
See: importKeyPairResponse
smart constructor.
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.
ikprsResponseStatus :: Lens' ImportKeyPairResponse Int Source
The response status code.