| 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 |
Network.AWS.CertificateManager.ImportCertificate
Description
Imports a certificate into AWS Certificate Manager (ACM) to use with services that are integrated with ACM. Note that integrated services allow only certificate types and keys they support to be associated with their resources. Further, their support differs depending on whether the certificate is imported into IAM or into ACM. For more information, see the documentation for each service. For more information about importing certificates into ACM, see Importing Certificates in the AWS Certificate Manager User Guide .
Note the following guidelines when importing third party certificates:
- You must enter the private key that matches the certificate you are importing.
- The private key must be unencrypted. You cannot import a private key that is protected by a password or a passphrase.
- If the certificate you are importing is not self-signed, you must enter its certificate chain.
- If a certificate chain is included, the issuer must be the subject of one of the certificates in the chain.
- The certificate, private key, and certificate chain must be PEM-encoded.
- The current time must be between the
Not BeforeandNot Aftercertificate fields. - The
Issuerfield must not be empty. - The OCSP authority URL, if present, must not exceed 1000 characters.
- To import a new certificate, omit the
CertificateArnargument. Include this argument only when you want to replace a previously imported certificate. - When you import a certificate by using the CLI, you must specify the certificate, the certificate chain, and the private key by their file names preceded by
file://. For example, you can specify a certificate saved in theC:tempfolder asfile://C:tempcertificate_to_import.pem. If you are making an HTTP or HTTPS Query request, include these arguments as BLOBs. - When you import a certificate by using an SDK, you must specify the certificate, the certificate chain, and the private key files in the manner required by the programming language you're using.
This operation returns the Amazon Resource Name (ARN) of the imported certificate.
Synopsis
- importCertificate :: ByteString -> ByteString -> ImportCertificate
- data ImportCertificate
- icCertificateARN :: Lens' ImportCertificate (Maybe Text)
- icCertificateChain :: Lens' ImportCertificate (Maybe ByteString)
- icCertificate :: Lens' ImportCertificate ByteString
- icPrivateKey :: Lens' ImportCertificate ByteString
- importCertificateResponse :: Int -> ImportCertificateResponse
- data ImportCertificateResponse
- icrsCertificateARN :: Lens' ImportCertificateResponse (Maybe Text)
- icrsResponseStatus :: Lens' ImportCertificateResponse Int
Creating a Request
Arguments
| :: ByteString | |
| -> ByteString | |
| -> ImportCertificate |
Creates a value of ImportCertificate with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
icCertificateARN- The Amazon Resource Name (ARN) of an imported certificate to replace. To import a new certificate, omit this field.icCertificateChain- The PEM encoded certificate chain.-- Note: ThisLensautomatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLensaccepts and returns only raw unencoded data.icCertificate- The certificate to import.-- Note: ThisLensautomatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLensaccepts and returns only raw unencoded data.icPrivateKey- The private key that matches the public key in the certificate.-- Note: ThisLensautomatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLensaccepts and returns only raw unencoded data.
data ImportCertificate Source #
See: importCertificate smart constructor.
Instances
Request Lenses
icCertificateARN :: Lens' ImportCertificate (Maybe Text) Source #
The Amazon Resource Name (ARN) of an imported certificate to replace. To import a new certificate, omit this field.
icCertificateChain :: Lens' ImportCertificate (Maybe ByteString) Source #
The PEM encoded certificate chain.-- 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.
icCertificate :: Lens' ImportCertificate ByteString Source #
The certificate to import.-- 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.
icPrivateKey :: Lens' ImportCertificate ByteString Source #
The private key that matches the public key in the certificate.-- 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
importCertificateResponse Source #
Arguments
| :: Int | |
| -> ImportCertificateResponse |
Creates a value of ImportCertificateResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
icrsCertificateARN- The Amazon Resource Name (ARN) of the imported certificate.icrsResponseStatus- -- | The response status code.
data ImportCertificateResponse Source #
See: importCertificateResponse smart constructor.
Instances
Response Lenses
icrsCertificateARN :: Lens' ImportCertificateResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the imported certificate.
icrsResponseStatus :: Lens' ImportCertificateResponse Int Source #
- - | The response status code.