aws-cdk-lib.aws_certificatemanager.CertificateValidation

class CertificateValidation

LanguageType name
.NETAmazon.CDK.AWS.CertificateManager.CertificateValidation
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscertificatemanager#CertificateValidation
Javasoftware.amazon.awscdk.services.certificatemanager.CertificateValidation
Pythonaws_cdk.aws_certificatemanager.CertificateValidation
TypeScript (source)aws-cdk-lib » aws_certificatemanager » CertificateValidation

How to validate a certificate.

Example

const exampleCom = new route53.HostedZone(this, 'ExampleCom', {
  zoneName: 'example.com',
});
const exampleNet = new route53.HostedZone(this, 'ExampleNet', {
  zoneName: 'example.net',
});

const cert = new acm.Certificate(this, 'Certificate', {
  domainName: 'test.example.com',
  subjectAlternativeNames: ['cool.example.com', 'test.example.net'],
  validation: acm.CertificateValidation.fromDnsMultiZone({
    'test.example.com': exampleCom,
    'cool.example.com': exampleCom,
    'test.example.net': exampleNet,
  }),
});

Properties

NameTypeDescription
methodValidationMethodThe validation method.
propsCertificationValidationPropsCertification validation properties.

method

Type: ValidationMethod

The validation method.


props

Type: CertificationValidationProps

Certification validation properties.

Methods

NameDescription
static fromDns(hostedZone?)Validate the certificate with DNS.
static fromDnsMultiZone(hostedZones)Validate the certificate with automatically created DNS records in multiple Amazon Route 53 hosted zones.
static fromEmail(validationDomains?)Validate the certificate with Email.

static fromDns(hostedZone?)

public static fromDns(hostedZone?: IHostedZone): CertificateValidation

Parameters

  • hostedZone IHostedZone — the hosted zone where DNS records must be created.

Returns

  • CertificateValidation

Validate the certificate with DNS.

IMPORTANT: If hostedZone is not specified, DNS records must be added manually and the stack will not complete creating until the records are added.


static fromDnsMultiZone(hostedZones)

public static fromDnsMultiZone(hostedZones: { [string]: IHostedZone }): CertificateValidation

Parameters

  • hostedZones { [string]: IHostedZone } — a map of hosted zones where DNS records must be created for the domains in the certificate.

Returns

  • CertificateValidation

Validate the certificate with automatically created DNS records in multiple Amazon Route 53 hosted zones.


static fromEmail(validationDomains?)

public static fromEmail(validationDomains?: { [string]: string }): CertificateValidation

Parameters

  • validationDomains { [string]: string } — a map of validation domains to use for domains in the certificate.

Returns

  • CertificateValidation

Validate the certificate with Email.

IMPORTANT: if you are creating a certificate as part of your stack, the stack will not complete creating until you read and follow the instructions in the email that you will receive.

ACM will send validation emails to the following addresses:

admin@domain.com administrator@domain.com hostmaster@domain.com postmaster@domain.com webmaster@domain.com

For every domain that you register.