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

nxos.Ipv4InterfaceAddress

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 address.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nxos = Lbrlabs.PulumiPackage.Nxos;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Nxos.Ipv4InterfaceAddress("example", new()
        {
            Address = "24.63.46.49/30",
            InterfaceId = "eth1/10",
            Type = "primary",
            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.NewIpv4InterfaceAddress(ctx, "example", &nxos.Ipv4InterfaceAddressArgs{
    			Address:     pulumi.String("24.63.46.49/30"),
    			InterfaceId: pulumi.String("eth1/10"),
    			Type:        pulumi.String("primary"),
    			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.Ipv4InterfaceAddress;
    import com.pulumi.nxos.Ipv4InterfaceAddressArgs;
    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 Ipv4InterfaceAddress("example", Ipv4InterfaceAddressArgs.builder()        
                .address("24.63.46.49/30")
                .interfaceId("eth1/10")
                .type("primary")
                .vrf("default")
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_nxos as nxos
    
    example = nxos.Ipv4InterfaceAddress("example",
        address="24.63.46.49/30",
        interface_id="eth1/10",
        type="primary",
        vrf="default")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@lbrlabs/pulumi-nxos";
    
    const example = new nxos.Ipv4InterfaceAddress("example", {
        address: "24.63.46.49/30",
        interfaceId: "eth1/10",
        type: "primary",
        vrf: "default",
    });
    
    resources:
      example:
        type: nxos:Ipv4InterfaceAddress
        properties:
          address: 24.63.46.49/30
          interfaceId: eth1/10
          type: primary
          vrf: default
    

    Create Ipv4InterfaceAddress Resource

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

    Constructor syntax

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

    Constructor example

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

    var ipv4InterfaceAddressResource = new Nxos.Ipv4InterfaceAddress("ipv4InterfaceAddressResource", new()
    {
        Address = "string",
        InterfaceId = "string",
        Vrf = "string",
        Device = "string",
        Type = "string",
    });
    
    example, err := nxos.NewIpv4InterfaceAddress(ctx, "ipv4InterfaceAddressResource", &nxos.Ipv4InterfaceAddressArgs{
    	Address:     pulumi.String("string"),
    	InterfaceId: pulumi.String("string"),
    	Vrf:         pulumi.String("string"),
    	Device:      pulumi.String("string"),
    	Type:        pulumi.String("string"),
    })
    
    var ipv4InterfaceAddressResource = new Ipv4InterfaceAddress("ipv4InterfaceAddressResource", Ipv4InterfaceAddressArgs.builder()
        .address("string")
        .interfaceId("string")
        .vrf("string")
        .device("string")
        .type("string")
        .build());
    
    ipv4_interface_address_resource = nxos.Ipv4InterfaceAddress("ipv4InterfaceAddressResource",
        address="string",
        interface_id="string",
        vrf="string",
        device="string",
        type="string")
    
    const ipv4InterfaceAddressResource = new nxos.Ipv4InterfaceAddress("ipv4InterfaceAddressResource", {
        address: "string",
        interfaceId: "string",
        vrf: "string",
        device: "string",
        type: "string",
    });
    
    type: nxos:Ipv4InterfaceAddress
    properties:
        address: string
        device: string
        interfaceId: string
        type: string
        vrf: string
    

    Ipv4InterfaceAddress 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 Ipv4InterfaceAddress resource accepts the following input properties:

    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.
    Type string
    Address type. - Choices: primary, secondary - Default value: primary
    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.
    Type string
    Address type. - Choices: primary, secondary - Default value: primary
    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.
    type String
    Address type. - Choices: primary, secondary - Default value: primary
    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.
    type string
    Address type. - Choices: primary, secondary - Default value: primary
    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.
    type str
    Address type. - Choices: primary, secondary - Default value: primary
    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.
    type String
    Address type. - Choices: primary, secondary - Default value: primary

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Ipv4InterfaceAddress 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 Ipv4InterfaceAddress Resource

    Get an existing Ipv4InterfaceAddress 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?: Ipv4InterfaceAddressState, opts?: CustomResourceOptions): Ipv4InterfaceAddress
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address: Optional[str] = None,
            device: Optional[str] = None,
            interface_id: Optional[str] = None,
            type: Optional[str] = None,
            vrf: Optional[str] = None) -> Ipv4InterfaceAddress
    func GetIpv4InterfaceAddress(ctx *Context, name string, id IDInput, state *Ipv4InterfaceAddressState, opts ...ResourceOption) (*Ipv4InterfaceAddress, error)
    public static Ipv4InterfaceAddress Get(string name, Input<string> id, Ipv4InterfaceAddressState? state, CustomResourceOptions? opts = null)
    public static Ipv4InterfaceAddress get(String name, Output<String> id, Ipv4InterfaceAddressState 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:
    Address string
    IPv4 address.
    Device string
    A device name from the provider configuration.
    InterfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    Type string
    Address type. - Choices: primary, secondary - Default value: primary
    Vrf string
    VRF name.
    Address string
    IPv4 address.
    Device string
    A device name from the provider configuration.
    InterfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    Type string
    Address type. - Choices: primary, secondary - Default value: primary
    Vrf string
    VRF name.
    address String
    IPv4 address.
    device String
    A device name from the provider configuration.
    interfaceId String
    Must match first field in the output of show intf brief. Example: eth1/1.
    type String
    Address type. - Choices: primary, secondary - Default value: primary
    vrf String
    VRF name.
    address string
    IPv4 address.
    device string
    A device name from the provider configuration.
    interfaceId string
    Must match first field in the output of show intf brief. Example: eth1/1.
    type string
    Address type. - Choices: primary, secondary - Default value: primary
    vrf string
    VRF name.
    address str
    IPv4 address.
    device str
    A device name from the provider configuration.
    interface_id str
    Must match first field in the output of show intf brief. Example: eth1/1.
    type str
    Address type. - Choices: primary, secondary - Default value: primary
    vrf str
    VRF name.
    address String
    IPv4 address.
    device String
    A device name from the provider configuration.
    interfaceId String
    Must match first field in the output of show intf brief. Example: eth1/1.
    type String
    Address type. - Choices: primary, secondary - Default value: primary
    vrf String
    VRF name.

    Import

     $ pulumi import nxos:index/ipv4InterfaceAddress:Ipv4InterfaceAddress example "sys/ipv4/inst/dom-[default]/if-[eth1/10]/addr-[24.63.46.49/30]"
    

    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