export_certificate
¶
export_certificate(
certificate_arn: Arn,
passphrase: PassphraseBlob,
*,
config_overrides: Optional[ACMClientConfig] = None,
) -> ExportCertificateResponse
Exports a private certificate issued by a private certificate authority (CA) or a public certificate for use anywhere. The exported file contains the certificate, the certificate chain, and the encrypted private 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 and Export a public certificate.
ACM public certificates created prior to June 17, 2025 cannot be exported.
Parameters:
-
certificate_arn(Arn) –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(PassphraseBlob) –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
Raises:
-
InvalidArnException–The requested Amazon Resource Name (ARN) does not refer to an existing resource.
-
RequestInProgressException–The certificate request is in process and the certificate in your account has not yet been issued.
-
ResourceNotFoundException–The specified certificate cannot be found in the caller's account or the caller's account cannot be found.
-
ThrottlingException–The request was denied because it exceeded a quota.
-
ValidationException–The supplied input failed to satisfy constraints of an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_acm/_services/acm.py
964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 | |