amazonka-certificatemanager-2.0: Amazon Certificate Manager SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CertificateManager.ExportCertificate

Description

Exports a private certificate issued by a private certificate authority (CA) for use anywhere. The exported file contains the certificate, the certificate chain, and the encrypted private 2048-bit RSA key associated with the public key that is embedded in the certificate. For security, you must assign a passphrase for the private key when exporting it.

For information about exporting and formatting a certificate using the ACM console or CLI, see Export a Private Certificate.

Synopsis

Creating a Request

data ExportCertificate Source #

See: newExportCertificate smart constructor.

Constructors

ExportCertificate' 

Fields

  • certificateArn :: Text

    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
  • passphrase :: Sensitive Base64

    Passphrase to associate with the encrypted exported private key.

    When creating your passphrase, you can use any ASCII character except #, $, or %.

    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. After entering the command, you are prompted for the passphrase.

    openssl rsa -in encrypted_key.pem -out decrypted_key.pem

Instances

Instances details
ToJSON ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

ToHeaders ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

ToPath ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

ToQuery ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

AWSRequest ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

Associated Types

type AWSResponse ExportCertificate #

Generic ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

Associated Types

type Rep ExportCertificate :: Type -> Type #

Show ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

NFData ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

Methods

rnf :: ExportCertificate -> () #

Eq ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

Hashable ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

type AWSResponse ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

type Rep ExportCertificate Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

type Rep ExportCertificate = D1 ('MetaData "ExportCertificate" "Amazonka.CertificateManager.ExportCertificate" "amazonka-certificatemanager-2.0-CRaDh4gXGsJGb4mnkgvuBR" 'False) (C1 ('MetaCons "ExportCertificate'" 'PrefixI 'True) (S1 ('MetaSel ('Just "certificateArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "passphrase") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive Base64))))

newExportCertificate Source #

Create a value of ExportCertificate 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:

ExportCertificate, exportCertificate_certificateArn - 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

$sel:passphrase:ExportCertificate', exportCertificate_passphrase - Passphrase to associate with the encrypted exported private key.

When creating your passphrase, you can use any ASCII character except #, $, or %.

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. After entering the command, you are prompted for the passphrase.

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.

Request Lenses

exportCertificate_certificateArn :: 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

exportCertificate_passphrase :: Lens' ExportCertificate ByteString Source #

Passphrase to associate with the encrypted exported private key.

When creating your passphrase, you can use any ASCII character except #, $, or %.

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. After entering the command, you are prompted for the passphrase.

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

data ExportCertificateResponse Source #

See: newExportCertificateResponse smart constructor.

Constructors

ExportCertificateResponse' 

Fields

Instances

Instances details
Generic ExportCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

Associated Types

type Rep ExportCertificateResponse :: Type -> Type #

Show ExportCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

NFData ExportCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

Eq ExportCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

type Rep ExportCertificateResponse Source # 
Instance details

Defined in Amazonka.CertificateManager.ExportCertificate

type Rep ExportCertificateResponse = D1 ('MetaData "ExportCertificateResponse" "Amazonka.CertificateManager.ExportCertificate" "amazonka-certificatemanager-2.0-CRaDh4gXGsJGb4mnkgvuBR" 'False) (C1 ('MetaCons "ExportCertificateResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "certificate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "certificateChain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "privateKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newExportCertificateResponse Source #

Create a value of ExportCertificateResponse 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:certificate:ExportCertificateResponse', exportCertificateResponse_certificate - The base64 PEM-encoded certificate.

$sel:certificateChain:ExportCertificateResponse', exportCertificateResponse_certificateChain - The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.

$sel:privateKey:ExportCertificateResponse', exportCertificateResponse_privateKey - The encrypted private key associated with the public key in the certificate. The key is output in PKCS #8 format and is base64 PEM-encoded.

$sel:httpStatus:ExportCertificateResponse', exportCertificateResponse_httpStatus - The response's http status code.

Response Lenses

exportCertificateResponse_certificateChain :: Lens' ExportCertificateResponse (Maybe Text) Source #

The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.

exportCertificateResponse_privateKey :: Lens' ExportCertificateResponse (Maybe Text) Source #

The encrypted private key associated with the public key in the certificate. The key is output in PKCS #8 format and is base64 PEM-encoded.