Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs
nxos.getIpv4StaticRoute
Explore with Pulumi AI
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 pulumi
import pulumi_nxos as nxos
example = nxos.get_ipv4_static_route(prefix="1.1.1.0/24",
vrf_name="default")
import * as pulumi from "@pulumi/pulumi";
import * as nxos from "@pulumi/nxos";
const example = nxos.getIpv4StaticRoute({
prefix: "1.1.1.0/24",
vrfName: "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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: nxos:index/getIpv4StaticRoute:getIpv4StaticRoute
arguments:
# arguments dictionary
The following arguments are supported:
getIpv4StaticRoute Result
The following output properties are available:
Supporting Types
GetIpv4StaticRouteNextHop
- Address string
- Nexthop address.
- Description string
- Description.
- Interface
Id string - Must match first field in the output of
show intf brief
orunspecified
. Example:eth1/1
orvlan100
. - Object int
- Object to be tracked.
- Preference int
- Route preference.
- Tag int
- Tag value.
- Vrf
Name string - Nexthop VRF.
- Address string
- Nexthop address.
- Description string
- Description.
- Interface
Id string - Must match first field in the output of
show intf brief
orunspecified
. Example:eth1/1
orvlan100
. - Object int
- Object to be tracked.
- Preference int
- Route preference.
- Tag int
- Tag value.
- Vrf
Name string - Nexthop VRF.
- address String
- Nexthop address.
- description String
- Description.
- interface
Id String - Must match first field in the output of
show intf brief
orunspecified
. Example:eth1/1
orvlan100
. - object Integer
- Object to be tracked.
- preference Integer
- Route preference.
- tag Integer
- Tag value.
- vrf
Name String - Nexthop VRF.
- address string
- Nexthop address.
- description string
- Description.
- interface
Id string - Must match first field in the output of
show intf brief
orunspecified
. Example:eth1/1
orvlan100
. - object number
- Object to be tracked.
- preference number
- Route preference.
- tag number
- Tag value.
- vrf
Name string - Nexthop VRF.
- address str
- Nexthop address.
- description str
- Description.
- interface_
id str - Must match first field in the output of
show intf brief
orunspecified
. Example:eth1/1
orvlan100
. - 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.
- interface
Id String - Must match first field in the output of
show intf brief
orunspecified
. Example:eth1/1
orvlan100
. - object Number
- Object to be tracked.
- preference Number
- Route preference.
- tag Number
- Tag value.
- vrf
Name String - Nexthop VRF.
Package Details
- Repository
- nxos lbrlabs/pulumi-nxos
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nxos
Terraform Provider.