Class CertificateValidation
How to validate a certificate.
Namespace: Amazon.CDK.AWS.CertificateManager
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CertificateValidation : DeputyBase
Syntax (vb)
Public Class CertificateValidation Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
var exampleCom = new HostedZone(this, "ExampleCom", new HostedZoneProps {
ZoneName = "example.com"
});
var exampleNet = new HostedZone(this, "ExampleNet", new HostedZoneProps {
ZoneName = "example.net"
});
var cert = new Certificate(this, "Certificate", new CertificateProps {
DomainName = "test.example.com",
SubjectAlternativeNames = new [] { "cool.example.com", "test.example.net" },
Validation = CertificateValidation.FromDnsMultiZone(new Dictionary<string, IHostedZone> {
{ "test.example.com", exampleCom },
{ "cool.example.com", exampleCom },
{ "test.example.net", exampleNet }
})
});
Synopsis
Properties
| Method | The validation method. |
| Props | Certification validation properties. |
Methods
| FromDns(IHostedZone?) | Validate the certificate with DNS. |
| FromDnsMultiZone(IDictionary<string, IHostedZone>) | Validate the certificate with automatically created DNS records in multiple Amazon Route 53 hosted zones. |
| FromEmail(IDictionary<string, string>?) | Validate the certificate with Email. |
Properties
Method
The validation method.
public virtual ValidationMethod Method { get; }
Property Value
Remarks
ExampleMetadata: infused
Props
Certification validation properties.
public virtual ICertificationValidationProps Props { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
FromDns(IHostedZone?)
Validate the certificate with DNS.
public static CertificateValidation FromDns(IHostedZone? hostedZone = null)
Parameters
- hostedZone IHostedZone
the hosted zone where DNS records must be created.
Returns
Remarks
IMPORTANT: If hostedZone is not specified, DNS records must be added
manually and the stack will not complete creating until the records are
added.
FromDnsMultiZone(IDictionary<string, IHostedZone>)
Validate the certificate with automatically created DNS records in multiple Amazon Route 53 hosted zones.
public static CertificateValidation FromDnsMultiZone(IDictionary<string, IHostedZone> hostedZones)
Parameters
- hostedZones IDictionary<string, IHostedZone>
a map of hosted zones where DNS records must be created for the domains in the certificate.
Returns
Remarks
ExampleMetadata: infused
FromEmail(IDictionary<string, string>?)
Validate the certificate with Email.
public static CertificateValidation FromEmail(IDictionary<string, string>? validationDomains = null)
Parameters
- validationDomains IDictionary<string, string>
a map of validation domains to use for domains in the certificate.
Returns
Remarks
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.