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

nxos.Ipv4StaticRoute

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 static route.

    Example Usage

    Coming soon!

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nxos.Ipv4StaticRoute;
    import com.pulumi.nxos.Ipv4StaticRouteArgs;
    import com.pulumi.nxos.inputs.Ipv4StaticRouteNextHopArgs;
    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 Ipv4StaticRoute("example", Ipv4StaticRouteArgs.builder()        
                .nextHops(Ipv4StaticRouteNextHopArgs.builder()
                    .address("1.2.3.4")
                    .description("My Description")
                    .interface_id("unspecified")
                    .object(10)
                    .preference(123)
                    .tag(10)
                    .vrf_name("default")
                    .build())
                .prefix("1.1.1.0/24")
                .vrfName("default")
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      example:
        type: nxos:Ipv4StaticRoute
        properties:
          nextHops:
            - address: 1.2.3.4
              description: My Description
              interface_id: unspecified
              object: 10
              preference: 123
              tag: 10
              vrf_name: default
          prefix: 1.1.1.0/24
          vrfName: default
    

    Create Ipv4StaticRoute Resource

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

    Constructor syntax

    new Ipv4StaticRoute(name: string, args: Ipv4StaticRouteArgs, opts?: CustomResourceOptions);
    @overload
    def Ipv4StaticRoute(resource_name: str,
                        args: Ipv4StaticRouteArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def Ipv4StaticRoute(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        next_hops: Optional[Sequence[Ipv4StaticRouteNextHopArgs]] = None,
                        prefix: Optional[str] = None,
                        vrf_name: Optional[str] = None,
                        device: Optional[str] = None)
    func NewIpv4StaticRoute(ctx *Context, name string, args Ipv4StaticRouteArgs, opts ...ResourceOption) (*Ipv4StaticRoute, error)
    public Ipv4StaticRoute(string name, Ipv4StaticRouteArgs args, CustomResourceOptions? opts = null)
    public Ipv4StaticRoute(String name, Ipv4StaticRouteArgs args)
    public Ipv4StaticRoute(String name, Ipv4StaticRouteArgs args, CustomResourceOptions options)
    
    type: nxos:Ipv4StaticRoute
    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 Ipv4StaticRouteArgs
    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 Ipv4StaticRouteArgs
    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 Ipv4StaticRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Ipv4StaticRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Ipv4StaticRouteArgs
    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 ipv4StaticRouteResource = new Nxos.Ipv4StaticRoute("ipv4StaticRouteResource", new()
    {
        NextHops = new[]
        {
            new Nxos.Inputs.Ipv4StaticRouteNextHopArgs
            {
                Address = "string",
                InterfaceId = "string",
                VrfName = "string",
                Description = "string",
                Object = 0,
                Preference = 0,
                Tag = 0,
            },
        },
        Prefix = "string",
        VrfName = "string",
        Device = "string",
    });
    
    example, err := nxos.NewIpv4StaticRoute(ctx, "ipv4StaticRouteResource", &nxos.Ipv4StaticRouteArgs{
    	NextHops: nxos.Ipv4StaticRouteNextHopArray{
    		&nxos.Ipv4StaticRouteNextHopArgs{
    			Address:     pulumi.String("string"),
    			InterfaceId: pulumi.String("string"),
    			VrfName:     pulumi.String("string"),
    			Description: pulumi.String("string"),
    			Object:      pulumi.Int(0),
    			Preference:  pulumi.Int(0),
    			Tag:         pulumi.Int(0),
    		},
    	},
    	Prefix:  pulumi.String("string"),
    	VrfName: pulumi.String("string"),
    	Device:  pulumi.String("string"),
    })
    
    var ipv4StaticRouteResource = new Ipv4StaticRoute("ipv4StaticRouteResource", Ipv4StaticRouteArgs.builder()
        .nextHops(Ipv4StaticRouteNextHopArgs.builder()
            .address("string")
            .interfaceId("string")
            .vrfName("string")
            .description("string")
            .object(0)
            .preference(0)
            .tag(0)
            .build())
        .prefix("string")
        .vrfName("string")
        .device("string")
        .build());
    
    ipv4_static_route_resource = nxos.Ipv4StaticRoute("ipv4StaticRouteResource",
        next_hops=[{
            "address": "string",
            "interface_id": "string",
            "vrf_name": "string",
            "description": "string",
            "object": 0,
            "preference": 0,
            "tag": 0,
        }],
        prefix="string",
        vrf_name="string",
        device="string")
    
    const ipv4StaticRouteResource = new nxos.Ipv4StaticRoute("ipv4StaticRouteResource", {
        nextHops: [{
            address: "string",
            interfaceId: "string",
            vrfName: "string",
            description: "string",
            object: 0,
            preference: 0,
            tag: 0,
        }],
        prefix: "string",
        vrfName: "string",
        device: "string",
    });
    
    type: nxos:Ipv4StaticRoute
    properties:
        device: string
        nextHops:
            - address: string
              description: string
              interfaceId: string
              object: 0
              preference: 0
              tag: 0
              vrfName: string
        prefix: string
        vrfName: string
    

    Ipv4StaticRoute Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Ipv4StaticRoute resource accepts the following input properties:

    NextHops List<Lbrlabs.PulumiPackage.Nxos.Inputs.Ipv4StaticRouteNextHop>
    List of next hops.
    Prefix string
    Prefix.
    VrfName string
    VRF name.
    Device string
    A device name from the provider configuration.
    NextHops []Ipv4StaticRouteNextHopArgs
    List of next hops.
    Prefix string
    Prefix.
    VrfName string
    VRF name.
    Device string
    A device name from the provider configuration.
    nextHops List<Ipv4StaticRouteNextHop>
    List of next hops.
    prefix String
    Prefix.
    vrfName String
    VRF name.
    device String
    A device name from the provider configuration.
    nextHops Ipv4StaticRouteNextHop[]
    List of next hops.
    prefix string
    Prefix.
    vrfName string
    VRF name.
    device string
    A device name from the provider configuration.
    next_hops Sequence[Ipv4StaticRouteNextHopArgs]
    List of next hops.
    prefix str
    Prefix.
    vrf_name str
    VRF name.
    device str
    A device name from the provider configuration.
    nextHops List<Property Map>
    List of next hops.
    prefix String
    Prefix.
    vrfName String
    VRF name.
    device String
    A device name from the provider configuration.

    Outputs

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

    Get an existing Ipv4StaticRoute 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?: Ipv4StaticRouteState, opts?: CustomResourceOptions): Ipv4StaticRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device: Optional[str] = None,
            next_hops: Optional[Sequence[Ipv4StaticRouteNextHopArgs]] = None,
            prefix: Optional[str] = None,
            vrf_name: Optional[str] = None) -> Ipv4StaticRoute
    func GetIpv4StaticRoute(ctx *Context, name string, id IDInput, state *Ipv4StaticRouteState, opts ...ResourceOption) (*Ipv4StaticRoute, error)
    public static Ipv4StaticRoute Get(string name, Input<string> id, Ipv4StaticRouteState? state, CustomResourceOptions? opts = null)
    public static Ipv4StaticRoute get(String name, Output<String> id, Ipv4StaticRouteState 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.
    NextHops List<Lbrlabs.PulumiPackage.Nxos.Inputs.Ipv4StaticRouteNextHop>
    List of next hops.
    Prefix string
    Prefix.
    VrfName string
    VRF name.
    Device string
    A device name from the provider configuration.
    NextHops []Ipv4StaticRouteNextHopArgs
    List of next hops.
    Prefix string
    Prefix.
    VrfName string
    VRF name.
    device String
    A device name from the provider configuration.
    nextHops List<Ipv4StaticRouteNextHop>
    List of next hops.
    prefix String
    Prefix.
    vrfName String
    VRF name.
    device string
    A device name from the provider configuration.
    nextHops Ipv4StaticRouteNextHop[]
    List of next hops.
    prefix string
    Prefix.
    vrfName string
    VRF name.
    device str
    A device name from the provider configuration.
    next_hops Sequence[Ipv4StaticRouteNextHopArgs]
    List of next hops.
    prefix str
    Prefix.
    vrf_name str
    VRF name.
    device String
    A device name from the provider configuration.
    nextHops List<Property Map>
    List of next hops.
    prefix String
    Prefix.
    vrfName String
    VRF name.

    Supporting Types

    Ipv4StaticRouteNextHop, Ipv4StaticRouteNextHopArgs

    Address string
    InterfaceId string
    VrfName string
    Description string
    Object int
    Preference int
    Tag int
    Address string
    InterfaceId string
    VrfName string
    Description string
    Object int
    Preference int
    Tag int
    address String
    interfaceId String
    vrfName String
    description String
    object Integer
    preference Integer
    tag Integer
    address string
    interfaceId string
    vrfName string
    description string
    object number
    preference number
    tag number
    address String
    interfaceId String
    vrfName String
    description String
    object Number
    preference Number
    tag Number

    Import

     $ pulumi import nxos:index/ipv4StaticRoute:Ipv4StaticRoute example "sys/ipv4/inst/dom-[default]/rt-[1.1.1.0/24]"
    

    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