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
Constructs (L1)
CfnCertificateConstruct (L1)
TheAWS::ACMPCA::Certificateresource is used to issue a certificate using your private certificate authority.CfnCertificateAuthorityConstruct (L1)
Use theAWS::ACMPCA::CertificateAuthorityresource to create a private CA.CfnConstruct (L1)Certificate Authority Activation
TheAWS::ACMPCA::CertificateAuthorityActivationresource 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.
Classes
CertificateAuthorityClass
Defines a Certificate for ACMPCA.
Structs
CfnCertificate.StructApiPassthroughProperty
Contains X.509 certificate information to be placed in an issued certificate. AnAPIPassthroughorAPICSRPassthroughtemplate variant must be selected, or else this parameter is ignored.CfnCertificate.StructCustomAttributeProperty
Defines the X.500 relative distinguished name (RDN).CfnCertificate.StructCustomExtensionProperty
Specifies the X.509 extension information for a certificate.CfnCertificate.StructEdiPartyNameProperty
Describes an Electronic Data Interchange (EDI) entity as described in as defined in Subject Alternative Name in RFC 5280.CfnCertificate.StructExtendedKeyUsageProperty
Specifies additional purposes for which the certified public key may be used other than basic purposes indicated in theKeyUsageextension.CfnCertificate.StructExtensionsProperty
Contains X.509 extension information for a certificate.CfnCertificate.StructGeneralNameProperty
Describes an ASN.1 X.400GeneralNameas defined in RFC 5280 . Only one of the following naming options should be provided. Providing more than one option results in anInvalidArgsExceptionerror.CfnCertificate.KeyUsagePropertyStruct
Defines one or more purposes for which the key contained in the certificate can be used.CfnCertificate.OtherNamePropertyStruct
Defines a custom ASN.1 X.400GeneralNameusing 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.StructPolicyInformationProperty
Defines the X.509CertificatePoliciesextension.CfnCertificate.StructPolicyQualifierInfoProperty
Modifies theCertPolicyIdof aPolicyInformationobject with a qualifier.CfnCertificate.QualifierPropertyStruct
Defines aPolicyInformationqualifier.CfnCertificate.SubjectPropertyStruct
Contains information about the certificate subject.CfnCertificate.ValidityPropertyStruct
Length 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.StructAccessDescriptionProperty
Provides access information used by theauthorityInfoAccessandsubjectInfoAccessextensions described in RFC 5280 .CfnCertificateAuthority.StructAccessMethodProperty
Describes the type and format of extension access.CfnCertificateAuthority.StructCrlConfigurationProperty
Contains configuration information for a certificate revocation list (CRL).CfnCertificateAuthority.StructCrl Distribution Point Extension Configuration Property
Contains configuration information for the default behavior of the CRL Distribution Point (CDP) extension in certificates issued by your CA.CfnCertificateAuthority.StructCsrExtensionsProperty
Describes the certificate extensions to be added to the certificate signing request (CSR).CfnCertificateAuthority.StructCustomAttributeProperty
Defines the X.500 relative distinguished name (RDN).CfnCertificateAuthority.StructEdiPartyNameProperty
Describes an Electronic Data Interchange (EDI) entity as described in as defined in Subject Alternative Name in RFC 5280.CfnCertificateAuthority.StructGeneralNameProperty
Describes an ASN.1 X.400GeneralNameas defined in RFC 5280 . Only one of the following naming options should be provided. Providing more than one option results in anInvalidArgsExceptionerror.CfnCertificateAuthority.StructKeyUsageProperty
Defines one or more purposes for which the key contained in the certificate can be used.CfnCertificateAuthority.StructOcspConfigurationProperty
Contains information to enable and configure Online Certificate Status Protocol (OCSP) for validating certificate revocation status.CfnCertificateAuthority.StructOtherNameProperty
Defines a custom ASN.1 X.400GeneralNameusing 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.StructRevocationConfigurationProperty
Certificate 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.StructSubjectProperty
ASN1 subject for the certificate authority.CfnStructCertificate Authority Activation Props
Properties for defining aCfnCertificateAuthorityActivation.CfnCertificateAuthorityPropsStruct
Properties for defining aCfnCertificateAuthority.CfnCertificatePropsStruct
Properties for defining aCfnCertificate.CfnPermissionPropsStruct
Properties for defining aCfnPermission.
Interfaces
ICertificateAuthorityInterface
Interface which all CertificateAuthority based class must implement.