import_certificate
¶
import_certificate(
usage: CertificateUsageType,
certificate: CertificateBodyType,
*,
config_overrides: Optional[TransferClientConfig] = None,
certificate_chain: Optional[CertificateChainType] = None,
private_key: Optional[PrivateKeyType] = None,
active_date: Optional[CertDate] = None,
inactive_date: Optional[CertDate] = None,
description: Optional[Description] = None,
tags: Optional[Tags] = None,
) -> ImportCertificateResponse
Imports the signing and encryption certificates that you need to create local (AS2) profiles and partner profiles.
You can import both the certificate and its chain in the Certificate parameter.
After importing a certificate, Transfer Family automatically creates a Amazon CloudWatch metric called DaysUntilExpiry that tracks the number of days until the certificate expires. The metric is based on the InactiveDate parameter and is published daily in the AWS/Transfer namespace.
It can take up to a full day after importing a certificate for Transfer Family to emit the DaysUntilExpiry metric to your account.
If you use the Certificate parameter to upload both the certificate and its chain, don't use the CertificateChain parameter.
CloudWatch monitoring
The DaysUntilExpiry metric includes the following specifications:
-
Units: Count (days)
-
Dimensions:
CertificateId(always present),Description(if provided during certificate import) -
Statistics: Minimum, Maximum, Average
-
Frequency: Published daily
Parameters:
-
usage(CertificateUsageType) –Specifies how this certificate is used. It can be used in the following ways:
-
SIGNING: For signing AS2 messages -
ENCRYPTION: For encrypting AS2 messages -
TLS: For securing AS2 communications sent over HTTPS
-
-
certificate(CertificateBodyType) –-
For the CLI, provide a file path for a certificate in URI format. For example,
--certificate file://encryption-cert.pem. Alternatively, you can provide the raw content. -
For the SDK, specify the raw content of a certificate file. For example,
--certificate "`cat encryption-cert.pem`".
You can provide both the certificate and its chain in this parameter, without needing to use the
CertificateChainparameter. If you use this parameter for both the certificate and its chain, do not use theCertificateChainparameter. -
-
certificate_chain(Optional[CertificateChainType], default:None) –An optional list of certificates that make up the chain for the certificate that's being imported.
-
private_key(Optional[PrivateKeyType], default:None) –-
For the CLI, provide a file path for a private key in URI format. For example,
--private-key file://encryption-key.pem. Alternatively, you can provide the raw content of the private key file. -
For the SDK, specify the raw content of a private key file. For example,
--private-key "`cat encryption-key.pem`"
-
-
active_date(Optional[CertDate], default:None) –An optional date that specifies when the certificate becomes active. If you do not specify a value,
ActiveDatetakes the same value asNotBeforeDate, which is specified by the CA. -
inactive_date(Optional[CertDate], default:None) –An optional date that specifies when the certificate becomes inactive. If you do not specify a value,
InactiveDatetakes the same value asNotAfterDate, which is specified by the CA. -
description(Optional[Description], default:None) –A short description that helps identify the certificate.
-
tags(Optional[Tags], default:None) –Key-value pairs that can be used to group and search for certificates.
Raises:
-
InternalServiceError–This exception is thrown when an error occurs in the Transfer Family service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
ResourceNotFoundException–This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
-
ServiceUnavailableException–The request has failed because the Amazon Web ServicesTransfer Family service is not available.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_transfer/_services/transfer.py
2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 | |