AWS:: ACMPCA 构造库
AWS CDK v1在2023-06-01上达到了支持结束. 此软件包不再更新,用户应该迁移到 AWS CDK v2.
关于如何移徙的更多信息,请参见: 移动到 AWS CDK v2 指南。 。 。 .
这个模块是 AWS 云开发套件 项目.
import * as acmpca from '@aws-cdk/aws-acmpca';
证书权限
此软件包包含一个 CertificateAuthority 课.
目前,你无法创建新的权力机构 使用它,
但是您可以使用 fromCertificateAuthorityArn 静态方法 :
const certificateAuthority = acmpca.CertificateAuthority.fromCertificateAuthorityArn(this, 'CA',
'arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77');
低级 Cfn* 类
你总是可以使用低级班级
(从 Cfn*创建像证书管理局这样的资源:
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',
},
});
如果你需要通过高级 ICertificateAuthority 某处,
你可以从下层得到它 CfnCertificateAuthority 使用相同的 fromCertificateAuthorityArn 方法 :
declare const cfnCertificateAuthority: acmpca.CfnCertificateAuthority;
const certificateAuthority = acmpca.CertificateAuthority.fromCertificateAuthorityArn(this, 'CertificateAuthority',
cfnCertificateAuthority.attrArn);