1. Packages
  2. Routeros Provider
  3. API Docs
  4. DhcpClient
routeros 1.83.0 published on Wednesday, Apr 16, 2025 by terraform-routeros

routeros.DhcpClient

Explore with Pulumi AI

# routeros.DhcpClient (Resource)


This is an alias for backwards compatibility between plugin versions.

Please see documentation for routeros.IpDhcpClient

Create DhcpClient Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DhcpClient(name: string, args: DhcpClientArgs, opts?: CustomResourceOptions);
@overload
def DhcpClient(resource_name: str,
               args: DhcpClientArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def DhcpClient(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               interface: Optional[str] = None,
               comment: Optional[str] = None,
               add_default_route: Optional[str] = None,
               ___id_: Optional[float] = None,
               default_route_distance: Optional[float] = None,
               default_route_tables: Optional[str] = None,
               dhcp_client_id: Optional[str] = None,
               dhcp_options: Optional[str] = None,
               disabled: Optional[bool] = None,
               ___path_: Optional[str] = None,
               script: Optional[str] = None,
               use_peer_dns: Optional[bool] = None,
               use_peer_ntp: Optional[bool] = None)
func NewDhcpClient(ctx *Context, name string, args DhcpClientArgs, opts ...ResourceOption) (*DhcpClient, error)
public DhcpClient(string name, DhcpClientArgs args, CustomResourceOptions? opts = null)
public DhcpClient(String name, DhcpClientArgs args)
public DhcpClient(String name, DhcpClientArgs args, CustomResourceOptions options)
type: routeros:DhcpClient
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DhcpClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DhcpClientArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DhcpClientArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DhcpClientArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DhcpClientArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DhcpClient Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DhcpClient resource accepts the following input properties:

Interface This property is required. string
Name of the interface.
AddDefaultRoute string
Whether to install default route in routing table received from DHCP server.
Comment string
DefaultRouteDistance double
Distance of default route. Applicable if add-default-route is set to yes.
DefaultRouteTables string
Default route tables.
DhcpClientId string
DhcpOptions string
Options that are sent to the DHCP server.
Disabled bool
Script string
A script.
UsePeerDns bool
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
UsePeerNtp bool
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
___id_ double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
Interface This property is required. string
Name of the interface.
AddDefaultRoute string
Whether to install default route in routing table received from DHCP server.
Comment string
DefaultRouteDistance float64
Distance of default route. Applicable if add-default-route is set to yes.
DefaultRouteTables string
Default route tables.
DhcpClientId string
DhcpOptions string
Options that are sent to the DHCP server.
Disabled bool
Script string
A script.
UsePeerDns bool
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
UsePeerNtp bool
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
___id_ float64
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
interface_ This property is required. String
Name of the interface.
___id_ Double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
addDefaultRoute String
Whether to install default route in routing table received from DHCP server.
comment String
defaultRouteDistance Double
Distance of default route. Applicable if add-default-route is set to yes.
defaultRouteTables String
Default route tables.
dhcpClientId String
dhcpOptions String
Options that are sent to the DHCP server.
disabled Boolean
script String
A script.
usePeerDns Boolean
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
usePeerNtp Boolean
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
interface This property is required. string
Name of the interface.
___id_ number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
addDefaultRoute string
Whether to install default route in routing table received from DHCP server.
comment string
defaultRouteDistance number
Distance of default route. Applicable if add-default-route is set to yes.
defaultRouteTables string
Default route tables.
dhcpClientId string
dhcpOptions string
Options that are sent to the DHCP server.
disabled boolean
script string
A script.
usePeerDns boolean
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
usePeerNtp boolean
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
interface This property is required. str
Name of the interface.
___id_ float
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ str
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
add_default_route str
Whether to install default route in routing table received from DHCP server.
comment str
default_route_distance float
Distance of default route. Applicable if add-default-route is set to yes.
default_route_tables str
Default route tables.
dhcp_client_id str
dhcp_options str
Options that are sent to the DHCP server.
disabled bool
script str
A script.
use_peer_dns bool
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
use_peer_ntp bool
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
interface This property is required. String
Name of the interface.
___id_ Number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
addDefaultRoute String
Whether to install default route in routing table received from DHCP server.
comment String
defaultRouteDistance Number
Distance of default route. Applicable if add-default-route is set to yes.
defaultRouteTables String
Default route tables.
dhcpClientId String
dhcpOptions String
Options that are sent to the DHCP server.
disabled Boolean
script String
A script.
usePeerDns Boolean
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
usePeerNtp Boolean
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).

