Class: AWSCDK::EC2::CfnDHCPOptionsProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_dhcp_options_props.rb

Overview

Properties for defining a CfnDHCPOptions.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_name: nil, domain_name_servers: nil, ipv6_address_preferred_lease_time: nil, netbios_name_servers: nil, netbios_node_type: nil, ntp_servers: nil, tags: nil) ⇒ CfnDHCPOptionsProps

Returns a new instance of CfnDHCPOptionsProps.

Parameters:

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

    This value is used to complete unqualified DNS hostnames.

  • domain_name_servers (Array<String>, nil) (defaults to: nil)

    The IPv4 addresses of up to four domain name servers, or AmazonProvidedDNS .

  • ipv6_address_preferred_lease_time (Numeric, nil) (defaults to: nil)

    A value (in seconds, minutes, hours, or years) for how frequently a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.

  • netbios_name_servers (Array<String>, nil) (defaults to: nil)

    The IPv4 addresses of up to four NetBIOS name servers.

  • netbios_node_type (Numeric, nil) (defaults to: nil)

    The NetBIOS node type (1, 2, 4, or 8).

  • ntp_servers (Array<String>, nil) (defaults to: nil)

    The IPv4 addresses of up to four Network Time Protocol (NTP) servers.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Any tags assigned to the DHCP options set.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'ec2/cfn_dhcp_options_props.rb', line 16

def initialize(domain_name: nil, domain_name_servers: nil, ipv6_address_preferred_lease_time: nil, netbios_name_servers: nil, netbios_node_type: nil, ntp_servers: nil, tags: nil)
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName") unless @domain_name.nil?
  @domain_name_servers = domain_name_servers
  Jsii::Type.check_type(@domain_name_servers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "domainNameServers") unless @domain_name_servers.nil?
  @ipv6_address_preferred_lease_time = ipv6_address_preferred_lease_time
  Jsii::Type.check_type(@ipv6_address_preferred_lease_time, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ipv6AddressPreferredLeaseTime") unless @ipv6_address_preferred_lease_time.nil?
  @netbios_name_servers = netbios_name_servers
  Jsii::Type.check_type(@netbios_name_servers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "netbiosNameServers") unless @netbios_name_servers.nil?
  @netbios_node_type = netbios_node_type
  Jsii::Type.check_type(@netbios_node_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "netbiosNodeType") unless @netbios_node_type.nil?
  @ntp_servers = ntp_servers
  Jsii::Type.check_type(@ntp_servers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "ntpServers") unless @ntp_servers.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#domain_nameString? (readonly)

This value is used to complete unqualified DNS hostnames.

If you're using AmazonProvidedDNS in us-east-1 , specify ec2.internal . If you're using AmazonProvidedDNS in another Region, specify region . compute.internal (for example, ap-northeast-1.compute.internal ). Otherwise, specify a domain name (for example, MyCompany.com ).



39
40
41
# File 'ec2/cfn_dhcp_options_props.rb', line 39

def domain_name
  @domain_name
end

#domain_name_serversArray<String>? (readonly)

The IPv4 addresses of up to four domain name servers, or AmazonProvidedDNS .

The default is AmazonProvidedDNS . To have your instance receive a custom DNS hostname as specified in DomainName , you must set this property to a custom DNS server.



46
47
48
# File 'ec2/cfn_dhcp_options_props.rb', line 46

def domain_name_servers
  @domain_name_servers
end

#ipv6_address_preferred_lease_timeNumeric? (readonly)

A value (in seconds, minutes, hours, or years) for how frequently a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.

Acceptable values are between 140 and 2147483647 seconds (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.



53
54
55
# File 'ec2/cfn_dhcp_options_props.rb', line 53

def ipv6_address_preferred_lease_time
  @ipv6_address_preferred_lease_time
end

#netbios_name_serversArray<String>? (readonly)

The IPv4 addresses of up to four NetBIOS name servers.



58
59
60
# File 'ec2/cfn_dhcp_options_props.rb', line 58

def netbios_name_servers
  @netbios_name_servers
end

#netbios_node_typeNumeric? (readonly)

The NetBIOS node type (1, 2, 4, or 8).

We recommend that you specify 2 (broadcast and multicast are not currently supported).



65
66
67
# File 'ec2/cfn_dhcp_options_props.rb', line 65

def netbios_node_type
  @netbios_node_type
end

#ntp_serversArray<String>? (readonly)

The IPv4 addresses of up to four Network Time Protocol (NTP) servers.



70
71
72
# File 'ec2/cfn_dhcp_options_props.rb', line 70

def ntp_servers
  @ntp_servers
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Any tags assigned to the DHCP options set.



75
76
77
# File 'ec2/cfn_dhcp_options_props.rb', line 75

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



77
78
79
80
81
82
83
84
85
86
87
# File 'ec2/cfn_dhcp_options_props.rb', line 77

def self.jsii_properties
  {
    :domain_name => "domainName",
    :domain_name_servers => "domainNameServers",
    :ipv6_address_preferred_lease_time => "ipv6AddressPreferredLeaseTime",
    :netbios_name_servers => "netbiosNameServers",
    :netbios_node_type => "netbiosNodeType",
    :ntp_servers => "ntpServers",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'ec2/cfn_dhcp_options_props.rb', line 89

def to_jsii
  result = {}
  result.merge!({
    "domainName" => @domain_name,
    "domainNameServers" => @domain_name_servers,
    "ipv6AddressPreferredLeaseTime" => @ipv6_address_preferred_lease_time,
    "netbiosNameServers" => @netbios_name_servers,
    "netbiosNodeType" => @netbios_node_type,
    "ntpServers" => @ntp_servers,
    "tags" => @tags,
  })
  result.compact
end