Skip to content
v2.273.0

AWS::ACMPCA Construct Library ​

This module is part of the AWS Cloud Development Kit project.

ts
import * as acmpca from 'aws-cdk-lib/aws-acmpca';
python
import aws_cdk.aws_acmpca as acmpca
java
import software.amazon.awscdk.services.acmpca.*;
csharp
using Amazon.CDK.AWS.ACMPCA;
go
import acmpca "github.com/aws/aws-cdk-go/awscdk"

Certificate Authority ​

This package contains a CertificateAuthority class. At the moment, you cannot create new Authorities using it, but you can import existing ones using the fromCertificateAuthorityArn static method:

ts
const certificateAuthority = acmpca.CertificateAuthority.fromCertificateAuthorityArn(this, 'CA',
  'arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77');
python
certificate_authority = acmpca.CertificateAuthority.from_certificate_authority_arn(self, "CA", "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77")
java
ICertificateAuthority certificateAuthority = CertificateAuthority.fromCertificateAuthorityArn(this, "CA", "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77");
csharp
var certificateAuthority = CertificateAuthority.FromCertificateAuthorityArn(this, "CA", "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77");
go
certificateAuthority := acmpca.CertificateAuthority_FromCertificateAuthorityArn(this, jsii.String("CA"), jsii.String("arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77"))

Low-level Cfn* classes ​

You can always use the low-level classes (starting with Cfn*) to create resources like the Certificate Authority:

ts
const cfnCertificateAuthority = new acmpca.CfnCertificateAuthority(this, 'CA', {
  type: 'ROOT',
  keyAlgorithm: 'RSA_2048',
  signingAlgorithm: 'SHA256WITHRSA',
  subject: {
    country: 'US',
    organization: 'string',
    organizationalUnit: 'string',
    distinguishedNameQualifier: 'string',
    state: 'string',
    commonName: '123',
    serialNumber: 'string',
    locality: 'string',
    title: 'string',
    surname: 'string',
    givenName: 'string',
    initials: 'DG',
    pseudonym: 'string',
    generationQualifier: 'DBG',
  },
});
python
cfn_certificate_authority = acmpca.CfnCertificateAuthority(self, "CA",
    type="ROOT",
    key_algorithm="RSA_2048",
    signing_algorithm="SHA256WITHRSA",
    subject=acmpca.CfnCertificateAuthority.SubjectProperty(
        country="US",
        organization="string",
        organizational_unit="string",
        distinguished_name_qualifier="string",
        state="string",
        common_name="123",
        serial_number="string",
        locality="string",
        title="string",
        surname="string",
        given_name="string",
        initials="DG",
        pseudonym="string",
        generation_qualifier="DBG"
    )
)
java
CfnCertificateAuthority cfnCertificateAuthority = CfnCertificateAuthority.Builder.create(this, "CA")
        .type("ROOT")
        .keyAlgorithm("RSA_2048")
        .signingAlgorithm("SHA256WITHRSA")
        .subject(SubjectProperty.builder()
                .country("US")
                .organization("string")
                .organizationalUnit("string")
                .distinguishedNameQualifier("string")
                .state("string")
                .commonName("123")
                .serialNumber("string")
                .locality("string")
                .title("string")
                .surname("string")
                .givenName("string")
                .initials("DG")
                .pseudonym("string")
                .generationQualifier("DBG")
                .build())
        .build();
csharp
var cfnCertificateAuthority = new CfnCertificateAuthority(this, "CA", new CfnCertificateAuthorityProps {
    Type = "ROOT",
    KeyAlgorithm = "RSA_2048",
    SigningAlgorithm = "SHA256WITHRSA",
    Subject = new SubjectProperty {
        Country = "US",
        Organization = "string",
        OrganizationalUnit = "string",
        DistinguishedNameQualifier = "string",
        State = "string",
        CommonName = "123",
        SerialNumber = "string",
        Locality = "string",
        Title = "string",
        Surname = "string",
        GivenName = "string",
        Initials = "DG",
        Pseudonym = "string",
        GenerationQualifier = "DBG"
    }
});
go
cfnCertificateAuthority := acmpca.NewCfnCertificateAuthority(this, jsii.String("CA"), &CfnCertificateAuthorityProps{
	Type: jsii.String("ROOT"),
	KeyAlgorithm: jsii.String("RSA_2048"),
	SigningAlgorithm: jsii.String("SHA256WITHRSA"),
	Subject: &SubjectProperty{
		Country: jsii.String("US"),
		Organization: jsii.String("string"),
		OrganizationalUnit: jsii.String("string"),
		DistinguishedNameQualifier: jsii.String("string"),
		State: jsii.String("string"),
		CommonName: jsii.String("123"),
		SerialNumber: jsii.String("string"),
		Locality: jsii.String("string"),
		Title: jsii.String("string"),
		Surname: jsii.String("string"),
		GivenName: jsii.String("string"),
		Initials: jsii.String("DG"),
		Pseudonym: jsii.String("string"),
		GenerationQualifier: jsii.String("DBG"),
	},
})

If you need to pass the higher-level ICertificateAuthority somewhere, you can get it from the lower-level CfnCertificateAuthority using the same fromCertificateAuthorityArn method:

ts
declare const cfnCertificateAuthority: acmpca.CfnCertificateAuthority;

const certificateAuthority = acmpca.CertificateAuthority.fromCertificateAuthorityArn(this, 'CertificateAuthority',
  cfnCertificateAuthority.attrArn);
python
# cfn_certificate_authority: acmpca.CfnCertificateAuthority


certificate_authority = acmpca.CertificateAuthority.from_certificate_authority_arn(self, "CertificateAuthority", cfn_certificate_authority.attr_arn)
java
CfnCertificateAuthority cfnCertificateAuthority;


ICertificateAuthority certificateAuthority = CertificateAuthority.fromCertificateAuthorityArn(this, "CertificateAuthority", cfnCertificateAuthority.getAttrArn());
csharp
CfnCertificateAuthority cfnCertificateAuthority;


var certificateAuthority = CertificateAuthority.FromCertificateAuthorityArn(this, "CertificateAuthority", cfnCertificateAuthority.AttrArn);
go
var cfnCertificateAuthority CfnCertificateAuthority


certificateAuthority := acmpca.CertificateAuthority_FromCertificateAuthorityArn(this, jsii.String("CertificateAuthority"), cfnCertificateAuthority.attrArn)

Types ​

NameKindSummary
CfnCertificateConstruct (L1)The AWS::ACMPCA::Certificate resource is used to issue a certificate using your private certificate authority.
CfnCertificateAuthorityConstruct (L1)Use the AWS::ACMPCA::CertificateAuthority resource to create a private CA.
CfnCertificateAuthorityActivationConstruct (L1)The AWS::ACMPCA::CertificateAuthorityActivation resource creates and installs a CA certificate on a CA.
CfnPermissionConstruct (L1)Grants permissions to the Certificate Manager ( ACM ) service principal ( acm.amazonaws.com ) to perform IssueCertificate , GetCertificate , and ListPermissions actions on a CA. These actions are needed for the ACM principal to renew private PKI certificates requested through ACM and residing in the same AWS account as the CA.
CertificateAuthorityClassDefines a Certificate for ACMPCA.
CfnCertificate.ApiPassthroughPropertyStructContains X.509 certificate information to be placed in an issued certificate. An APIPassthrough or APICSRPassthrough template variant must be selected, or else this parameter is ignored.
CfnCertificate.CustomAttributePropertyStructDefines the X.500 relative distinguished name (RDN).
CfnCertificate.CustomExtensionPropertyStructSpecifies the X.509 extension information for a certificate.
CfnCertificate.EdiPartyNamePropertyStructDescribes an Electronic Data Interchange (EDI) entity as described in as defined in Subject Alternative Name in RFC 5280.
CfnCertificate.ExtendedKeyUsagePropertyStructSpecifies additional purposes for which the certified public key may be used other than basic purposes indicated in the KeyUsage extension.
CfnCertificate.ExtensionsPropertyStructContains X.509 extension information for a certificate.
CfnCertificate.GeneralNamePropertyStructDescribes an ASN.1 X.400 GeneralName as defined in RFC 5280 . Only one of the following naming options should be provided. Providing more than one option results in an InvalidArgsException error.
CfnCertificate.KeyUsagePropertyStructDefines one or more purposes for which the key contained in the certificate can be used.
CfnCertificate.OtherNamePropertyStructDefines a custom ASN.1 X.400 GeneralName using an object identifier (OID) and value. The OID must satisfy the regular expression shown below. For more information, see NIST's definition of Object Identifier (OID) .
CfnCertificate.PolicyInformationPropertyStructDefines the X.509 CertificatePolicies extension.
CfnCertificate.PolicyQualifierInfoPropertyStructModifies the CertPolicyId of a PolicyInformation object with a qualifier.
CfnCertificate.QualifierPropertyStructDefines a PolicyInformation qualifier.
CfnCertificate.SubjectPropertyStructContains information about the certificate subject.
CfnCertificate.ValidityPropertyStructLength of time for which the certificate issued by your private certificate authority (CA), or by the private CA itself, is valid in days, months, or years.
CfnCertificateAuthority.AccessDescriptionPropertyStructProvides access information used by the authorityInfoAccess and subjectInfoAccess extensions described in RFC 5280 .
CfnCertificateAuthority.AccessMethodPropertyStructDescribes the type and format of extension access.
CfnCertificateAuthority.CrlConfigurationPropertyStructContains configuration information for a certificate revocation list (CRL).
CfnCertificateAuthority.CrlDistributionPointExtensionConfigurationPropertyStructContains configuration information for the default behavior of the CRL Distribution Point (CDP) extension in certificates issued by your CA.
CfnCertificateAuthority.CsrExtensionsPropertyStructDescribes the certificate extensions to be added to the certificate signing request (CSR).
CfnCertificateAuthority.CustomAttributePropertyStructDefines the X.500 relative distinguished name (RDN).
CfnCertificateAuthority.EdiPartyNamePropertyStructDescribes an Electronic Data Interchange (EDI) entity as described in as defined in Subject Alternative Name in RFC 5280.
CfnCertificateAuthority.GeneralNamePropertyStructDescribes an ASN.1 X.400 GeneralName as defined in RFC 5280 . Only one of the following naming options should be provided. Providing more than one option results in an InvalidArgsException error.
CfnCertificateAuthority.KeyUsagePropertyStructDefines one or more purposes for which the key contained in the certificate can be used.
CfnCertificateAuthority.OcspConfigurationPropertyStructContains information to enable and configure Online Certificate Status Protocol (OCSP) for validating certificate revocation status.
CfnCertificateAuthority.OtherNamePropertyStructDefines a custom ASN.1 X.400 GeneralName using an object identifier (OID) and value. The OID must satisfy the regular expression shown below. For more information, see NIST's definition of Object Identifier (OID) .
CfnCertificateAuthority.RevocationConfigurationPropertyStructCertificate revocation information used by the CreateCertificateAuthority and UpdateCertificateAuthority actions. Your private certificate authority (CA) can configure Online Certificate Status Protocol (OCSP) support and/or maintain a certificate revocation list (CRL). OCSP returns validation information about certificates as requested by clients, and a CRL contains an updated list of certificates revoked by your CA. For more information, see RevokeCertificate in the AWS Private CA API Reference and Setting up a certificate revocation method in the AWS Private CA User Guide .
CfnCertificateAuthority.SubjectPropertyStructASN1 subject for the certificate authority.
CfnCertificateAuthorityActivationPropsStructProperties for defining a CfnCertificateAuthorityActivation.
CfnCertificateAuthorityPropsStructProperties for defining a CfnCertificateAuthority.
CfnCertificatePropsStructProperties for defining a CfnCertificate.
CfnPermissionPropsStructProperties for defining a CfnPermission.
ICertificateAuthorityInterfaceInterface which all CertificateAuthority based class must implement.