1. Packages
  2. Cisco IOS XE Resource Provider
  3. API Docs
  4. getStaticRoute
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

iosxe.getStaticRoute

Explore with Pulumi AI

Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

This data source can read the Static Route configuration.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Iosxe = Pulumi.Iosxe;

return await Deployment.RunAsync(() => 
{
    var example = Iosxe.GetStaticRoute.Invoke(new()
    {
        Mask = "255.255.255.255",
        Prefix = "5.5.5.5",
    });

});
Copy
package main

import (
	"github.com/lbrlabs/pulumi-iosxe/sdk/go/iosxe"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iosxe.LookupStaticRoute(ctx, &iosxe.LookupStaticRouteArgs{
			Mask:   "255.255.255.255",
			Prefix: "5.5.5.5",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.iosxe.IosxeFunctions;
import com.pulumi.iosxe.inputs.GetStaticRouteArgs;
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 = IosxeFunctions.getStaticRoute(GetStaticRouteArgs.builder()
            .mask("255.255.255.255")
            .prefix("5.5.5.5")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as iosxe from "@pulumi/iosxe";

const example = iosxe.getStaticRoute({
    mask: "255.255.255.255",
    prefix: "5.5.5.5",
});
Copy
import pulumi
import pulumi_iosxe as iosxe

example = iosxe.get_static_route(mask="255.255.255.255",
    prefix="5.5.5.5")
Copy
variables:
  example:
    fn::invoke:
      Function: iosxe:getStaticRoute
      Arguments:
        mask: 255.255.255.255
        prefix: 5.5.5.5
Copy

Using getStaticRoute

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 getStaticRoute(args: GetStaticRouteArgs, opts?: InvokeOptions): Promise<GetStaticRouteResult>
function getStaticRouteOutput(args: GetStaticRouteOutputArgs, opts?: InvokeOptions): Output<GetStaticRouteResult>
Copy
def get_static_route(device: Optional[str] = None,
                     mask: Optional[str] = None,
                     prefix: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetStaticRouteResult
def get_static_route_output(device: Optional[pulumi.Input[str]] = None,
                     mask: Optional[pulumi.Input[str]] = None,
                     prefix: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetStaticRouteResult]
Copy
func LookupStaticRoute(ctx *Context, args *LookupStaticRouteArgs, opts ...InvokeOption) (*LookupStaticRouteResult, error)
func LookupStaticRouteOutput(ctx *Context, args *LookupStaticRouteOutputArgs, opts ...InvokeOption) LookupStaticRouteResultOutput
Copy

> Note: This function is named LookupStaticRoute in the Go SDK.

public static class GetStaticRoute 
{
    public static Task<GetStaticRouteResult> InvokeAsync(GetStaticRouteArgs args, InvokeOptions? opts = null)
    public static Output<GetStaticRouteResult> Invoke(GetStaticRouteInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetStaticRouteResult> getStaticRoute(GetStaticRouteArgs args, InvokeOptions options)
public static Output<GetStaticRouteResult> getStaticRoute(GetStaticRouteArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: iosxe:index/getStaticRoute:getStaticRoute
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Mask This property is required. string
Prefix This property is required. string
Device string
A device name from the provider configuration.
Mask This property is required. string
Prefix This property is required. string
Device string
A device name from the provider configuration.
mask This property is required. String
prefix This property is required. String
device String
A device name from the provider configuration.
mask This property is required. string
prefix This property is required. string
device string
A device name from the provider configuration.
mask This property is required. str
prefix This property is required. str
device str
A device name from the provider configuration.
mask This property is required. String
prefix This property is required. String
device String
A device name from the provider configuration.

getStaticRoute Result

The following output properties are available:

Id string
The path of the retrieved object.
Mask string
NextHops List<Lbrlabs.PulumiPackage.Iosxe.Outputs.GetStaticRouteNextHop>
Prefix string
Device string
A device name from the provider configuration.
Id string
The path of the retrieved object.
Mask string
NextHops []GetStaticRouteNextHop
Prefix string
Device string
A device name from the provider configuration.
id String
The path of the retrieved object.
mask String
nextHops List<GetStaticRouteNextHop>
prefix String
device String
A device name from the provider configuration.
id string
The path of the retrieved object.
mask string
nextHops GetStaticRouteNextHop[]
prefix string
device string
A device name from the provider configuration.
id str
The path of the retrieved object.
mask str
next_hops Sequence[GetStaticRouteNextHop]
prefix str
device str
A device name from the provider configuration.
id String
The path of the retrieved object.
mask String
nextHops List<Property Map>
prefix String
device String
A device name from the provider configuration.

Supporting Types

GetStaticRouteNextHop

Global This property is required. bool
Next hop address is global
Metric This property is required. int
Name This property is required. string
Specify name of the next hop
NextHop This property is required. string
Permanent This property is required. bool
permanent route
Tag This property is required. int
Set tag for this route
Global This property is required. bool
Next hop address is global
Metric This property is required. int
Name This property is required. string
Specify name of the next hop
NextHop This property is required. string
Permanent This property is required. bool
permanent route
Tag This property is required. int
Set tag for this route
global This property is required. Boolean
Next hop address is global
metric This property is required. Integer
name This property is required. String
Specify name of the next hop
nextHop This property is required. String
permanent This property is required. Boolean
permanent route
tag This property is required. Integer
Set tag for this route
global This property is required. boolean
Next hop address is global
metric This property is required. number
name This property is required. string
Specify name of the next hop
nextHop This property is required. string
permanent This property is required. boolean
permanent route
tag This property is required. number
Set tag for this route
global_ This property is required. bool
Next hop address is global
metric This property is required. int
name This property is required. str
Specify name of the next hop
next_hop This property is required. str
permanent This property is required. bool
permanent route
tag This property is required. int
Set tag for this route
global This property is required. Boolean
Next hop address is global
metric This property is required. Number
name This property is required. String
Specify name of the next hop
nextHop This property is required. String
permanent This property is required. Boolean
permanent route
tag This property is required. Number
Set tag for this route

Package Details

Repository
iosxe lbrlabs/pulumi-iosxe
License
Apache-2.0
Notes
This Pulumi package is based on the iosxe Terraform Provider.
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs