Deleting a certificate authority in a member account - AWS Certificate Manager
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Deleting a certificate authority in a member account

The following Java code example shows how to use the DeleteMemberCertificateAuthority operation. Send certificate actions requests to your organization's inventory home Region. For more information, see Manage an AWS Private CA certificate authority.

package com.amazonaws.samples; import com.amazonaws.services.certificatemanager.AWSCertificateManagerClientBuilder; import com.amazonaws.services.certificatemanager.AWSCertificateManager; import com.amazonaws.services.certificatemanager.model.DeleteMemberCertificateAuthorityRequest; import com.amazonaws.services.certificatemanager.model.AWSCertificateManagerException; public class AWSCertificateManagerSample { public static void main(String[] args) { // Send requests to your organization's inventory home Region. AWSCertificateManager client = AWSCertificateManagerClientBuilder.standard() .withRegion("us-east-1") .build(); // Schedule deletion after 30 days. try { client.deleteMemberCertificateAuthority(new DeleteMemberCertificateAuthorityRequest() .withCertificateAuthorityArn("arn:aws:acm-pca:us-east-1:111122223333:certificate-authority/12345678-1234-1234-1234-123456789012") .withPermanentDeletionTimeInDays(30)); } catch (AWSCertificateManagerException e) { System.err.println("Failed to schedule deletion of the certificate authority: " + e.getMessage()); } } }

In the preceding example, replace the placeholder values with your own information:

  • us-east-1 – The AWS Region that is your organization's inventory home Region.

  • 111122223333 – The AWS account ID of the member account that owns the certificate authority.

  • 12345678-1234-1234-1234-123456789012 – The ID of the AWS Private CA certificate authority in the certificate authority ARN.

  • 30 – The number of days before the certificate authority is permanently deleted.