AWS Certificate Manager Private Certificate Authority
AWS Private Certificate Authority Documentation (API Version 2017-08-22)

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

ImportCertificateAuthorityCertificate

Imports a signed private CA certificate into ACM Private CA. This action is used when you are using a chain of trust whose root is located outside ACM Private CA. Before you can call this action, the following preparations must in place:

  1. In ACM Private CA, call the CreateCertificateAuthority action to create the private CA that that you plan to back with the imported certificate.

  2. Call the GetCertificateAuthorityCsr action to generate a certificate signing request (CSR).

  3. Sign the CSR using a root or intermediate CA hosted by either an on-premises PKI hierarchy or by a commercial CA.

  4. Create a certificate chain and copy the signed certificate and the certificate chain to your working directory.

The following requirements apply when you import a CA certificate.

  • You cannot import a non-self-signed certificate for use as a root CA.

  • You cannot import a self-signed certificate for use as a subordinate CA.

  • Your certificate chain must not include the private CA certificate that you are importing.

  • Your ACM Private CA-hosted or 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.

  • The chain must be PEM-encoded.

Enforcement of Critical Constraints

ACM Private CA allows the following extensions to be marked critical in the imported CA certificate or chain.

  • Basic constraints (must be marked critical)

  • Subject alternative names

  • Key usage

  • Extended key usage

  • Authority key identifier

  • Subject key identifier

  • Issuer alternative name

  • Subject directory attributes

  • Subject information access

  • Certificate policies

  • Policy mappings

  • Inhibit anyPolicy

ACM Private CA rejects the following extensions when they are marked critical in an imported CA certificate or chain.

  • Name constraints

  • Policy constraints

  • CRL distribution points

  • Authority information access

  • Freshest CRL

  • Any other extension

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 a private CA. This may be a self-signed certificate in the case of a root CA, or it may be signed by another CA that you control.

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-pca: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 ACM Private CA-hosted or on-premises root certificate is the last in the chain, and each certificate in the chain signs the one preceding.

This parameter must be supplied when you import a subordinate CA. When you import a root CA, there is no chain.

Type: Base64-encoded binary data object

Length Constraints: Minimum length of 0. Maximum length of 2097152.

Required: No

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

InvalidRequestException

The request action cannot be performed or is prohibited.

HTTP Status Code: 400

InvalidStateException

The private CA is in a state during which a report or certificate cannot be generated.

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: