Copyright | (c) 2013-2017 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@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:
ikpDryRun
- 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 isDryRunOperation
. Otherwise, it isUnauthorizedOperation
.ikpKeyName
- A unique name for the key pair.ikpPublicKeyMaterial
- The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.-- Note: ThisLens
automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLens
accepts and returns only raw unencoded data.
data ImportKeyPair Source #
Contains the parameters for ImportKeyPair.
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. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.-- Note: This Lens
automatically encodes and decodes Base64 data. 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:
ikprsKeyFingerprint
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.ikprsKeyName
- The key pair name you provided.ikprsResponseStatus
- -- | The response status code.
data ImportKeyPairResponse Source #
Contains the output of ImportKeyPair.
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.