1. Packages
  2. Routeros Provider
  3. API Docs
  4. IpDhcpServerOptionMatcher
routeros 1.86.2 published on Monday, Aug 4, 2025 by terraform-routeros

routeros.IpDhcpServerOptionMatcher

Explore with Pulumi AI

routeros logo
routeros 1.86.2 published on Monday, Aug 4, 2025 by terraform-routeros

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as routeros from "@pulumi/routeros";
    
    const dhcp1IpByVendorClass = new routeros.IpDhcpServerOptionMatcher("dhcp1IpByVendorClass", {
        addressPool: "pool1",
        code: 60,
        matchingType: "exact",
        server: "dhcp1",
        value: "android-dhcp-11",
    });
    
    import pulumi
    import pulumi_routeros as routeros
    
    dhcp1_ip_by_vendor_class = routeros.IpDhcpServerOptionMatcher("dhcp1IpByVendorClass",
        address_pool="pool1",
        code=60,
        matching_type="exact",
        server="dhcp1",
        value="android-dhcp-11")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := routeros.NewIpDhcpServerOptionMatcher(ctx, "dhcp1IpByVendorClass", &routeros.IpDhcpServerOptionMatcherArgs{
    			AddressPool:  pulumi.String("pool1"),
    			Code:         pulumi.Float64(60),
    			MatchingType: pulumi.String("exact"),
    			Server:       pulumi.String("dhcp1"),
    			Value:        pulumi.String("android-dhcp-11"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Routeros = Pulumi.Routeros;
    
    return await Deployment.RunAsync(() => 
    {
        var dhcp1IpByVendorClass = new Routeros.IpDhcpServerOptionMatcher("dhcp1IpByVendorClass", new()
        {
            AddressPool = "pool1",
            Code = 60,
            MatchingType = "exact",
            Server = "dhcp1",
            Value = "android-dhcp-11",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.routeros.IpDhcpServerOptionMatcher;
    import com.pulumi.routeros.IpDhcpServerOptionMatcherArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var dhcp1IpByVendorClass = new IpDhcpServerOptionMatcher("dhcp1IpByVendorClass", IpDhcpServerOptionMatcherArgs.builder()
                .addressPool("pool1")
                .code(60)
                .matchingType("exact")
                .server("dhcp1")
                .value("android-dhcp-11")
                .build());
    
        }
    }
    
    resources:
      dhcp1IpByVendorClass:
        type: routeros:IpDhcpServerOptionMatcher
        properties:
          addressPool: pool1
          code: 60
          # Vendor Class Identifier
          matchingType: exact
          server: dhcp1
          value: android-dhcp-11
    

    Create IpDhcpServerOptionMatcher Resource

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

    Constructor syntax

    new IpDhcpServerOptionMatcher(name: string, args: IpDhcpServerOptionMatcherArgs, opts?: CustomResourceOptions);
    @overload
    def IpDhcpServerOptionMatcher(resource_name: str,
                                  args: IpDhcpServerOptionMatcherArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpDhcpServerOptionMatcher(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  code: Optional[float] = None,
                                  ___id_: Optional[float] = None,
                                  ___path_: Optional[str] = None,
                                  address_pool: Optional[str] = None,
                                  comment: Optional[str] = None,
                                  disabled: Optional[bool] = None,
                                  ip_dhcp_server_option_matcher_id: Optional[str] = None,
                                  matching_type: Optional[str] = None,
                                  name: Optional[str] = None,
                                  option_set: Optional[str] = None,
                                  server: Optional[str] = None,
                                  value: Optional[str] = None)
    func NewIpDhcpServerOptionMatcher(ctx *Context, name string, args IpDhcpServerOptionMatcherArgs, opts ...ResourceOption) (*IpDhcpServerOptionMatcher, error)
    public IpDhcpServerOptionMatcher(string name, IpDhcpServerOptionMatcherArgs args, CustomResourceOptions? opts = null)
    public IpDhcpServerOptionMatcher(String name, IpDhcpServerOptionMatcherArgs args)
    public IpDhcpServerOptionMatcher(String name, IpDhcpServerOptionMatcherArgs args, CustomResourceOptions options)
    
    type: routeros:IpDhcpServerOptionMatcher
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    IpDhcpServerOptionMatcher 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 IpDhcpServerOptionMatcher resource accepts the following input properties:

    Code double
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    AddressPool string
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    Comment string
    Disabled bool
    IpDhcpServerOptionMatcherId string
    MatchingType string
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    Name string
    OptionSet string
    A custom set of DHCP options defined in the Option Sets menu.
    Server string
    Server name which serves option matcher.
    Value string
    A value that will be searched for in option. Available data types for value are: - string - HEX
    ___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.
    Code float64
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    AddressPool string
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    Comment string
    Disabled bool
    IpDhcpServerOptionMatcherId string
    MatchingType string
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    Name string
    OptionSet string
    A custom set of DHCP options defined in the Option Sets menu.
    Server string
    Server name which serves option matcher.
    Value string
    A value that will be searched for in option. Available data types for value are: - string - HEX
    ___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.
    code Double
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    ___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.
    addressPool String
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    comment String
    disabled Boolean
    ipDhcpServerOptionMatcherId String
    matchingType String
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    name String
    optionSet String
    A custom set of DHCP options defined in the Option Sets menu.
    server String
    Server name which serves option matcher.
    value String
    A value that will be searched for in option. Available data types for value are: - string - HEX
    code number
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    ___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.
    addressPool string
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    comment string
    disabled boolean
    ipDhcpServerOptionMatcherId string
    matchingType string
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    name string
    optionSet string
    A custom set of DHCP options defined in the Option Sets menu.
    server string
    Server name which serves option matcher.
    value string
    A value that will be searched for in option. Available data types for value are: - string - HEX
    code float
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    ___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.
    address_pool str
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    comment str
    disabled bool
    ip_dhcp_server_option_matcher_id str
    matching_type str
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    name str
    option_set str
    A custom set of DHCP options defined in the Option Sets menu.
    server str
    Server name which serves option matcher.
    value str
    A value that will be searched for in option. Available data types for value are: - string - HEX
    code Number
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    ___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.
    addressPool String
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    comment String
    disabled Boolean
    ipDhcpServerOptionMatcherId String
    matchingType String
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    name String
    optionSet String
    A custom set of DHCP options defined in the Option Sets menu.
    server String
    Server name which serves option matcher.
    value String
    A value that will be searched for in option. Available data types for value are: - string - HEX

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IpDhcpServerOptionMatcher Resource

    Get an existing IpDhcpServerOptionMatcher 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?: IpDhcpServerOptionMatcherState, opts?: CustomResourceOptions): IpDhcpServerOptionMatcher
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ___id_: Optional[float] = None,
            ___path_: Optional[str] = None,
            address_pool: Optional[str] = None,
            code: Optional[float] = None,
            comment: Optional[str] = None,
            disabled: Optional[bool] = None,
            ip_dhcp_server_option_matcher_id: Optional[str] = None,
            matching_type: Optional[str] = None,
            name: Optional[str] = None,
            option_set: Optional[str] = None,
            server: Optional[str] = None,
            value: Optional[str] = None) -> IpDhcpServerOptionMatcher
    func GetIpDhcpServerOptionMatcher(ctx *Context, name string, id IDInput, state *IpDhcpServerOptionMatcherState, opts ...ResourceOption) (*IpDhcpServerOptionMatcher, error)
    public static IpDhcpServerOptionMatcher Get(string name, Input<string> id, IpDhcpServerOptionMatcherState? state, CustomResourceOptions? opts = null)
    public static IpDhcpServerOptionMatcher get(String name, Output<String> id, IpDhcpServerOptionMatcherState state, CustomResourceOptions options)
    resources:  _:    type: routeros:IpDhcpServerOptionMatcher    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    AddressPool string
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    Code double
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    Comment string
    Disabled bool
    IpDhcpServerOptionMatcherId string
    MatchingType string
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    Name string
    OptionSet string
    A custom set of DHCP options defined in the Option Sets menu.
    Server string
    Server name which serves option matcher.
    Value string
    A value that will be searched for in option. Available data types for value are: - string - HEX
    ___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.
    AddressPool string
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    Code float64
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    Comment string
    Disabled bool
    IpDhcpServerOptionMatcherId string
    MatchingType string
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    Name string
    OptionSet string
    A custom set of DHCP options defined in the Option Sets menu.
    Server string
    Server name which serves option matcher.
    Value string
    A value that will be searched for in option. Available data types for value are: - string - HEX
    ___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.
    addressPool String
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    code Double
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    comment String
    disabled Boolean
    ipDhcpServerOptionMatcherId String
    matchingType String
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    name String
    optionSet String
    A custom set of DHCP options defined in the Option Sets menu.
    server String
    Server name which serves option matcher.
    value String
    A value that will be searched for in option. Available data types for value are: - string - HEX
    ___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.
    addressPool string
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    code number
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    comment string
    disabled boolean
    ipDhcpServerOptionMatcherId string
    matchingType string
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    name string
    optionSet string
    A custom set of DHCP options defined in the Option Sets menu.
    server string
    Server name which serves option matcher.
    value string
    A value that will be searched for in option. Available data types for value are: - string - HEX
    ___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.
    address_pool str
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    code float
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    comment str
    disabled bool
    ip_dhcp_server_option_matcher_id str
    matching_type str
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    name str
    option_set str
    A custom set of DHCP options defined in the Option Sets menu.
    server str
    Server name which serves option matcher.
    value str
    A value that will be searched for in option. Available data types for value are: - string - HEX
    ___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.
    addressPool String
    IP pool, from which to take IP addresses for the clients. If set to static-only, then only the clients that have a static lease (added in lease submenu) will be allowed.
    code Number
    DHCP option code. All codes are available at http://www.iana.org/assignments/bootp-dhcp-parameters
    comment String
    disabled Boolean
    ipDhcpServerOptionMatcherId String
    matchingType String
    Matching method: - exact: option should match exactly to value - substring: value can match anywhere in the option string; at the start, middle, or end.
    name String
    optionSet String
    A custom set of DHCP options defined in the Option Sets menu.
    server String
    Server name which serves option matcher.
    value String
    A value that will be searched for in option. Available data types for value are: - string - HEX

    Import

    #The ID can be found via API or the terminal

    #The command for the terminal is -> :put [/ip/dhcp-server/matcher/get [print show-ids]]

    $ pulumi import routeros:index/ipDhcpServerOptionMatcher:IpDhcpServerOptionMatcher test "*1"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    routeros terraform-routeros/terraform-provider-routeros
    License
    Notes
    This Pulumi package is based on the routeros Terraform Provider.
    routeros logo
    routeros 1.86.2 published on Monday, Aug 4, 2025 by terraform-routeros