@aws-cdk/aws-acmpca
TypeScript icon, indicating that this package has built-in type declarations

1.203.0 • Public • Published

AWS::ACMPCA Construct Library


cfn-resources: Stable

cdk-constructs: Stable


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

import * as acmpca from '@aws-cdk/aws-acmpca';

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:

const certificateAuthority = acmpca.CertificateAuthority.fromCertificateAuthorityArn(this, 'CA',
  '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:

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',
  },
});

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

declare const cfnCertificateAuthority: acmpca.CfnCertificateAuthority;

const certificateAuthority = acmpca.CertificateAuthority.fromCertificateAuthorityArn(this, 'CertificateAuthority',
  cfnCertificateAuthority.attrArn);

Install

npm i @aws-cdk/aws-acmpca

DownloadsWeekly Downloads

437,703

Version

1.203.0

License

Apache-2.0

Unpacked Size

1.17 MB

Total Files

15

Last publish

Collaborators

  • romainmuller
  • amzn-oss
  • rix0rrr
  • aws-cdk-team