Outputs

All input properties are implicitly available as output properties. Additionally, the DhcpClient resource produces the following output properties:

Address string
IP address and netmask, which is assigned to DHCP Client from the Server.
DhcpServer string
The IP address of the DHCP server.
Dynamic bool
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
ExpiresAfter string
A time when the lease expires (specified by the DHCP server).
Gateway string
The IP address of the gateway which is assigned by DHCP server.
Id string
The provider-assigned unique ID for this managed resource.
Invalid bool
PrimaryDns string
The IP address of the first DNS resolver, that was assigned by the DHCP server.
PrimaryNtp string
The IP address of the primary NTP server, assigned by the DHCP server.
SecondaryDns string
The IP address of the second DNS resolver, assigned by the DHCP server.
SecondaryNtp string
The IP address of the secondary NTP server, assigned by the DHCP server.
Status string
Address string
IP address and netmask, which is assigned to DHCP Client from the Server.
DhcpServer string
The IP address of the DHCP server.
Dynamic bool
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
ExpiresAfter string
A time when the lease expires (specified by the DHCP server).
Gateway string
The IP address of the gateway which is assigned by DHCP server.
Id string
The provider-assigned unique ID for this managed resource.
Invalid bool
PrimaryDns string
The IP address of the first DNS resolver, that was assigned by the DHCP server.
PrimaryNtp string
The IP address of the primary NTP server, assigned by the DHCP server.
SecondaryDns string
The IP address of the second DNS resolver, assigned by the DHCP server.
SecondaryNtp string
The IP address of the secondary NTP server, assigned by the DHCP server.
Status string
address String
IP address and netmask, which is assigned to DHCP Client from the Server.
dhcpServer String
The IP address of the DHCP server.
dynamic Boolean
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
expiresAfter String
A time when the lease expires (specified by the DHCP server).
gateway String
The IP address of the gateway which is assigned by DHCP server.
id String
The provider-assigned unique ID for this managed resource.
invalid Boolean
primaryDns String
The IP address of the first DNS resolver, that was assigned by the DHCP server.
primaryNtp String
The IP address of the primary NTP server, assigned by the DHCP server.
secondaryDns String
The IP address of the second DNS resolver, assigned by the DHCP server.
secondaryNtp String
The IP address of the secondary NTP server, assigned by the DHCP server.
status String
address string
IP address and netmask, which is assigned to DHCP Client from the Server.
dhcpServer string
The IP address of the DHCP server.
dynamic boolean
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
expiresAfter string
A time when the lease expires (specified by the DHCP server).
gateway string
The IP address of the gateway which is assigned by DHCP server.
id string
The provider-assigned unique ID for this managed resource.
invalid boolean
primaryDns string
The IP address of the first DNS resolver, that was assigned by the DHCP server.
primaryNtp string
The IP address of the primary NTP server, assigned by the DHCP server.
secondaryDns string
The IP address of the second DNS resolver, assigned by the DHCP server.
secondaryNtp string
The IP address of the secondary NTP server, assigned by the DHCP server.
status string
address str
IP address and netmask, which is assigned to DHCP Client from the Server.
dhcp_server str
The IP address of the DHCP server.
dynamic bool
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
expires_after str
A time when the lease expires (specified by the DHCP server).
gateway str
The IP address of the gateway which is assigned by DHCP server.
id str
The provider-assigned unique ID for this managed resource.
invalid bool
primary_dns str
The IP address of the first DNS resolver, that was assigned by the DHCP server.
primary_ntp str
The IP address of the primary NTP server, assigned by the DHCP server.
secondary_dns str
The IP address of the second DNS resolver, assigned by the DHCP server.
secondary_ntp str
The IP address of the secondary NTP server, assigned by the DHCP server.
status str
address String
IP address and netmask, which is assigned to DHCP Client from the Server.
dhcpServer String
The IP address of the DHCP server.
dynamic Boolean
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
expiresAfter String
A time when the lease expires (specified by the DHCP server).
gateway String
The IP address of the gateway which is assigned by DHCP server.
id String
The provider-assigned unique ID for this managed resource.
invalid Boolean
primaryDns String
The IP address of the first DNS resolver, that was assigned by the DHCP server.
primaryNtp String
The IP address of the primary NTP server, assigned by the DHCP server.
secondaryDns String
The IP address of the second DNS resolver, assigned by the DHCP server.
secondaryNtp String
The IP address of the secondary NTP server, assigned by the DHCP server.
status String

Look up Existing DhcpClient Resource

Get an existing DhcpClient resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DhcpClientState, opts?: CustomResourceOptions): DhcpClient
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ___id_: Optional[float] = None,
        ___path_: Optional[str] = None,
        add_default_route: Optional[str] = None,
        address: Optional[str] = None,
        comment: Optional[str] = None,
        default_route_distance: Optional[float] = None,
        default_route_tables: Optional[str] = None,
        dhcp_client_id: Optional[str] = None,
        dhcp_options: Optional[str] = None,
        dhcp_server: Optional[str] = None,
        disabled: Optional[bool] = None,
        dynamic: Optional[bool] = None,
        expires_after: Optional[str] = None,
        gateway: Optional[str] = None,
        interface: Optional[str] = None,
        invalid: Optional[bool] = None,
        primary_dns: Optional[str] = None,
        primary_ntp: Optional[str] = None,
        script: Optional[str] = None,
        secondary_dns: Optional[str] = None,
        secondary_ntp: Optional[str] = None,
        status: Optional[str] = None,
        use_peer_dns: Optional[bool] = None,
        use_peer_ntp: Optional[bool] = None) -> DhcpClient
func GetDhcpClient(ctx *Context, name string, id IDInput, state *DhcpClientState, opts ...ResourceOption) (*DhcpClient, error)
public static DhcpClient Get(string name, Input<string> id, DhcpClientState? state, CustomResourceOptions? opts = null)
public static DhcpClient get(String name, Output<String> id, DhcpClientState state, CustomResourceOptions options)
resources:  _:    type: routeros:DhcpClient    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AddDefaultRoute string
Whether to install default route in routing table received from DHCP server.
Address string
IP address and netmask, which is assigned to DHCP Client from the Server.
Comment string
DefaultRouteDistance double
Distance of default route. Applicable if add-default-route is set to yes.
DefaultRouteTables string
Default route tables.
DhcpClientId string
DhcpOptions string
Options that are sent to the DHCP server.
DhcpServer string
The IP address of the DHCP server.
Disabled bool
Dynamic bool
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
ExpiresAfter string
A time when the lease expires (specified by the DHCP server).
Gateway string
The IP address of the gateway which is assigned by DHCP server.
Interface string
Name of the interface.
Invalid bool
PrimaryDns string
The IP address of the first DNS resolver, that was assigned by the DHCP server.
PrimaryNtp string
The IP address of the primary NTP server, assigned by the DHCP server.
Script string
A script.
SecondaryDns string
The IP address of the second DNS resolver, assigned by the DHCP server.
SecondaryNtp string
The IP address of the secondary NTP server, assigned by the DHCP server.
Status string
UsePeerDns bool
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
UsePeerNtp bool
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
___id_ double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
AddDefaultRoute string
Whether to install default route in routing table received from DHCP server.
Address string
IP address and netmask, which is assigned to DHCP Client from the Server.
Comment string
DefaultRouteDistance float64
Distance of default route. Applicable if add-default-route is set to yes.
DefaultRouteTables string
Default route tables.
DhcpClientId string
DhcpOptions string
Options that are sent to the DHCP server.
DhcpServer string
The IP address of the DHCP server.
Disabled bool
Dynamic bool
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
ExpiresAfter string
A time when the lease expires (specified by the DHCP server).
Gateway string
The IP address of the gateway which is assigned by DHCP server.
Interface string
Name of the interface.
Invalid bool
PrimaryDns string
The IP address of the first DNS resolver, that was assigned by the DHCP server.
PrimaryNtp string
The IP address of the primary NTP server, assigned by the DHCP server.
Script string
A script.
SecondaryDns string
The IP address of the second DNS resolver, assigned by the DHCP server.
SecondaryNtp string
The IP address of the secondary NTP server, assigned by the DHCP server.
Status string
UsePeerDns bool
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
UsePeerNtp bool
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
___id_ float64
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
___id_ Double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
addDefaultRoute String
Whether to install default route in routing table received from DHCP server.
address String
IP address and netmask, which is assigned to DHCP Client from the Server.
comment String
defaultRouteDistance Double
Distance of default route. Applicable if add-default-route is set to yes.
defaultRouteTables String
Default route tables.
dhcpClientId String
dhcpOptions String
Options that are sent to the DHCP server.
dhcpServer String
The IP address of the DHCP server.
disabled Boolean
dynamic Boolean
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
expiresAfter String
A time when the lease expires (specified by the DHCP server).
gateway String
The IP address of the gateway which is assigned by DHCP server.
interface_ String
Name of the interface.
invalid Boolean
primaryDns String
The IP address of the first DNS resolver, that was assigned by the DHCP server.
primaryNtp String
The IP address of the primary NTP server, assigned by the DHCP server.
script String
A script.
secondaryDns String
The IP address of the second DNS resolver, assigned by the DHCP server.
secondaryNtp String
The IP address of the secondary NTP server, assigned by the DHCP server.
status String
usePeerDns Boolean
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
usePeerNtp Boolean
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
___id_ number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
addDefaultRoute string
Whether to install default route in routing table received from DHCP server.
address string
IP address and netmask, which is assigned to DHCP Client from the Server.
comment string
defaultRouteDistance number
Distance of default route. Applicable if add-default-route is set to yes.
defaultRouteTables string
Default route tables.
dhcpClientId string
dhcpOptions string
Options that are sent to the DHCP server.
dhcpServer string
The IP address of the DHCP server.
disabled boolean
dynamic boolean
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
expiresAfter string
A time when the lease expires (specified by the DHCP server).
gateway string
The IP address of the gateway which is assigned by DHCP server.
interface string
Name of the interface.
invalid boolean
primaryDns string
The IP address of the first DNS resolver, that was assigned by the DHCP server.
primaryNtp string
The IP address of the primary NTP server, assigned by the DHCP server.
script string
A script.
secondaryDns string
The IP address of the second DNS resolver, assigned by the DHCP server.
secondaryNtp string
The IP address of the secondary NTP server, assigned by the DHCP server.
status string
usePeerDns boolean
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
usePeerNtp boolean
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
___id_ float
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ str
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
add_default_route str
Whether to install default route in routing table received from DHCP server.
address str
IP address and netmask, which is assigned to DHCP Client from the Server.
comment str
default_route_distance float
Distance of default route. Applicable if add-default-route is set to yes.
default_route_tables str
Default route tables.
dhcp_client_id str
dhcp_options str
Options that are sent to the DHCP server.
dhcp_server str
The IP address of the DHCP server.
disabled bool
dynamic bool
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
expires_after str
A time when the lease expires (specified by the DHCP server).
gateway str
The IP address of the gateway which is assigned by DHCP server.
interface str
Name of the interface.
invalid bool
primary_dns str
The IP address of the first DNS resolver, that was assigned by the DHCP server.
primary_ntp str
The IP address of the primary NTP server, assigned by the DHCP server.
script str
A script.
secondary_dns str
The IP address of the second DNS resolver, assigned by the DHCP server.
secondary_ntp str
The IP address of the secondary NTP server, assigned by the DHCP server.
status str
use_peer_dns bool
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
use_peer_ntp bool
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).
___id_ Number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
addDefaultRoute String
Whether to install default route in routing table received from DHCP server.
address String
IP address and netmask, which is assigned to DHCP Client from the Server.
comment String
defaultRouteDistance Number
Distance of default route. Applicable if add-default-route is set to yes.
defaultRouteTables String
Default route tables.
dhcpClientId String
dhcpOptions String
Options that are sent to the DHCP server.
dhcpServer String
The IP address of the DHCP server.
disabled Boolean
dynamic Boolean
Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
expiresAfter String
A time when the lease expires (specified by the DHCP server).
gateway String
The IP address of the gateway which is assigned by DHCP server.
interface String
Name of the interface.
invalid Boolean
primaryDns String
The IP address of the first DNS resolver, that was assigned by the DHCP server.
primaryNtp String
The IP address of the primary NTP server, assigned by the DHCP server.
script String
A script.
secondaryDns String
The IP address of the second DNS resolver, assigned by the DHCP server.
secondaryNtp String
The IP address of the secondary NTP server, assigned by the DHCP server.
status String
usePeerDns Boolean
Whether to accept the DNS settings advertised by DHCP Server (will override the settings put in the /ip dns submenu).
usePeerNtp Boolean
Whether to accept the NTP settings advertised by DHCP Server (will override the settings put in the /system ntp client submenu).

Package Details

Repository
routeros terraform-routeros/terraform-provider-routeros
License
Notes
This Pulumi package is based on the routeros Terraform Provider.