DhcpDnsOption

class oci.core.models.DhcpDnsOption(**kwargs)

Bases: oci.core.models.dhcp_option.DhcpOption

DHCP option for specifying how DNS (hostname resolution) is handled in the subnets in the VCN. For more information, see DNS in Your Virtual Cloud Network.

Attributes

SERVER_TYPE_CUSTOM_DNS_SERVER A constant which can be used with the server_type property of a DhcpDnsOption.
SERVER_TYPE_VCN_LOCAL A constant which can be used with the server_type property of a DhcpDnsOption.
SERVER_TYPE_VCN_LOCAL_PLUS_INTERNET A constant which can be used with the server_type property of a DhcpDnsOption.
custom_dns_servers Gets the custom_dns_servers of this DhcpDnsOption.
server_type [Required] Gets the server_type of this DhcpDnsOption.
type [Required] Gets the type of this DhcpOption.

Methods

__init__(**kwargs) Initializes a new DhcpDnsOption object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
SERVER_TYPE_CUSTOM_DNS_SERVER = 'CustomDnsServer'

A constant which can be used with the server_type property of a DhcpDnsOption. This constant has a value of “CustomDnsServer”

SERVER_TYPE_VCN_LOCAL = 'VcnLocal'

A constant which can be used with the server_type property of a DhcpDnsOption. This constant has a value of “VcnLocal”

SERVER_TYPE_VCN_LOCAL_PLUS_INTERNET = 'VcnLocalPlusInternet'

A constant which can be used with the server_type property of a DhcpDnsOption. This constant has a value of “VcnLocalPlusInternet”

__init__(**kwargs)

Initializes a new DhcpDnsOption object with values from keyword arguments. The default value of the type attribute of this class is DomainNameServer and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • type (str) – The value to assign to the type property of this DhcpDnsOption.
  • custom_dns_servers (list[str]) – The value to assign to the custom_dns_servers property of this DhcpDnsOption.
  • server_type (str) – The value to assign to the server_type property of this DhcpDnsOption. Allowed values for this property are: “VcnLocal”, “VcnLocalPlusInternet”, “CustomDnsServer”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
custom_dns_servers

Gets the custom_dns_servers of this DhcpDnsOption. If you set serverType to CustomDnsServer, specify the IP address of at least one DNS server of your choice (three maximum).

Returns:The custom_dns_servers of this DhcpDnsOption.
Return type:list[str]
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

server_type

[Required] Gets the server_type of this DhcpDnsOption. * VcnLocal: Reserved for future use.

  • VcnLocalPlusInternet: Also referred to as “Internet and VCN Resolver”.

Instances can resolve internet hostnames (no internet gateway is required), and can resolve hostnames of instances in the VCN. This is the default value in the default set of DHCP options in the VCN. For the Internet and VCN Resolver to work across the VCN, there must also be a DNS label set for the VCN, a DNS label set for each subnet, and a hostname for each instance. The Internet and VCN Resolver also enables reverse DNS lookup, which lets you determine the hostname corresponding to the private IP address. For more information, see DNS in Your Virtual Cloud Network.

  • CustomDnsServer: Instances use a DNS server of your choice (three

maximum).

Allowed values for this property are: “VcnLocal”, “VcnLocalPlusInternet”, “CustomDnsServer”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The server_type of this DhcpDnsOption.
Return type:str
type

[Required] Gets the type of this DhcpOption. The specific DHCP option. Either DomainNameServer (for DhcpDnsOption) or SearchDomain (for DhcpSearchDomainOption).

Returns:The type of this DhcpOption.
Return type:str