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

nxos.getIpv4InterfaceAddress

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 an IPv4 interface address.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nxos = Pulumi.Nxos;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Nxos.GetIpv4InterfaceAddress.Invoke(new()
        {
            Address = "24.63.46.49/30",
            InterfaceId = "eth1/10",
            Vrf = "default",
        });
    
    });
    
    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.LookupIpv4InterfaceAddress(ctx, &nxos.LookupIpv4InterfaceAddressArgs{
    			Address:     "24.63.46.49/30",
    			InterfaceId: "eth1/10",
    			Vrf:         "default",
    		}, 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.GetIpv4InterfaceAddressArgs;
    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.getIpv4InterfaceAddress(GetIpv4InterfaceAddressArgs.builder()
                .address("24.63.46.49/30")
                .interfaceId("eth1/10")
                .vrf("default")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_nxos as nxos
    
    example = nxos.get_ipv4_interface_address(address="24.63.46.49/30",
        interface_id="eth1/10",
        vrf="default")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@pulumi/nxos";
    
    const example = nxos.getIpv4InterfaceAddress({
        address: "24.63.46.49/30",
        interfaceId: "eth1/10",
        vrf: "default",
    });
    
    variables:
      example:
        fn::invoke:
          Function: nxos:getIpv4InterfaceAddress
          Arguments:
            address: 24.63.46.49/30
            interfaceId: eth1/10
            vrf: default
    

    Using getIpv4InterfaceAddress

    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 getIpv4InterfaceAddress(args: GetIpv4InterfaceAddressArgs, opts?: InvokeOptions): Promise<GetIpv4InterfaceAddressResult>
    function getIpv4InterfaceAddressOutput(args: GetIpv4InterfaceAddressOutputArgs, opts?: InvokeOptions): Output<GetIpv4InterfaceAddressResult>
    def get_ipv4_interface_address(address: Optional[str] = None,
                                   device: Optional[str] = None,
                                   interface_id: Optional[str] = None,
                                   vrf: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetIpv4InterfaceAddressResult
    def get_ipv4_interface_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[GetIpv4InterfaceAddressResult]
    func LookupIpv4InterfaceAddress(ctx *Context, args *LookupIpv4InterfaceAddressArgs, opts ...InvokeOption) (*LookupIpv4InterfaceAddressResult, error)
    func LookupIpv4InterfaceAddressOutput(ctx *Context, args *LookupIpv4InterfaceAddressOutputArgs, opts ...InvokeOption) LookupIpv4InterfaceAddressResultOutput

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

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

    The following arguments are supported:

    Address string
    IPv4 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 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 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 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 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 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.

    getIpv4InterfaceAddress Result

    The following output properties are available:

    Address string
    IPv4 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.
    Type string
    Address type.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    Address string
    IPv4 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.
    Type string
    Address type.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    address String
    IPv4 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.
    type String
    Address type.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.
    address string
    IPv4 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.
    type string
    Address type.
    vrf string
    VRF name.
    device string
    A device name from the provider configuration.
    address str
    IPv4 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.
    type str
    Address type.
    vrf str
    VRF name.
    device str
    A device name from the provider configuration.
    address String
    IPv4 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.
    type String
    Address type.
    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