1. Packages
  2. Vcd Provider
  3. API Docs
  4. getNsxtNetworkDhcpBinding
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getNsxtNetworkDhcpBinding

Explore with Pulumi AI

Provides a data source to read NSX-T Org VDC network DHCP bindings.

This data source requires VCD 10.3.1+

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";

const pools = vcd.getNsxtNetworkDhcp({
    org: "cloud",
    orgNetworkId: data.vcd_network_routed_v2.parent.id,
});
const binding1 = pools.then(pools => vcd.getNsxtNetworkDhcpBinding({
    org: "cloud",
    orgNetworkId: pools.id,
    name: "Binding-one",
}));
Copy
import pulumi
import pulumi_vcd as vcd

pools = vcd.get_nsxt_network_dhcp(org="cloud",
    org_network_id=data["vcd_network_routed_v2"]["parent"]["id"])
binding1 = vcd.get_nsxt_network_dhcp_binding(org="cloud",
    org_network_id=pools.id,
    name="Binding-one")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pools, err := vcd.LookupNsxtNetworkDhcp(ctx, &vcd.LookupNsxtNetworkDhcpArgs{
			Org:          pulumi.StringRef("cloud"),
			OrgNetworkId: data.Vcd_network_routed_v2.Parent.Id,
		}, nil)
		if err != nil {
			return err
		}
		_, err = vcd.LookupNsxtNetworkDhcpBinding(ctx, &vcd.LookupNsxtNetworkDhcpBindingArgs{
			Org:          pulumi.StringRef("cloud"),
			OrgNetworkId: pools.Id,
			Name:         "Binding-one",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;

return await Deployment.RunAsync(() => 
{
    var pools = Vcd.GetNsxtNetworkDhcp.Invoke(new()
    {
        Org = "cloud",
        OrgNetworkId = data.Vcd_network_routed_v2.Parent.Id,
    });

    var binding1 = Vcd.GetNsxtNetworkDhcpBinding.Invoke(new()
    {
        Org = "cloud",
        OrgNetworkId = pools.Apply(getNsxtNetworkDhcpResult => getNsxtNetworkDhcpResult.Id),
        Name = "Binding-one",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetNsxtNetworkDhcpArgs;
import com.pulumi.vcd.inputs.GetNsxtNetworkDhcpBindingArgs;
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) {
        final var pools = VcdFunctions.getNsxtNetworkDhcp(GetNsxtNetworkDhcpArgs.builder()
            .org("cloud")
            .orgNetworkId(data.vcd_network_routed_v2().parent().id())
            .build());

        final var binding1 = VcdFunctions.getNsxtNetworkDhcpBinding(GetNsxtNetworkDhcpBindingArgs.builder()
            .org("cloud")
            .orgNetworkId(pools.applyValue(getNsxtNetworkDhcpResult -> getNsxtNetworkDhcpResult.id()))
            .name("Binding-one")
            .build());

    }
}
Copy
variables:
  pools:
    fn::invoke:
      function: vcd:getNsxtNetworkDhcp
      arguments:
        org: cloud
        orgNetworkId: ${data.vcd_network_routed_v2.parent.id}
  binding1:
    fn::invoke:
      function: vcd:getNsxtNetworkDhcpBinding
      arguments:
        org: cloud
        orgNetworkId: ${pools.id}
        name: Binding-one
Copy

Using getNsxtNetworkDhcpBinding

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNsxtNetworkDhcpBinding(args: GetNsxtNetworkDhcpBindingArgs, opts?: InvokeOptions): Promise<GetNsxtNetworkDhcpBindingResult>
function getNsxtNetworkDhcpBindingOutput(args: GetNsxtNetworkDhcpBindingOutputArgs, opts?: InvokeOptions): Output<GetNsxtNetworkDhcpBindingResult>
Copy
def get_nsxt_network_dhcp_binding(id: Optional[str] = None,
                                  name: Optional[str] = None,
                                  org: Optional[str] = None,
                                  org_network_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetNsxtNetworkDhcpBindingResult
def get_nsxt_network_dhcp_binding_output(id: Optional[pulumi.Input[str]] = None,
                                  name: Optional[pulumi.Input[str]] = None,
                                  org: Optional[pulumi.Input[str]] = None,
                                  org_network_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetNsxtNetworkDhcpBindingResult]
Copy
func LookupNsxtNetworkDhcpBinding(ctx *Context, args *LookupNsxtNetworkDhcpBindingArgs, opts ...InvokeOption) (*LookupNsxtNetworkDhcpBindingResult, error)
func LookupNsxtNetworkDhcpBindingOutput(ctx *Context, args *LookupNsxtNetworkDhcpBindingOutputArgs, opts ...InvokeOption) LookupNsxtNetworkDhcpBindingResultOutput
Copy

> Note: This function is named LookupNsxtNetworkDhcpBinding in the Go SDK.

public static class GetNsxtNetworkDhcpBinding 
{
    public static Task<GetNsxtNetworkDhcpBindingResult> InvokeAsync(GetNsxtNetworkDhcpBindingArgs args, InvokeOptions? opts = null)
    public static Output<GetNsxtNetworkDhcpBindingResult> Invoke(GetNsxtNetworkDhcpBindingInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNsxtNetworkDhcpBindingResult> getNsxtNetworkDhcpBinding(GetNsxtNetworkDhcpBindingArgs args, InvokeOptions options)
public static Output<GetNsxtNetworkDhcpBindingResult> getNsxtNetworkDhcpBinding(GetNsxtNetworkDhcpBindingArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vcd:index/getNsxtNetworkDhcpBinding:getNsxtNetworkDhcpBinding
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
A name of DHCP binding
OrgNetworkId This property is required. string
The ID of an Org VDC network. Note .id field of vcd.NetworkIsolatedV2, vcd.NetworkRoutedV2 or vcd.NsxtNetworkDhcp can be referenced here
Id string
Org string
The name of organization. Optional if defined at provider level
Name This property is required. string
A name of DHCP binding
OrgNetworkId This property is required. string
The ID of an Org VDC network. Note .id field of vcd.NetworkIsolatedV2, vcd.NetworkRoutedV2 or vcd.NsxtNetworkDhcp can be referenced here
Id string
Org string
The name of organization. Optional if defined at provider level
name This property is required. String
A name of DHCP binding
orgNetworkId This property is required. String
The ID of an Org VDC network. Note .id field of vcd.NetworkIsolatedV2, vcd.NetworkRoutedV2 or vcd.NsxtNetworkDhcp can be referenced here
id String
org String
The name of organization. Optional if defined at provider level
name This property is required. string
A name of DHCP binding
orgNetworkId This property is required. string
The ID of an Org VDC network. Note .id field of vcd.NetworkIsolatedV2, vcd.NetworkRoutedV2 or vcd.NsxtNetworkDhcp can be referenced here
id string
org string
The name of organization. Optional if defined at provider level
name This property is required. str
A name of DHCP binding
org_network_id This property is required. str
The ID of an Org VDC network. Note .id field of vcd.NetworkIsolatedV2, vcd.NetworkRoutedV2 or vcd.NsxtNetworkDhcp can be referenced here
id str
org str
The name of organization. Optional if defined at provider level
name This property is required. String
A name of DHCP binding
orgNetworkId This property is required. String
The ID of an Org VDC network. Note .id field of vcd.NetworkIsolatedV2, vcd.NetworkRoutedV2 or vcd.NsxtNetworkDhcp can be referenced here
id String
org String
The name of organization. Optional if defined at provider level

getNsxtNetworkDhcpBinding Result

The following output properties are available:

Supporting Types

GetNsxtNetworkDhcpBindingDhcpV4Config

GatewayIpAddress This property is required. string
Hostname This property is required. string
GatewayIpAddress This property is required. string
Hostname This property is required. string
gatewayIpAddress This property is required. String
hostname This property is required. String
gatewayIpAddress This property is required. string
hostname This property is required. string
gateway_ip_address This property is required. str
hostname This property is required. str
gatewayIpAddress This property is required. String
hostname This property is required. String

GetNsxtNetworkDhcpBindingDhcpV6Config

DnsServers This property is required. List<string>
SntpServers This property is required. List<string>
DnsServers This property is required. []string
SntpServers This property is required. []string
dnsServers This property is required. List<String>
sntpServers This property is required. List<String>
dnsServers This property is required. string[]
sntpServers This property is required. string[]
dns_servers This property is required. Sequence[str]
sntp_servers This property is required. Sequence[str]
dnsServers This property is required. List<String>
sntpServers This property is required. List<String>

Package Details

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