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

nxos.Ipv4Interface

Explore with Pulumi AI

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

    This resource can manage an IPv4 interface.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nxos = Lbrlabs.PulumiPackage.Nxos;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Nxos.Ipv4Interface("example", new()
        {
            DropGlean = "disabled",
            Forward = "disabled",
            InterfaceId = "eth1/10",
            Unnumbered = "unspecified",
            Urpf = "disabled",
            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.NewIpv4Interface(ctx, "example", &nxos.Ipv4InterfaceArgs{
    			DropGlean:   pulumi.String("disabled"),
    			Forward:     pulumi.String("disabled"),
    			InterfaceId: pulumi.String("eth1/10"),
    			Unnumbered:  pulumi.String("unspecified"),
    			Urpf:        pulumi.String("disabled"),
    			Vrf:         pulumi.String("default"),
    		})
    		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.Ipv4Interface;
    import com.pulumi.nxos.Ipv4InterfaceArgs;
    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) {
            var example = new Ipv4Interface("example", Ipv4InterfaceArgs.builder()        
                .dropGlean("disabled")
                .forward("disabled")
                .interfaceId("eth1/10")
                .unnumbered("unspecified")
                .urpf("disabled")
                .vrf("default")
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_nxos as nxos
    
    example = nxos.Ipv4Interface("example",
        drop_glean="disabled",
        forward="disabled",
        interface_id="eth1/10",
        unnumbered="unspecified",
        urpf="disabled",
        vrf="default")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@lbrlabs/pulumi-nxos";
    
    const example = new nxos.Ipv4Interface("example", {
        dropGlean: "disabled",
        forward: "disabled",
        interfaceId: "eth1/10",
        unnumbered: "unspecified",
        urpf: "disabled",
        vrf: "default",
    });
    
    resources:
      example:
        type: nxos:Ipv4Interface
        properties:
          dropGlean: disabled
          forward: disabled
          interfaceId: eth1/10
          unnumbered: unspecified
          urpf: disabled
          vrf: default
    

    Create Ipv4Interface Resource

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

    Constructor syntax

    new Ipv4Interface(name: string, args: Ipv4InterfaceArgs, opts?: CustomResourceOptions);
    @overload
    def Ipv4Interface(resource_name: str,
                      args: Ipv4InterfaceArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def Ipv4Interface(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      interface_id: Optional[str] = None,
                      vrf: Optional[str] = None,
                      device: Optional[str] = None,
                      drop_glean: Optional[str] = None,
                      forward: Optional[str] = None,
                      unnumbered: Optional[str] = None,
                      urpf: Optional[str] = None)
    func NewIpv4Interface(ctx *Context, name string, args Ipv4InterfaceArgs, opts ...ResourceOption) (*Ipv4Interface, error)
    public Ipv4Interface(string name, Ipv4InterfaceArgs args, CustomResourceOptions? opts = null)
    public Ipv4Interface(String name, Ipv4InterfaceArgs args)
    public Ipv4Interface(String name, Ipv4InterfaceArgs args, CustomResourceOptions options)
    
    type: nxos:Ipv4Interface
    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 Ipv4InterfaceArgs
    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 Ipv4InterfaceArgs
    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 Ipv4InterfaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Ipv4InterfaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Ipv4InterfaceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var ipv4InterfaceResource = new Nxos.Ipv4Interface("ipv4InterfaceResource", new()
    {
        InterfaceId = "string",
        Vrf = "string",
        Device = "string",
        DropGlean = "string",
        Forward = "string",
        Unnumbered = "string",
        Urpf = "string",
    });
    
    example, err := nxos.NewIpv4Interface(ctx, "ipv4InterfaceResource", &nxos.Ipv4InterfaceArgs{
    	InterfaceId: pulumi.String("string"),
    	Vrf:         pulumi.String("string"),
    	Device:      pulumi.String("string"),
    	DropGlean:   pulumi.String("string"),
    	Forward:     pulumi.String("string"),
    	Unnumbered:  pulumi.String("string"),
    	Urpf:        pulumi.String("string"),
    })
    
    var ipv4InterfaceResource = new Ipv4Interface("ipv4InterfaceResource", Ipv4InterfaceArgs.builder()
        .interfaceId("string")
        .vrf("string")
        .device("string")
        .dropGlean("string")
        .forward("string")
        .unnumbered("string")
        .urpf("string")
        .build());
    
    ipv4_interface_resource = nxos.Ipv4Interface("ipv4InterfaceResource",
        interface_id="string",
        vrf="string",
        device="string",
        drop_glean="string",
        forward="string",
        unnumbered="string",
        urpf="string")
    
    const ipv4InterfaceResource = new nxos.Ipv4Interface("ipv4InterfaceResource", {
        interfaceId: "string",
        vrf: "string",
        device: "string",
        dropGlean: "string",
        forward: "string",
        unnumbered: "string",
        urpf: "string",
    });
    
    type: nxos:Ipv4Interface
    properties:
        device: string
        dropGlean: string
        forward: string
        interfaceId: string
        unnumbered: string
        urpf: string
        vrf: string
    

    Ipv4Interface Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Ipv4Interface resource accepts the following input properties:

    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.
    DropGlean string
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    Forward string
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    Unnumbered string
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    Urpf string
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    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.
    DropGlean string
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    Forward string
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    Unnumbered string
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    Urpf string
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    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.
    dropGlean String
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    forward String
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    unnumbered String
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    urpf String
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    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.
    dropGlean string
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    forward string
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    unnumbered string
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    urpf string
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    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.
    drop_glean str
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    forward str
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    unnumbered str
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    urpf str
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    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.
    dropGlean String
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    forward String
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    unnumbered String
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    urpf String
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Ipv4Interface Resource

    Get an existing Ipv4Interface 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?: Ipv4InterfaceState, opts?: CustomResourceOptions): Ipv4Interface
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device: Optional[str] = None,
            drop_glean: Optional[str] = None,
            forward: Optional[str] = None,
            interface_id: Optional[str] = None,
            unnumbered: Optional[str] = None,
            urpf: Optional[str] = None,
            vrf: Optional[str] = None) -> Ipv4Interface
    func GetIpv4Interface(ctx *Context, name string, id IDInput, state *Ipv4InterfaceState, opts ...ResourceOption) (*Ipv4Interface, error)
    public static Ipv4Interface Get(string name, Input<string> id, Ipv4InterfaceState? state, CustomResourceOptions? opts = null)
    public static Ipv4Interface get(String name, Output<String> id, Ipv4InterfaceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Device string
    A device name from the provider configuration.
    DropGlean string
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    Forward string
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    InterfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    Unnumbered string
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    Urpf string
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    DropGlean string
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    Forward string
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    InterfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    Unnumbered string
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    Urpf string
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    Vrf string
    VRF name.
    device String
    A device name from the provider configuration.
    dropGlean String
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    forward String
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    interfaceId String
    Must match first field in the output of show intf brief. Example: eth1/1.
    unnumbered String
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    urpf String
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    vrf String
    VRF name.
    device string
    A device name from the provider configuration.
    dropGlean string
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    forward string
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    interfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    unnumbered string
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    urpf string
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    vrf string
    VRF name.
    device str
    A device name from the provider configuration.
    drop_glean str
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    forward str
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    interface_id str
    Must match first field in the output of show intf brief. Example: eth1/1.
    unnumbered str
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    urpf str
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    vrf str
    VRF name.
    device String
    A device name from the provider configuration.
    dropGlean String
    ip drop-glean enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    forward String
    ip forward enabled/disabled. - Choices: enabled, disabled - Default value: disabled
    interfaceId String
    Must match first field in the output of show intf brief. Example: eth1/1.
    unnumbered String
    IP unnumbered. Reference to interface must match first field in the output of show intf brief. Example: eth1/1. - Default value: unspecified
    urpf String
    URPF (unicast Reverse Path Forwarding). - Choices: disabled, strict, loose, loose-allow-default, strict-allow-vni-hosts - Default value: disabled
    vrf String
    VRF name.

    Import

     $ pulumi import nxos:index/ipv4Interface:Ipv4Interface example "sys/ipv4/inst/dom-[default]/if-[eth1/10]"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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