1. Packages
  2. Cisco IOS XE Resource Provider
  3. API Docs
  4. getDhcp
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

iosxe.getDhcp

Explore with Pulumi AI

iosxe logo
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

    This data source can read the DHCP configuration.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Iosxe = Pulumi.Iosxe;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Iosxe.GetDhcp.Invoke();
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-iosxe/sdk/go/iosxe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iosxe.LookupDhcp(ctx, nil, 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.iosxe.IosxeFunctions;
    import com.pulumi.iosxe.inputs.GetDhcpArgs;
    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 = IosxeFunctions.getDhcp();
    
        }
    }
    
    import pulumi
    import pulumi_iosxe as iosxe
    
    example = iosxe.get_dhcp()
    
    import * as pulumi from "@pulumi/pulumi";
    import * as iosxe from "@pulumi/iosxe";
    
    const example = iosxe.getDhcp({});
    
    variables:
      example:
        fn::invoke:
          Function: iosxe:getDhcp
          Arguments: {}
    

    Using getDhcp

    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 getDhcp(args: GetDhcpArgs, opts?: InvokeOptions): Promise<GetDhcpResult>
    function getDhcpOutput(args: GetDhcpOutputArgs, opts?: InvokeOptions): Output<GetDhcpResult>
    def get_dhcp(device: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetDhcpResult
    def get_dhcp_output(device: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetDhcpResult]
    func LookupDhcp(ctx *Context, args *LookupDhcpArgs, opts ...InvokeOption) (*LookupDhcpResult, error)
    func LookupDhcpOutput(ctx *Context, args *LookupDhcpOutputArgs, opts ...InvokeOption) LookupDhcpResultOutput

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

    public static class GetDhcp 
    {
        public static Task<GetDhcpResult> InvokeAsync(GetDhcpArgs args, InvokeOptions? opts = null)
        public static Output<GetDhcpResult> Invoke(GetDhcpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDhcpResult> getDhcp(GetDhcpArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: iosxe:index/getDhcp:getDhcp
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Device string
    A device name from the provider configuration.
    Device string
    A device name from the provider configuration.
    device String
    A device name from the provider configuration.
    device string
    A device name from the provider configuration.
    device str
    A device name from the provider configuration.
    device String
    A device name from the provider configuration.

    getDhcp Result

    The following output properties are available:

    CompatibilitySuboptionLinkSelection string
    CompatibilitySuboptionServerOverride string
    Id string
    The path of the retrieved object.
    RelayInformationOptionDefault bool
    Default option, no vpn
    RelayInformationOptionVpn bool
    Insert VPN sub-options and change the giaddr to the outgoing interface
    RelayInformationTrustAll bool
    Received DHCP packets may contain relay info option with zero giaddr
    Snooping bool
    DHCP Snooping
    SnoopingInformationOptionFormatRemoteIdHostname bool
    Use configured hostname for remote id
    SnoopingVlans List<Lbrlabs.PulumiPackage.Iosxe.Outputs.GetDhcpSnoopingVlan>
    DHCP Snooping vlan
    Device string
    A device name from the provider configuration.
    CompatibilitySuboptionLinkSelection string
    CompatibilitySuboptionServerOverride string
    Id string
    The path of the retrieved object.
    RelayInformationOptionDefault bool
    Default option, no vpn
    RelayInformationOptionVpn bool
    Insert VPN sub-options and change the giaddr to the outgoing interface
    RelayInformationTrustAll bool
    Received DHCP packets may contain relay info option with zero giaddr
    Snooping bool
    DHCP Snooping
    SnoopingInformationOptionFormatRemoteIdHostname bool
    Use configured hostname for remote id
    SnoopingVlans []GetDhcpSnoopingVlan
    DHCP Snooping vlan
    Device string
    A device name from the provider configuration.
    compatibilitySuboptionLinkSelection String
    compatibilitySuboptionServerOverride String
    id String
    The path of the retrieved object.
    relayInformationOptionDefault Boolean
    Default option, no vpn
    relayInformationOptionVpn Boolean
    Insert VPN sub-options and change the giaddr to the outgoing interface
    relayInformationTrustAll Boolean
    Received DHCP packets may contain relay info option with zero giaddr
    snooping Boolean
    DHCP Snooping
    snoopingInformationOptionFormatRemoteIdHostname Boolean
    Use configured hostname for remote id
    snoopingVlans List<GetDhcpSnoopingVlan>
    DHCP Snooping vlan
    device String
    A device name from the provider configuration.
    compatibilitySuboptionLinkSelection string
    compatibilitySuboptionServerOverride string
    id string
    The path of the retrieved object.
    relayInformationOptionDefault boolean
    Default option, no vpn
    relayInformationOptionVpn boolean
    Insert VPN sub-options and change the giaddr to the outgoing interface
    relayInformationTrustAll boolean
    Received DHCP packets may contain relay info option with zero giaddr
    snooping boolean
    DHCP Snooping
    snoopingInformationOptionFormatRemoteIdHostname boolean
    Use configured hostname for remote id
    snoopingVlans GetDhcpSnoopingVlan[]
    DHCP Snooping vlan
    device string
    A device name from the provider configuration.
    compatibility_suboption_link_selection str
    compatibility_suboption_server_override str
    id str
    The path of the retrieved object.
    relay_information_option_default bool
    Default option, no vpn
    relay_information_option_vpn bool
    Insert VPN sub-options and change the giaddr to the outgoing interface
    relay_information_trust_all bool
    Received DHCP packets may contain relay info option with zero giaddr
    snooping bool
    DHCP Snooping
    snooping_information_option_format_remote_id_hostname bool
    Use configured hostname for remote id
    snooping_vlans Sequence[GetDhcpSnoopingVlan]
    DHCP Snooping vlan
    device str
    A device name from the provider configuration.
    compatibilitySuboptionLinkSelection String
    compatibilitySuboptionServerOverride String
    id String
    The path of the retrieved object.
    relayInformationOptionDefault Boolean
    Default option, no vpn
    relayInformationOptionVpn Boolean
    Insert VPN sub-options and change the giaddr to the outgoing interface
    relayInformationTrustAll Boolean
    Received DHCP packets may contain relay info option with zero giaddr
    snooping Boolean
    DHCP Snooping
    snoopingInformationOptionFormatRemoteIdHostname Boolean
    Use configured hostname for remote id
    snoopingVlans List<Property Map>
    DHCP Snooping vlan
    device String
    A device name from the provider configuration.

    Supporting Types

    GetDhcpSnoopingVlan

    VlanId string
    DHCP Snooping vlan first number or vlan range,example: 1,3-5,7,9-11
    VlanId string
    DHCP Snooping vlan first number or vlan range,example: 1,3-5,7,9-11
    vlanId String
    DHCP Snooping vlan first number or vlan range,example: 1,3-5,7,9-11
    vlanId string
    DHCP Snooping vlan first number or vlan range,example: 1,3-5,7,9-11
    vlan_id str
    DHCP Snooping vlan first number or vlan range,example: 1,3-5,7,9-11
    vlanId String
    DHCP Snooping vlan first number or vlan range,example: 1,3-5,7,9-11

    Package Details

    Repository
    iosxe lbrlabs/pulumi-iosxe
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the iosxe Terraform Provider.
    iosxe logo
    Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs