1. Packages
  2. Nsxt Provider
  3. API Docs
  4. LogicalDhcpServer
nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware

nsxt.LogicalDhcpServer

Explore with Pulumi AI

nsxt logo
nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware

    Create LogicalDhcpServer Resource

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

    Constructor syntax

    new LogicalDhcpServer(name: string, args: LogicalDhcpServerArgs, opts?: CustomResourceOptions);
    @overload
    def LogicalDhcpServer(resource_name: str,
                          args: LogicalDhcpServerArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogicalDhcpServer(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          dhcp_profile_id: Optional[str] = None,
                          dhcp_server_ip: Optional[str] = None,
                          description: Optional[str] = None,
                          dhcp_generic_options: Optional[Sequence[LogicalDhcpServerDhcpGenericOptionArgs]] = None,
                          dhcp_option121s: Optional[Sequence[LogicalDhcpServerDhcpOption121Args]] = None,
                          display_name: Optional[str] = None,
                          dns_name_servers: Optional[Sequence[str]] = None,
                          domain_name: Optional[str] = None,
                          gateway_ip: Optional[str] = None,
                          logical_dhcp_server_id: Optional[str] = None,
                          tags: Optional[Sequence[LogicalDhcpServerTagArgs]] = None)
    func NewLogicalDhcpServer(ctx *Context, name string, args LogicalDhcpServerArgs, opts ...ResourceOption) (*LogicalDhcpServer, error)
    public LogicalDhcpServer(string name, LogicalDhcpServerArgs args, CustomResourceOptions? opts = null)
    public LogicalDhcpServer(String name, LogicalDhcpServerArgs args)
    public LogicalDhcpServer(String name, LogicalDhcpServerArgs args, CustomResourceOptions options)
    
    type: nsxt:LogicalDhcpServer
    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 LogicalDhcpServerArgs
    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 LogicalDhcpServerArgs
    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 LogicalDhcpServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LogicalDhcpServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LogicalDhcpServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var logicalDhcpServerResource = new Nsxt.LogicalDhcpServer("logicalDhcpServerResource", new()
    {
        DhcpProfileId = "string",
        DhcpServerIp = "string",
        Description = "string",
        DhcpGenericOptions = new[]
        {
            new Nsxt.Inputs.LogicalDhcpServerDhcpGenericOptionArgs
            {
                Code = 0,
                Values = new[]
                {
                    "string",
                },
            },
        },
        DhcpOption121s = new[]
        {
            new Nsxt.Inputs.LogicalDhcpServerDhcpOption121Args
            {
                Network = "string",
                NextHop = "string",
            },
        },
        DisplayName = "string",
        DnsNameServers = new[]
        {
            "string",
        },
        DomainName = "string",
        GatewayIp = "string",
        LogicalDhcpServerId = "string",
        Tags = new[]
        {
            new Nsxt.Inputs.LogicalDhcpServerTagArgs
            {
                Scope = "string",
                Tag = "string",
            },
        },
    });
    
    example, err := nsxt.NewLogicalDhcpServer(ctx, "logicalDhcpServerResource", &nsxt.LogicalDhcpServerArgs{
    	DhcpProfileId: pulumi.String("string"),
    	DhcpServerIp:  pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	DhcpGenericOptions: nsxt.LogicalDhcpServerDhcpGenericOptionArray{
    		&nsxt.LogicalDhcpServerDhcpGenericOptionArgs{
    			Code: pulumi.Float64(0),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	DhcpOption121s: nsxt.LogicalDhcpServerDhcpOption121Array{
    		&nsxt.LogicalDhcpServerDhcpOption121Args{
    			Network: pulumi.String("string"),
    			NextHop: pulumi.String("string"),
    		},
    	},
    	DisplayName: pulumi.String("string"),
    	DnsNameServers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DomainName:          pulumi.String("string"),
    	GatewayIp:           pulumi.String("string"),
    	LogicalDhcpServerId: pulumi.String("string"),
    	Tags: nsxt.LogicalDhcpServerTagArray{
    		&nsxt.LogicalDhcpServerTagArgs{
    			Scope: pulumi.String("string"),
    			Tag:   pulumi.String("string"),
    		},
    	},
    })
    
    var logicalDhcpServerResource = new LogicalDhcpServer("logicalDhcpServerResource", LogicalDhcpServerArgs.builder()
        .dhcpProfileId("string")
        .dhcpServerIp("string")
        .description("string")
        .dhcpGenericOptions(LogicalDhcpServerDhcpGenericOptionArgs.builder()
            .code(0)
            .values("string")
            .build())
        .dhcpOption121s(LogicalDhcpServerDhcpOption121Args.builder()
            .network("string")
            .nextHop("string")
            .build())
        .displayName("string")
        .dnsNameServers("string")
        .domainName("string")
        .gatewayIp("string")
        .logicalDhcpServerId("string")
        .tags(LogicalDhcpServerTagArgs.builder()
            .scope("string")
            .tag("string")
            .build())
        .build());
    
    logical_dhcp_server_resource = nsxt.LogicalDhcpServer("logicalDhcpServerResource",
        dhcp_profile_id="string",
        dhcp_server_ip="string",
        description="string",
        dhcp_generic_options=[{
            "code": 0,
            "values": ["string"],
        }],
        dhcp_option121s=[{
            "network": "string",
            "next_hop": "string",
        }],
        display_name="string",
        dns_name_servers=["string"],
        domain_name="string",
        gateway_ip="string",
        logical_dhcp_server_id="string",
        tags=[{
            "scope": "string",
            "tag": "string",
        }])
    
    const logicalDhcpServerResource = new nsxt.LogicalDhcpServer("logicalDhcpServerResource", {
        dhcpProfileId: "string",
        dhcpServerIp: "string",
        description: "string",
        dhcpGenericOptions: [{
            code: 0,
            values: ["string"],
        }],
        dhcpOption121s: [{
            network: "string",
            nextHop: "string",
        }],
        displayName: "string",
        dnsNameServers: ["string"],
        domainName: "string",
        gatewayIp: "string",
        logicalDhcpServerId: "string",
        tags: [{
            scope: "string",
            tag: "string",
        }],
    });
    
    type: nsxt:LogicalDhcpServer
    properties:
        description: string
        dhcpGenericOptions:
            - code: 0
              values:
                - string
        dhcpOption121s:
            - network: string
              nextHop: string
        dhcpProfileId: string
        dhcpServerIp: string
        displayName: string
        dnsNameServers:
            - string
        domainName: string
        gatewayIp: string
        logicalDhcpServerId: string
        tags:
            - scope: string
              tag: string
    

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

    DhcpProfileId string
    DHCP profile uuid.
    DhcpServerIp string
    DHCP server IP in cidr format.
    Description string
    Description of this resource.
    DhcpGenericOptions List<LogicalDhcpServerDhcpGenericOption>
    Generic DHCP options.
    DhcpOption121s List<LogicalDhcpServerDhcpOption121>
    DHCP classless static routes.
    DisplayName string
    The display name of this resource. Defaults to ID if not set.
    DnsNameServers List<string>
    DNS IPs.
    DomainName string
    Domain name.
    GatewayIp string
    Gateway IP.
    LogicalDhcpServerId string
    ID of the logical DHCP server.
    Tags List<LogicalDhcpServerTag>
    A list of scope + tag pairs to associate with this logical DHCP server.
    DhcpProfileId string
    DHCP profile uuid.
    DhcpServerIp string
    DHCP server IP in cidr format.
    Description string
    Description of this resource.
    DhcpGenericOptions []LogicalDhcpServerDhcpGenericOptionArgs
    Generic DHCP options.
    DhcpOption121s []LogicalDhcpServerDhcpOption121Args
    DHCP classless static routes.
    DisplayName string
    The display name of this resource. Defaults to ID if not set.
    DnsNameServers []string
    DNS IPs.
    DomainName string
    Domain name.
    GatewayIp string
    Gateway IP.
    LogicalDhcpServerId string
    ID of the logical DHCP server.
    Tags []LogicalDhcpServerTagArgs
    A list of scope + tag pairs to associate with this logical DHCP server.
    dhcpProfileId String
    DHCP profile uuid.
    dhcpServerIp String
    DHCP server IP in cidr format.
    description String
    Description of this resource.
    dhcpGenericOptions List<LogicalDhcpServerDhcpGenericOption>
    Generic DHCP options.
    dhcpOption121s List<LogicalDhcpServerDhcpOption121>
    DHCP classless static routes.
    displayName String
    The display name of this resource. Defaults to ID if not set.
    dnsNameServers List<String>
    DNS IPs.
    domainName String
    Domain name.
    gatewayIp String
    Gateway IP.
    logicalDhcpServerId String
    ID of the logical DHCP server.
    tags List<LogicalDhcpServerTag>
    A list of scope + tag pairs to associate with this logical DHCP server.
    dhcpProfileId string
    DHCP profile uuid.
    dhcpServerIp string
    DHCP server IP in cidr format.
    description string
    Description of this resource.
    dhcpGenericOptions LogicalDhcpServerDhcpGenericOption[]
    Generic DHCP options.
    dhcpOption121s LogicalDhcpServerDhcpOption121[]
    DHCP classless static routes.
    displayName string
    The display name of this resource. Defaults to ID if not set.
    dnsNameServers string[]
    DNS IPs.
    domainName string
    Domain name.
    gatewayIp string
    Gateway IP.
    logicalDhcpServerId string
    ID of the logical DHCP server.
    tags LogicalDhcpServerTag[]
    A list of scope + tag pairs to associate with this logical DHCP server.
    dhcp_profile_id str
    DHCP profile uuid.
    dhcp_server_ip str
    DHCP server IP in cidr format.
    description str
    Description of this resource.
    dhcp_generic_options Sequence[LogicalDhcpServerDhcpGenericOptionArgs]
    Generic DHCP options.
    dhcp_option121s Sequence[LogicalDhcpServerDhcpOption121Args]
    DHCP classless static routes.
    display_name str
    The display name of this resource. Defaults to ID if not set.
    dns_name_servers Sequence[str]
    DNS IPs.
    domain_name str
    Domain name.
    gateway_ip str
    Gateway IP.
    logical_dhcp_server_id str
    ID of the logical DHCP server.
    tags Sequence[LogicalDhcpServerTagArgs]
    A list of scope + tag pairs to associate with this logical DHCP server.
    dhcpProfileId String
    DHCP profile uuid.
    dhcpServerIp String
    DHCP server IP in cidr format.
    description String
    Description of this resource.
    dhcpGenericOptions List<Property Map>
    Generic DHCP options.
    dhcpOption121s List<Property Map>
    DHCP classless static routes.
    displayName String
    The display name of this resource. Defaults to ID if not set.
    dnsNameServers List<String>
    DNS IPs.
    domainName String
    Domain name.
    gatewayIp String
    Gateway IP.
    logicalDhcpServerId String
    ID of the logical DHCP server.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this logical DHCP server.

    Outputs

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

    AttachedLogicalPortId string
    ID of the attached logical port.
    Id string
    The provider-assigned unique ID for this managed resource.
    Revision double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    AttachedLogicalPortId string
    ID of the attached logical port.
    Id string
    The provider-assigned unique ID for this managed resource.
    Revision float64
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    attachedLogicalPortId String
    ID of the attached logical port.
    id String
    The provider-assigned unique ID for this managed resource.
    revision Double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    attachedLogicalPortId string
    ID of the attached logical port.
    id string
    The provider-assigned unique ID for this managed resource.
    revision number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    attached_logical_port_id str
    ID of the attached logical port.
    id str
    The provider-assigned unique ID for this managed resource.
    revision float
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    attachedLogicalPortId String
    ID of the attached logical port.
    id String
    The provider-assigned unique ID for this managed resource.
    revision Number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.

    Look up Existing LogicalDhcpServer Resource

    Get an existing LogicalDhcpServer 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?: LogicalDhcpServerState, opts?: CustomResourceOptions): LogicalDhcpServer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            attached_logical_port_id: Optional[str] = None,
            description: Optional[str] = None,
            dhcp_generic_options: Optional[Sequence[LogicalDhcpServerDhcpGenericOptionArgs]] = None,
            dhcp_option121s: Optional[Sequence[LogicalDhcpServerDhcpOption121Args]] = None,
            dhcp_profile_id: Optional[str] = None,
            dhcp_server_ip: Optional[str] = None,
            display_name: Optional[str] = None,
            dns_name_servers: Optional[Sequence[str]] = None,
            domain_name: Optional[str] = None,
            gateway_ip: Optional[str] = None,
            logical_dhcp_server_id: Optional[str] = None,
            revision: Optional[float] = None,
            tags: Optional[Sequence[LogicalDhcpServerTagArgs]] = None) -> LogicalDhcpServer
    func GetLogicalDhcpServer(ctx *Context, name string, id IDInput, state *LogicalDhcpServerState, opts ...ResourceOption) (*LogicalDhcpServer, error)
    public static LogicalDhcpServer Get(string name, Input<string> id, LogicalDhcpServerState? state, CustomResourceOptions? opts = null)
    public static LogicalDhcpServer get(String name, Output<String> id, LogicalDhcpServerState state, CustomResourceOptions options)
    resources:  _:    type: nsxt:LogicalDhcpServer    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:
    AttachedLogicalPortId string
    ID of the attached logical port.
    Description string
    Description of this resource.
    DhcpGenericOptions List<LogicalDhcpServerDhcpGenericOption>
    Generic DHCP options.
    DhcpOption121s List<LogicalDhcpServerDhcpOption121>
    DHCP classless static routes.
    DhcpProfileId string
    DHCP profile uuid.
    DhcpServerIp string
    DHCP server IP in cidr format.
    DisplayName string
    The display name of this resource. Defaults to ID if not set.
    DnsNameServers List<string>
    DNS IPs.
    DomainName string
    Domain name.
    GatewayIp string
    Gateway IP.
    LogicalDhcpServerId string
    ID of the logical DHCP server.
    Revision double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    Tags List<LogicalDhcpServerTag>
    A list of scope + tag pairs to associate with this logical DHCP server.
    AttachedLogicalPortId string
    ID of the attached logical port.
    Description string
    Description of this resource.
    DhcpGenericOptions []LogicalDhcpServerDhcpGenericOptionArgs
    Generic DHCP options.
    DhcpOption121s []LogicalDhcpServerDhcpOption121Args
    DHCP classless static routes.
    DhcpProfileId string
    DHCP profile uuid.
    DhcpServerIp string
    DHCP server IP in cidr format.
    DisplayName string
    The display name of this resource. Defaults to ID if not set.
    DnsNameServers []string
    DNS IPs.
    DomainName string
    Domain name.
    GatewayIp string
    Gateway IP.
    LogicalDhcpServerId string
    ID of the logical DHCP server.
    Revision float64
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    Tags []LogicalDhcpServerTagArgs
    A list of scope + tag pairs to associate with this logical DHCP server.
    attachedLogicalPortId String
    ID of the attached logical port.
    description String
    Description of this resource.
    dhcpGenericOptions List<LogicalDhcpServerDhcpGenericOption>
    Generic DHCP options.
    dhcpOption121s List<LogicalDhcpServerDhcpOption121>
    DHCP classless static routes.
    dhcpProfileId String
    DHCP profile uuid.
    dhcpServerIp String
    DHCP server IP in cidr format.
    displayName String
    The display name of this resource. Defaults to ID if not set.
    dnsNameServers List<String>
    DNS IPs.
    domainName String
    Domain name.
    gatewayIp String
    Gateway IP.
    logicalDhcpServerId String
    ID of the logical DHCP server.
    revision Double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags List<LogicalDhcpServerTag>
    A list of scope + tag pairs to associate with this logical DHCP server.
    attachedLogicalPortId string
    ID of the attached logical port.
    description string
    Description of this resource.
    dhcpGenericOptions LogicalDhcpServerDhcpGenericOption[]
    Generic DHCP options.
    dhcpOption121s LogicalDhcpServerDhcpOption121[]
    DHCP classless static routes.
    dhcpProfileId string
    DHCP profile uuid.
    dhcpServerIp string
    DHCP server IP in cidr format.
    displayName string
    The display name of this resource. Defaults to ID if not set.
    dnsNameServers string[]
    DNS IPs.
    domainName string
    Domain name.
    gatewayIp string
    Gateway IP.
    logicalDhcpServerId string
    ID of the logical DHCP server.
    revision number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags LogicalDhcpServerTag[]
    A list of scope + tag pairs to associate with this logical DHCP server.
    attached_logical_port_id str
    ID of the attached logical port.
    description str
    Description of this resource.
    dhcp_generic_options Sequence[LogicalDhcpServerDhcpGenericOptionArgs]
    Generic DHCP options.
    dhcp_option121s Sequence[LogicalDhcpServerDhcpOption121Args]
    DHCP classless static routes.
    dhcp_profile_id str
    DHCP profile uuid.
    dhcp_server_ip str
    DHCP server IP in cidr format.
    display_name str
    The display name of this resource. Defaults to ID if not set.
    dns_name_servers Sequence[str]
    DNS IPs.
    domain_name str
    Domain name.
    gateway_ip str
    Gateway IP.
    logical_dhcp_server_id str
    ID of the logical DHCP server.
    revision float
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags Sequence[LogicalDhcpServerTagArgs]
    A list of scope + tag pairs to associate with this logical DHCP server.
    attachedLogicalPortId String
    ID of the attached logical port.
    description String
    Description of this resource.
    dhcpGenericOptions List<Property Map>
    Generic DHCP options.
    dhcpOption121s List<Property Map>
    DHCP classless static routes.
    dhcpProfileId String
    DHCP profile uuid.
    dhcpServerIp String
    DHCP server IP in cidr format.
    displayName String
    The display name of this resource. Defaults to ID if not set.
    dnsNameServers List<String>
    DNS IPs.
    domainName String
    Domain name.
    gatewayIp String
    Gateway IP.
    logicalDhcpServerId String
    ID of the logical DHCP server.
    revision Number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this logical DHCP server.

    Supporting Types

    LogicalDhcpServerDhcpGenericOption, LogicalDhcpServerDhcpGenericOptionArgs

    Code double
    DHCP option code. Valid values are from 0 to 255.
    Values List<string>
    List of DHCP option values.
    Code float64
    DHCP option code. Valid values are from 0 to 255.
    Values []string
    List of DHCP option values.
    code Double
    DHCP option code. Valid values are from 0 to 255.
    values List<String>
    List of DHCP option values.
    code number
    DHCP option code. Valid values are from 0 to 255.
    values string[]
    List of DHCP option values.
    code float
    DHCP option code. Valid values are from 0 to 255.
    values Sequence[str]
    List of DHCP option values.
    code Number
    DHCP option code. Valid values are from 0 to 255.
    values List<String>
    List of DHCP option values.

    LogicalDhcpServerDhcpOption121, LogicalDhcpServerDhcpOption121Args

    Network string
    Destination in cidr format.
    NextHop string
    IP address of next hop.
    Network string
    Destination in cidr format.
    NextHop string
    IP address of next hop.
    network String
    Destination in cidr format.
    nextHop String
    IP address of next hop.
    network string
    Destination in cidr format.
    nextHop string
    IP address of next hop.
    network str
    Destination in cidr format.
    next_hop str
    IP address of next hop.
    network String
    Destination in cidr format.
    nextHop String
    IP address of next hop.

    LogicalDhcpServerTag, LogicalDhcpServerTagArgs

    Scope string
    Tag string
    A list of scope + tag pairs to associate with this logical DHCP server.
    Scope string
    Tag string
    A list of scope + tag pairs to associate with this logical DHCP server.
    scope String
    tag String
    A list of scope + tag pairs to associate with this logical DHCP server.
    scope string
    tag string
    A list of scope + tag pairs to associate with this logical DHCP server.
    scope str
    tag str
    A list of scope + tag pairs to associate with this logical DHCP server.
    scope String
    tag String
    A list of scope + tag pairs to associate with this logical DHCP server.

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    nsxt logo
    nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware