Class: AWSCDK::CertificateManager::CfnCertificate::DomainValidationOptionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
certificate_manager/cfn_certificate.rb

Overview

DomainValidationOption is a property of the AWS::CertificateManager::Certificate resource that specifies the Certificate Manager ( ACM ) certificate domain to validate. Depending on the chosen validation method, ACM checks the domain's DNS record for a validation CNAME, or it attempts to send a validation email message to the domain owner.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_name:, hosted_zone_id: nil, validation_domain: nil) ⇒ DomainValidationOptionProperty

Returns a new instance of DomainValidationOptionProperty.

Parameters:

  • domain_name (String)

    A fully qualified domain name (FQDN) in the certificate request.

  • hosted_zone_id (String, nil) (defaults to: nil)

    The HostedZoneId option, which is available if you are using Route 53 as your domain registrar, causes ACM to add your CNAME to the domain record.

  • validation_domain (String, nil) (defaults to: nil)

    The domain name to which you want ACM to send validation emails.



640
641
642
643
644
645
646
647
# File 'certificate_manager/cfn_certificate.rb', line 640

def initialize(domain_name:, hosted_zone_id: nil, validation_domain: nil)
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName")
  @hosted_zone_id = hosted_zone_id
  Jsii::Type.check_type(@hosted_zone_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostedZoneId") unless @hosted_zone_id.nil?
  @validation_domain = validation_domain
  Jsii::Type.check_type(@validation_domain, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "validationDomain") unless @validation_domain.nil?
end

Instance Attribute Details

#domain_nameString (readonly)

A fully qualified domain name (FQDN) in the certificate request.



653
654
655
# File 'certificate_manager/cfn_certificate.rb', line 653

def domain_name
  @domain_name
end

#hosted_zone_idString? (readonly)

The HostedZoneId option, which is available if you are using Route 53 as your domain registrar, causes ACM to add your CNAME to the domain record.

Your list of DomainValidationOptions must contain one and only one of the domain-validation options, and the HostedZoneId can be used only when DNS is specified as your validation method.

Use the Route 53 ListHostedZones API to discover IDs for available hosted zones.

This option is required for publicly trusted certificates.

The ListHostedZones API returns IDs in the format "/hostedzone/Z111111QQQQQQQ", but CloudFormation requires the IDs to be in the format "Z111111QQQQQQQ".

When you change your DomainValidationOptions , a new resource is created.



668
669
670
# File 'certificate_manager/cfn_certificate.rb', line 668

def hosted_zone_id
  @hosted_zone_id
end

#validation_domainString? (readonly)

The domain name to which you want ACM to send validation emails.

This domain name is the suffix of the email addresses that you want ACM to use. This must be the same as the DomainName value or a superdomain of the DomainName value. For example, if you request a certificate for testing.example.com , you can specify example.com as this value. In that case, ACM sends domain validation emails to the following five addresses:



681
682
683
# File 'certificate_manager/cfn_certificate.rb', line 681

def validation_domain
  @validation_domain
end

Class Method Details

.jsii_propertiesObject



683
684
685
686
687
688
689
# File 'certificate_manager/cfn_certificate.rb', line 683

def self.jsii_properties
  {
    :domain_name => "domainName",
    :hosted_zone_id => "hostedZoneId",
    :validation_domain => "validationDomain",
  }
end

Instance Method Details

#to_jsiiObject



691
692
693
694
695
696
697
698
699
# File 'certificate_manager/cfn_certificate.rb', line 691

def to_jsii
  result = {}
  result.merge!({
    "domainName" => @domain_name,
    "hostedZoneId" => @hosted_zone_id,
    "validationDomain" => @validation_domain,
  })
  result.compact
end