UpdateCertificateAuthority
Updates the status or configuration of a private certificate authority (CA). Your
private CA must be in the ACTIVE
or DISABLED
state before you
can update it. You can disable a private CA that is in the ACTIVE
state or
make a CA that is in the DISABLED
state active again.
Note
Both Amazon Private CA and the IAM principal must have permission to write to the S3 bucket that you specify. If the IAM principal making the call does not have permission to write to the bucket, then an exception is thrown. For more information, see Access policies for CRLs in Amazon S3.
Request Syntax
{
"CertificateAuthorityArn": "string
",
"RevocationConfiguration": {
"CrlConfiguration": {
"CrlDistributionPointExtensionConfiguration": {
"OmitExtension": boolean
},
"CustomCname": "string
",
"Enabled": boolean
,
"ExpirationInDays": number
,
"S3BucketName": "string
",
"S3ObjectAcl": "string
"
},
"OcspConfiguration": {
"Enabled": boolean
,
"OcspCustomCname": "string
"
}
},
"Status": "string
"
}
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.
- CertificateAuthorityArn
-
Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. 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+=/,.@-]+:acm-pca:[\w+=/,.@-]*:[0-9]*:[\w+=,.@-]+(/[\w+=,.@-]+)*
Required: Yes
- RevocationConfiguration
-
Contains information to enable support for Online Certificate Status Protocol (OCSP), certificate revocation list (CRL), both protocols, or neither. If you don't supply this parameter, existing capibilites remain unchanged. For more information, see the OcspConfiguration and CrlConfiguration types.
The following requirements apply to revocation configurations.
-
A configuration disabling CRLs or OCSP must contain only the
Enabled=False
parameter, and will fail if other parameters such asCustomCname
orExpirationInDays
are included. -
In a CRL configuration, the
S3BucketName
parameter must conform to Amazon S3 bucket naming rules. -
A configuration containing a custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396
restrictions on the use of special characters in a CNAME. -
In a CRL or OCSP configuration, the value of a CNAME parameter must not include a protocol prefix such as "http://" or "https://".
Important
If you update the
S3BucketName
of CrlConfiguration, you can break revocation for existing certificates. In other words, if you call UpdateCertificateAuthority to update the CRL configuration's S3 bucket name, Amazon Private CA only writes CRLs to the new S3 bucket. Certificates issued prior to this point will have the old S3 bucket name in your CRL Distribution Point (CDP) extension, essentially breaking revocation. If you must update the S3 bucket, you'll need to reissue old certificates to keep the revocation working. Alternatively, you can use a CustomCname in your CRL configuration if you might need to change the S3 bucket name in the future.Type: RevocationConfiguration object
Required: No
-
- Status
-
Status of your private CA.
Type: String
Valid Values:
CREATING | PENDING_CERTIFICATE | ACTIVE | DELETED | DISABLED | EXPIRED | FAILED
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.
- ConcurrentModificationException
-
A previous update to your private CA is still ongoing.
HTTP Status Code: 400
- InvalidArgsException
-
One or more of the specified arguments was not valid.
HTTP Status Code: 400
- InvalidArnException
-
The requested Amazon Resource Name (ARN) does not refer to an existing resource.
HTTP Status Code: 400
- InvalidPolicyException
-
The resource policy is invalid or is missing a required statement. For general information about IAM policy and statement structure, see Overview of JSON Policies
. HTTP Status Code: 400
- InvalidStateException
-
The state of the private CA does not allow this action to occur.
HTTP Status Code: 400
- ResourceNotFoundException
-
A resource such as a private CA, S3 bucket, certificate, audit report, or policy cannot be found.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of UpdateCertificateAuthority.
Sample Request
POST / HTTP/1.1
Host: acm-pca.amazonaws.com
Accept-Encoding: identity
Content-Length: 323
X-Amz-Target: ACMPrivateCA.UpdateCertificateAuthority
X-Amz-Date: 20180226T172929Z
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=Access_Key_ID/20180226/AWS_Region/acm-pca/aws4_request,
SignedHeaders=content-type;host;x-amz-date;x-amz-target,
Signature=f11213b3c4da1754a811fcd72ea637b8acbe41fb7b5e3541806d0418a3323dd8
{
"Status": "ACTIVE",
"RevocationConfiguration": {
"CrlConfiguration": {
"CustomCname": "https://somename.crl",
"Enabled": true,
"S3BucketName": "your-bucket-name",
"ExpirationInDays": 3650
}
},
"CertificateAuthorityArn": "arn:aws:acm-pca:AWS_Region:AWS_Account:certificate-authority/12345678-1234-1234-1234-123456789012"
}
Example
This example illustrates one usage of UpdateCertificateAuthority.
Sample Response
This function does not return a value.
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: