ImportCertificateAuthorityCertificate
Imports your signed private CA certificate into ACM PCA. Before you can call this function, you must create the private certificate authority by calling the CreateCertificateAuthority function. You must then generate a certificate signing request (CSR) by calling the GetCertificateAuthorityCsr function. Take the CSR to your on-premises CA and use the root certificate or a subordinate certificate to sign it. Create a certificate chain and copy the signed certificate and the certificate chain to your working directory.
Note
Your certificate chain must not include the private CA certificate that you are importing.
Note
Your on-premises CA certificate must be the last certificate in your chain. The subordinate certificate, if any, that your root CA signed must be next to last. The subordinate certificate signed by the preceding subordinate CA must come next, and so on until your chain is built.
Note
The chain must be PEM-encoded.
Request Syntax
{ "Certificate":
blob
, "CertificateAuthorityArn": "string
", "CertificateChain":blob
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Certificate
-
The PEM-encoded certificate for your private CA. This must be signed by using your on-premises CA.
Type: Base64-encoded binary data object
Length Constraints: Minimum length of 1. Maximum length of 32768.
Required: Yes
- CertificateAuthorityArn
-
The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. This must be of the form:
arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
Type: String
Length Constraints: Minimum length of 5. Maximum length of 200.
Pattern:
arn:[\w+=/,.@-]+:[\w+=/,.@-]+:[\w+=/,.@-]*:[0-9]+:[\w+=,.@-]+(/[\w+=/,.@-]+)*
Required: Yes
- CertificateChain
-
A PEM-encoded file that contains all of your certificates, other than the certificate you're importing, chaining up to your root CA. Your on-premises root certificate is the last in the chain, and each certificate in the chain signs the one preceding.
Type: Base64-encoded binary data object
Length Constraints: Minimum length of 0. Maximum length of 2097152.
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors.
- CertificateMismatchException
-
The certificate authority certificate you are importing does not comply with conditions specified in the certificate that signed it.
HTTP Status Code: 400
- ConcurrentModificationException
-
A previous update to your private CA is still ongoing.
HTTP Status Code: 400
- InvalidArnException
-
The requested Amazon Resource Name (ARN) does not refer to an existing resource.
HTTP Status Code: 400
- MalformedCertificateException
-
One or more fields in the certificate are invalid.
HTTP Status Code: 400
- RequestFailedException
-
The request has failed for an unspecified reason.
HTTP Status Code: 400
- RequestInProgressException
-
Your request is already in progress.
HTTP Status Code: 400
- ResourceNotFoundException
-
A resource such as a private CA, S3 bucket, certificate, or audit report cannot be found.
HTTP Status Code: 400
Examples
Example
Sample Request
POST / HTTP/1.1 Host: acm-pca.amazonaws.com Accept-Encoding: identity Content-Length: 3375 X-Amz-Target: ACMPrivateCA.ImportCertificateAuthorityCertificate X-Amz-Date: 20180226T203302Z User-Agent: aws-cli/1.14.28 Python/2.7.9 Windows/8 botocore/1.8.32 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AWS_Access_Key_ID/20180226/AWS_Region/acm-pca/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=cdf100cc3972f9df2e0f94295a6e378fbac8c1f489363689805504450e605d83 { "CertificateChain": "base64-encoded certificate chain", "Certificate": "base64-encoded certificate", "CertificateAuthorityArn": "arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012" }
Example
Sample Response
This function does not return a value.
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: