1. Packages
  2. Cisco NX OS Resource Provider
  3. API Docs
  4. getDhcpRelayAddress
Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs

nxos.getDhcpRelayAddress

Explore with Pulumi AI

nxos logo
Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs

    This data source can read a DHCP relay address.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nxos = Pulumi.Nxos;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Nxos.GetDhcpRelayAddress.Invoke(new()
        {
            Address = "1.1.1.1",
            InterfaceId = "eth1/10",
            Vrf = "VRF1",
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-nxos/sdk/go/nxos"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nxos.LookupDhcpRelayAddress(ctx, &nxos.LookupDhcpRelayAddressArgs{
    			Address:     "1.1.1.1",
    			InterfaceId: "eth1/10",
    			Vrf:         "VRF1",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nxos.NxosFunctions;
    import com.pulumi.nxos.inputs.GetDhcpRelayAddressArgs;
    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 example = NxosFunctions.getDhcpRelayAddress(GetDhcpRelayAddressArgs.builder()
                .address("1.1.1.1")
                .interfaceId("eth1/10")
                .vrf("VRF1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_nxos as nxos
    
    example = nxos.get_dhcp_relay_address(address="1.1.1.1",
        interface_id="eth1/10",
        vrf="VRF1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@pulumi/nxos";
    
    const example = nxos.getDhcpRelayAddress({
        address: "1.1.1.1",
        interfaceId: "eth1/10",
        vrf: "VRF1",
    });
    
    variables:
      example:
        fn::invoke:
          Function: nxos:getDhcpRelayAddress
          Arguments:
            address: 1.1.1.1
            interfaceId: eth1/10
            vrf: VRF1
    

    Using getDhcpRelayAddress

    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 getDhcpRelayAddress(args: GetDhcpRelayAddressArgs, opts?: InvokeOptions): Promise<GetDhcpRelayAddressResult>
    function getDhcpRelayAddressOutput(args: GetDhcpRelayAddressOutputArgs, opts?: InvokeOptions): Output<GetDhcpRelayAddressResult>
    def get_dhcp_relay_address(address: Optional[str] = None,
                               device: Optional[str] = None,
                               interface_id: Optional[str] = None,
                               vrf: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetDhcpRelayAddressResult
    def get_dhcp_relay_address_output(address: Optional[pulumi.Input[str]] = None,
                               device: Optional[pulumi.Input[str]] = None,
                               interface_id: Optional[pulumi.Input[str]] = None,
                               vrf: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetDhcpRelayAddressResult]
    func LookupDhcpRelayAddress(ctx *Context, args *LookupDhcpRelayAddressArgs, opts ...InvokeOption) (*LookupDhcpRelayAddressResult, error)
    func LookupDhcpRelayAddressOutput(ctx *Context, args *LookupDhcpRelayAddressOutputArgs, opts ...InvokeOption) LookupDhcpRelayAddressResultOutput

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

    public static class GetDhcpRelayAddress 
    {
        public static Task<GetDhcpRelayAddressResult> InvokeAsync(GetDhcpRelayAddressArgs args, InvokeOptions? opts = null)
        public static Output<GetDhcpRelayAddressResult> Invoke(GetDhcpRelayAddressInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDhcpRelayAddressResult> getDhcpRelayAddress(GetDhcpRelayAddressArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nxos:index/getDhcpRelayAddress:getDhcpRelayAddress
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Address string
    IPv4 or IPv6 address.
    InterfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    Address string
    IPv4 or IPv6 address.
    InterfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    address String
    IPv4 or IPv6 address.
    interfaceId String
    Must match first field in the output of show intf brief. Example: eth1/1.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.
    address string
    IPv4 or IPv6 address.
    interfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    vrf string
    VRF name.
    device string
    A device name from the provider configuration.
    address str
    IPv4 or IPv6 address.
    interface_id str
    Must match first field in the output of show intf brief. Example: eth1/1.
    vrf str
    VRF name.
    device str
    A device name from the provider configuration.
    address String
    IPv4 or IPv6 address.
    interfaceId String
    Must match first field in the output of show intf brief. Example: eth1/1.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.

    getDhcpRelayAddress Result

    The following output properties are available:

    Address string
    IPv4 or IPv6 address.
    Id string
    The distinguished name of the object.
    InterfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    Address string
    IPv4 or IPv6 address.
    Id string
    The distinguished name of the object.
    InterfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    address String
    IPv4 or IPv6 address.
    id String
    The distinguished name of the object.
    interfaceId String
    Must match first field in the output of show intf brief. Example: eth1/1.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.
    address string
    IPv4 or IPv6 address.
    id string
    The distinguished name of the object.
    interfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    vrf string
    VRF name.
    device string
    A device name from the provider configuration.
    address str
    IPv4 or IPv6 address.
    id str
    The distinguished name of the object.
    interface_id str
    Must match first field in the output of show intf brief. Example: eth1/1.
    vrf str
    VRF name.
    device str
    A device name from the provider configuration.
    address String
    IPv4 or IPv6 address.
    id String
    The distinguished name of the object.
    interfaceId String
    Must match first field in the output of show intf brief. Example: eth1/1.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.

    Package Details

    Repository
    nxos lbrlabs/pulumi-nxos
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nxos Terraform Provider.
    nxos logo
    Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs