Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs
nxos.getIpv4StaticRoute
This data source can read an IPv4 static route.
- API Documentation: ipv4Route
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nxos = Pulumi.Nxos;
return await Deployment.RunAsync(() => 
{
    var example = Nxos.GetIpv4StaticRoute.Invoke(new()
    {
        Prefix = "1.1.1.0/24",
        VrfName = "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.LookupIpv4StaticRoute(ctx, &nxos.LookupIpv4StaticRouteArgs{
			Prefix:  "1.1.1.0/24",
			VrfName: "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.GetIpv4StaticRouteArgs;
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.getIpv4StaticRoute(GetIpv4StaticRouteArgs.builder()
            .prefix("1.1.1.0/24")
            .vrfName("default")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as nxos from "@pulumi/nxos";
const example = nxos.getIpv4StaticRoute({
    prefix: "1.1.1.0/24",
    vrfName: "default",
});
import pulumi
import pulumi_nxos as nxos
example = nxos.get_ipv4_static_route(prefix="1.1.1.0/24",
    vrf_name="default")
variables:
  example:
    fn::invoke:
      Function: nxos:getIpv4StaticRoute
      Arguments:
        prefix: 1.1.1.0/24
        vrfName: default
Using getIpv4StaticRoute
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 getIpv4StaticRoute(args: GetIpv4StaticRouteArgs, opts?: InvokeOptions): Promise<GetIpv4StaticRouteResult>
function getIpv4StaticRouteOutput(args: GetIpv4StaticRouteOutputArgs, opts?: InvokeOptions): Output<GetIpv4StaticRouteResult>def get_ipv4_static_route(device: Optional[str] = None,
                          prefix: Optional[str] = None,
                          vrf_name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetIpv4StaticRouteResult
def get_ipv4_static_route_output(device: Optional[pulumi.Input[str]] = None,
                          prefix: Optional[pulumi.Input[str]] = None,
                          vrf_name: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetIpv4StaticRouteResult]func LookupIpv4StaticRoute(ctx *Context, args *LookupIpv4StaticRouteArgs, opts ...InvokeOption) (*LookupIpv4StaticRouteResult, error)
func LookupIpv4StaticRouteOutput(ctx *Context, args *LookupIpv4StaticRouteOutputArgs, opts ...InvokeOption) LookupIpv4StaticRouteResultOutput> Note: This function is named LookupIpv4StaticRoute in the Go SDK.
public static class GetIpv4StaticRoute 
{
    public static Task<GetIpv4StaticRouteResult> InvokeAsync(GetIpv4StaticRouteArgs args, InvokeOptions? opts = null)
    public static Output<GetIpv4StaticRouteResult> Invoke(GetIpv4StaticRouteInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIpv4StaticRouteResult> getIpv4StaticRoute(GetIpv4StaticRouteArgs args, InvokeOptions options)
public static Output<GetIpv4StaticRouteResult> getIpv4StaticRoute(GetIpv4StaticRouteArgs args, InvokeOptions options)
fn::invoke:
  function: nxos:index/getIpv4StaticRoute:getIpv4StaticRoute
  arguments:
    # arguments dictionaryThe following arguments are supported:
getIpv4StaticRoute Result
The following output properties are available:
Supporting Types
GetIpv4StaticRouteNextHop    
- Address string
- Nexthop address.
- Description string
- Description.
- InterfaceId string
- Must match first field in the output of show intf brieforunspecified. Example:eth1/1orvlan100.
- Object int
- Object to be tracked.
- Preference int
- Route preference.
- Tag int
- Tag value.
- VrfName string
- Nexthop VRF.
- Address string
- Nexthop address.
- Description string
- Description.
- InterfaceId string
- Must match first field in the output of show intf brieforunspecified. Example:eth1/1orvlan100.
- Object int
- Object to be tracked.
- Preference int
- Route preference.
- Tag int
- Tag value.
- VrfName string
- Nexthop VRF.
- address String
- Nexthop address.
- description String
- Description.
- interfaceId String
- Must match first field in the output of show intf brieforunspecified. Example:eth1/1orvlan100.
- object Integer
- Object to be tracked.
- preference Integer
- Route preference.
- tag Integer
- Tag value.
- vrfName String
- Nexthop VRF.
- address string
- Nexthop address.
- description string
- Description.
- interfaceId string
- Must match first field in the output of show intf brieforunspecified. Example:eth1/1orvlan100.
- object number
- Object to be tracked.
- preference number
- Route preference.
- tag number
- Tag value.
- vrfName string
- Nexthop VRF.
- address str
- Nexthop address.
- description str
- Description.
- interface_id str
- Must match first field in the output of show intf brieforunspecified. Example:eth1/1orvlan100.
- object int
- Object to be tracked.
- preference int
- Route preference.
- tag int
- Tag value.
- vrf_name str
- Nexthop VRF.
- address String
- Nexthop address.
- description String
- Description.
- interfaceId String
- Must match first field in the output of show intf brieforunspecified. Example:eth1/1orvlan100.
- object Number
- Object to be tracked.
- preference Number
- Route preference.
- tag Number
- Tag value.
- vrfName String
- Nexthop VRF.
Package Details
- Repository
- nxos lbrlabs/pulumi-nxos
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the nxosTerraform Provider.
