Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Imports the public key from an RSA or ED25519 key pair that you created with a third-party tool. Compare this with CreateKeyPair, in which Amazon Web Services creates the key pair and gives the keys to you (Amazon Web Services keeps a copy of the public key). With ImportKeyPair, you create the key pair and give Amazon Web Services just the public key. The private key is never transferred between you and Amazon Web Services.
For more information about key pairs, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide.
Synopsis
- data ImportKeyPair = ImportKeyPair' {}
- newImportKeyPair :: Text -> ByteString -> ImportKeyPair
- importKeyPair_dryRun :: Lens' ImportKeyPair (Maybe Bool)
- importKeyPair_tagSpecifications :: Lens' ImportKeyPair (Maybe [TagSpecification])
- importKeyPair_keyName :: Lens' ImportKeyPair Text
- importKeyPair_publicKeyMaterial :: Lens' ImportKeyPair ByteString
- data ImportKeyPairResponse = ImportKeyPairResponse' {}
- newImportKeyPairResponse :: Int -> ImportKeyPairResponse
- importKeyPairResponse_keyFingerprint :: Lens' ImportKeyPairResponse (Maybe Text)
- importKeyPairResponse_keyName :: Lens' ImportKeyPairResponse (Maybe Text)
- importKeyPairResponse_keyPairId :: Lens' ImportKeyPairResponse (Maybe Text)
- importKeyPairResponse_tags :: Lens' ImportKeyPairResponse (Maybe [Tag])
- importKeyPairResponse_httpStatus :: Lens' ImportKeyPairResponse Int
Creating a Request
data ImportKeyPair Source #
See: newImportKeyPair
smart constructor.
ImportKeyPair' | |
|
Instances
Create a value of ImportKeyPair
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dryRun:ImportKeyPair'
, importKeyPair_dryRun
- 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
.
ImportKeyPair
, importKeyPair_tagSpecifications
- The tags to apply to the imported key pair.
ImportKeyPair
, importKeyPair_keyName
- A unique name for the key pair.
$sel:publicKeyMaterial:ImportKeyPair'
, importKeyPair_publicKeyMaterial
- 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.
Request Lenses
importKeyPair_dryRun :: 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
.
importKeyPair_tagSpecifications :: Lens' ImportKeyPair (Maybe [TagSpecification]) Source #
The tags to apply to the imported key pair.
importKeyPair_keyName :: Lens' ImportKeyPair Text Source #
A unique name for the key pair.
importKeyPair_publicKeyMaterial :: 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
data ImportKeyPairResponse Source #
See: newImportKeyPairResponse
smart constructor.
ImportKeyPairResponse' | |
|
Instances
newImportKeyPairResponse Source #
Create a value of ImportKeyPairResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
ImportKeyPairResponse
, importKeyPairResponse_keyFingerprint
- - For RSA key pairs, the key fingerprint is the MD5 public key
fingerprint as specified in section 4 of RFC 4716.
- For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
ImportKeyPair
, importKeyPairResponse_keyName
- The key pair name that you provided.
ImportKeyPairResponse
, importKeyPairResponse_keyPairId
- The ID of the resulting key pair.
ImportKeyPairResponse
, importKeyPairResponse_tags
- The tags applied to the imported key pair.
$sel:httpStatus:ImportKeyPairResponse'
, importKeyPairResponse_httpStatus
- The response's http status code.
Response Lenses
importKeyPairResponse_keyFingerprint :: Lens' ImportKeyPairResponse (Maybe Text) Source #
- For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC 4716.
- For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
importKeyPairResponse_keyName :: Lens' ImportKeyPairResponse (Maybe Text) Source #
The key pair name that you provided.
importKeyPairResponse_keyPairId :: Lens' ImportKeyPairResponse (Maybe Text) Source #
The ID of the resulting key pair.
importKeyPairResponse_tags :: Lens' ImportKeyPairResponse (Maybe [Tag]) Source #
The tags applied to the imported key pair.
importKeyPairResponse_httpStatus :: Lens' ImportKeyPairResponse Int Source #
The response's http status code.