Class DnsValidatedCertificate.Builder

java.lang.Object
software.amazon.awscdk.services.certificatemanager.DnsValidatedCertificate.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<DnsValidatedCertificate>
Enclosing class:
DnsValidatedCertificate

@Stability(Stable) public static final class DnsValidatedCertificate.Builder extends Object implements software.amazon.jsii.Builder<DnsValidatedCertificate>
A fluent builder for DnsValidatedCertificate.
  • Method Details

    • create

      @Stability(Stable) public static DnsValidatedCertificate.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of DnsValidatedCertificate.Builder.
    • domainName

      @Stability(Stable) public DnsValidatedCertificate.Builder domainName(String domainName)
      Fully-qualified domain name to request a certificate for.

      May contain wildcards, such as *.domain.com.

      Parameters:
      domainName - Fully-qualified domain name to request a certificate for. This parameter is required.
      Returns:
      this
    • subjectAlternativeNames

      @Stability(Stable) public DnsValidatedCertificate.Builder subjectAlternativeNames(List<String> subjectAlternativeNames)
      Alternative domain names on your certificate.

      Use this to register alternative domain names that represent the same site.

      Default: - No additional FQDNs will be included as alternative domain names.

      Parameters:
      subjectAlternativeNames - Alternative domain names on your certificate. This parameter is required.
      Returns:
      this
    • validation

      @Stability(Stable) public DnsValidatedCertificate.Builder validation(CertificateValidation validation)
      How to validate this certificate.

      Default: CertificateValidation.fromEmail()

      Parameters:
      validation - How to validate this certificate. This parameter is required.
      Returns:
      this
    • validationDomains

      @Stability(Deprecated) @Deprecated public DnsValidatedCertificate.Builder validationDomains(Map<String,String> validationDomains)
      Deprecated.
      use validation instead.
      (deprecated) What validation domain to use for every requested domain.

      Has to be a superdomain of the requested domain.

      Default: - Apex domain is used for every domain that's not overridden.

      Parameters:
      validationDomains - What validation domain to use for every requested domain. This parameter is required.
      Returns:
      this
    • validationMethod

      @Stability(Deprecated) @Deprecated public DnsValidatedCertificate.Builder validationMethod(ValidationMethod validationMethod)
      Deprecated.
      use validation instead.
      (deprecated) Validation method used to assert domain ownership.

      Default: ValidationMethod.EMAIL

      Parameters:
      validationMethod - Validation method used to assert domain ownership. This parameter is required.
      Returns:
      this
    • hostedZone

      @Stability(Stable) public DnsValidatedCertificate.Builder hostedZone(IHostedZone hostedZone)
      Route 53 Hosted Zone used to perform DNS validation of the request.

      The zone must be authoritative for the domain name specified in the Certificate Request.

      Parameters:
      hostedZone - Route 53 Hosted Zone used to perform DNS validation of the request. This parameter is required.
      Returns:
      this
    • cleanupRoute53Records

      @Stability(Stable) public DnsValidatedCertificate.Builder cleanupRoute53Records(Boolean cleanupRoute53Records)
      When set to true, when the DnsValidatedCertificate is deleted, the associated Route53 validation records are removed.

      CAUTION: If multiple certificates share the same domains (and same validation records), this can cause the other certificates to fail renewal and/or not validate. Not recommended for production use.

      Default: false

      Parameters:
      cleanupRoute53Records - When set to true, when the DnsValidatedCertificate is deleted, the associated Route53 validation records are removed. This parameter is required.
      Returns:
      this
    • customResourceRole

      @Stability(Stable) public DnsValidatedCertificate.Builder customResourceRole(IRole customResourceRole)
      Role to use for the custom resource that creates the validated certificate.

      Default: - A new role will be created

      Parameters:
      customResourceRole - Role to use for the custom resource that creates the validated certificate. This parameter is required.
      Returns:
      this
    • region

      @Stability(Stable) public DnsValidatedCertificate.Builder region(String region)
      AWS region that will host the certificate.

      This is needed especially for certificates used for CloudFront distributions, which require the region to be us-east-1.

      Default: the region the stack is deployed in.

      Parameters:
      region - AWS region that will host the certificate. This parameter is required.
      Returns:
      this
    • route53Endpoint

      @Stability(Stable) public DnsValidatedCertificate.Builder route53Endpoint(String route53Endpoint)
      An endpoint of Route53 service, which is not necessary as AWS SDK could figure out the right endpoints for most regions, but for some regions such as those in aws-cn partition, the default endpoint is not working now, hence the right endpoint need to be specified through this prop.

      Route53 is not been officially launched in China, it is only available for AWS internal accounts now. To make DnsValidatedCertificate work for internal accounts now, a special endpoint needs to be provided.

      Default: - The AWS SDK will determine the Route53 endpoint to use based on region

      Parameters:
      route53Endpoint - An endpoint of Route53 service, which is not necessary as AWS SDK could figure out the right endpoints for most regions, but for some regions such as those in aws-cn partition, the default endpoint is not working now, hence the right endpoint need to be specified through this prop. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public DnsValidatedCertificate build()
      Specified by:
      build in interface software.amazon.jsii.Builder<DnsValidatedCertificate>
      Returns:
      a newly built instance of DnsValidatedCertificate.