Copyright | (c) 2013-2018 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 |
Exports a private certificate issued by a private certificate authority (CA) for use anywhere. You can export the certificate, the certificate chain, and the encrypted private key associated with the public key embedded in the certificate. You must store the private key securely. The private key is a 2048 bit RSA key. You must provide a passphrase for the private key when exporting it. You can use the following OpenSSL command to decrypt it later. Provide the passphrase when prompted.
openssl rsa -in encrypted_key.pem -out decrypted_key.pem
- exportCertificate :: Text -> ByteString -> ExportCertificate
- data ExportCertificate
- ecCertificateARN :: Lens' ExportCertificate Text
- ecPassphrase :: Lens' ExportCertificate ByteString
- exportCertificateResponse :: Int -> ExportCertificateResponse
- data ExportCertificateResponse
- ecrsPrivateKey :: Lens' ExportCertificateResponse (Maybe Text)
- ecrsCertificate :: Lens' ExportCertificateResponse (Maybe Text)
- ecrsCertificateChain :: Lens' ExportCertificateResponse (Maybe Text)
- ecrsResponseStatus :: Lens' ExportCertificateResponse Int
Creating a Request
Creates a value of ExportCertificate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ecCertificateARN
- An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012
ecPassphrase
- Passphrase to associate with the encrypted exported private key. If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key:openssl rsa -in encrypted_key.pem -out decrypted_key.pem
-- 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 ExportCertificate Source #
See: exportCertificate
smart constructor.
Request Lenses
ecCertificateARN :: Lens' ExportCertificate Text Source #
An Amazon Resource Name (ARN) of the issued certificate. This must be of the form: arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012
ecPassphrase :: Lens' ExportCertificate ByteString Source #
Passphrase to associate with the encrypted exported private key. If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key: openssl rsa -in encrypted_key.pem -out decrypted_key.pem
-- 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
exportCertificateResponse Source #
Creates a value of ExportCertificateResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ecrsPrivateKey
- The PEM-encoded private key associated with the public key in the certificate.ecrsCertificate
- The base64 PEM-encoded certificate.ecrsCertificateChain
- The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.ecrsResponseStatus
- -- | The response status code.
data ExportCertificateResponse Source #
See: exportCertificateResponse
smart constructor.
Response Lenses
ecrsPrivateKey :: Lens' ExportCertificateResponse (Maybe Text) Source #
The PEM-encoded private key associated with the public key in the certificate.
ecrsCertificate :: Lens' ExportCertificateResponse (Maybe Text) Source #
The base64 PEM-encoded certificate.
ecrsCertificateChain :: Lens' ExportCertificateResponse (Maybe Text) Source #
The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.
ecrsResponseStatus :: Lens' ExportCertificateResponse Int Source #
- - | The response status code.