Copyright | (c) 2013-2021 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 |
Imports a certificate into Amazon Web Services 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 Amazon Web Services Certificate Manager User Guide.
ACM does not provide managed renewal for certificates that you import.
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.
- The private key must be no larger than 5 KB (5,120 bytes).
- 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 Before
andNot After
certificate fields. - The
Issuer
field must not be empty. - The OCSP authority URL, if present, must not exceed 1000 characters.
- To import a new certificate, omit the
CertificateArn
argument. 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
fileb://
. For example, you can specify a certificate saved in theC:\temp
folder asfileb://C:\temp\certificate_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.
- The cryptographic algorithm of an imported certificate must match the algorithm of the signing CA. For example, if the signing CA key type is RSA, then the certificate key type must also be RSA.
This operation returns the Amazon Resource Name (ARN) of the imported certificate.
Synopsis
- data ImportCertificate = ImportCertificate' {}
- newImportCertificate :: ByteString -> ByteString -> ImportCertificate
- importCertificate_certificateArn :: Lens' ImportCertificate (Maybe Text)
- importCertificate_certificateChain :: Lens' ImportCertificate (Maybe ByteString)
- importCertificate_tags :: Lens' ImportCertificate (Maybe (NonEmpty Tag))
- importCertificate_certificate :: Lens' ImportCertificate ByteString
- importCertificate_privateKey :: Lens' ImportCertificate ByteString
- data ImportCertificateResponse = ImportCertificateResponse' {
- certificateArn :: Maybe Text
- httpStatus :: Int
- newImportCertificateResponse :: Int -> ImportCertificateResponse
- importCertificateResponse_certificateArn :: Lens' ImportCertificateResponse (Maybe Text)
- importCertificateResponse_httpStatus :: Lens' ImportCertificateResponse Int
Creating a Request
data ImportCertificate Source #
See: newImportCertificate
smart constructor.
ImportCertificate' | |
|
Instances
Create a value of ImportCertificate
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:certificateArn:ImportCertificate'
, importCertificate_certificateArn
- The
Amazon Resource Name (ARN)
of an imported certificate to replace. To import a new certificate, omit
this field.
$sel:certificateChain:ImportCertificate'
, importCertificate_certificateChain
- 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.
$sel:tags:ImportCertificate'
, importCertificate_tags
- One or more resource tags to associate with the imported certificate.
Note: You cannot apply tags when reimporting a certificate.
$sel:certificate:ImportCertificate'
, importCertificate_certificate
- 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.
$sel:privateKey:ImportCertificate'
, importCertificate_privateKey
- 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.
Request Lenses
importCertificate_certificateArn :: Lens' ImportCertificate (Maybe Text) Source #
The Amazon Resource Name (ARN) of an imported certificate to replace. To import a new certificate, omit this field.
importCertificate_certificateChain :: 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.
importCertificate_tags :: Lens' ImportCertificate (Maybe (NonEmpty Tag)) Source #
One or more resource tags to associate with the imported certificate.
Note: You cannot apply tags when reimporting a certificate.
importCertificate_certificate :: 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.
importCertificate_privateKey :: 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
data ImportCertificateResponse Source #
See: newImportCertificateResponse
smart constructor.
ImportCertificateResponse' | |
|
Instances
newImportCertificateResponse Source #
Create a value of ImportCertificateResponse
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:certificateArn:ImportCertificate'
, importCertificateResponse_certificateArn
- The
Amazon Resource Name (ARN)
of the imported certificate.
$sel:httpStatus:ImportCertificateResponse'
, importCertificateResponse_httpStatus
- The response's http status code.
Response Lenses
importCertificateResponse_certificateArn :: Lens' ImportCertificateResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the imported certificate.
importCertificateResponse_httpStatus :: Lens' ImportCertificateResponse Int Source #
The response's http status code.