Class: AWSCDK::EC2::CfnInstance::PrivateDNSNameOptionsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnInstance::PrivateDNSNameOptionsProperty
- Defined in:
- ec2/cfn_instance.rb
Overview
The type of hostnames to assign to instances in the subnet at launch.
For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
Instance Attribute Summary collapse
-
#enable_resource_name_dns_a_record ⇒ Boolean, ...
readonly
Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
-
#enable_resource_name_dns_aaaa_record ⇒ Boolean, ...
readonly
Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
-
#hostname_type ⇒ String?
readonly
The type of hostnames to assign to instances in the subnet at launch.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(enable_resource_name_dns_aaaa_record: nil, enable_resource_name_dns_a_record: nil, hostname_type: nil) ⇒ PrivateDNSNameOptionsProperty
constructor
A new instance of PrivateDNSNameOptionsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(enable_resource_name_dns_aaaa_record: nil, enable_resource_name_dns_a_record: nil, hostname_type: nil) ⇒ PrivateDNSNameOptionsProperty
Returns a new instance of PrivateDNSNameOptionsProperty.
2194 2195 2196 2197 2198 2199 2200 2201 |
# File 'ec2/cfn_instance.rb', line 2194 def initialize(enable_resource_name_dns_aaaa_record: nil, enable_resource_name_dns_a_record: nil, hostname_type: nil) @enable_resource_name_dns_aaaa_record = enable_resource_name_dns_aaaa_record Jsii::Type.check_type(@enable_resource_name_dns_aaaa_record, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableResourceNameDnsAaaaRecord") unless @enable_resource_name_dns_aaaa_record.nil? @enable_resource_name_dns_a_record = enable_resource_name_dns_a_record Jsii::Type.check_type(@enable_resource_name_dns_a_record, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableResourceNameDnsARecord") unless @enable_resource_name_dns_a_record.nil? @hostname_type = hostname_type Jsii::Type.check_type(@hostname_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostnameType") unless @hostname_type.nil? end |
Instance Attribute Details
#enable_resource_name_dns_a_record ⇒ Boolean, ... (readonly)
Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
2216 2217 2218 |
# File 'ec2/cfn_instance.rb', line 2216 def enable_resource_name_dns_a_record @enable_resource_name_dns_a_record end |
#enable_resource_name_dns_aaaa_record ⇒ Boolean, ... (readonly)
Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
2209 2210 2211 |
# File 'ec2/cfn_instance.rb', line 2209 def enable_resource_name_dns_aaaa_record @enable_resource_name_dns_aaaa_record end |
#hostname_type ⇒ String? (readonly)
The type of hostnames to assign to instances in the subnet at launch.
For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
2223 2224 2225 |
# File 'ec2/cfn_instance.rb', line 2223 def hostname_type @hostname_type end |
Class Method Details
.jsii_properties ⇒ Object
2225 2226 2227 2228 2229 2230 2231 |
# File 'ec2/cfn_instance.rb', line 2225 def self.jsii_properties { :enable_resource_name_dns_aaaa_record => "enableResourceNameDnsAaaaRecord", :enable_resource_name_dns_a_record => "enableResourceNameDnsARecord", :hostname_type => "hostnameType", } end |
Instance Method Details
#to_jsii ⇒ Object
2233 2234 2235 2236 2237 2238 2239 2240 2241 |
# File 'ec2/cfn_instance.rb', line 2233 def to_jsii result = {} result.merge!({ "enableResourceNameDnsAaaaRecord" => @enable_resource_name_dns_aaaa_record, "enableResourceNameDnsARecord" => @enable_resource_name_dns_a_record, "hostnameType" => @hostname_type, }) result.compact end |