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

iosxe.StaticRouteVrf

Explore with Pulumi AI

This resource can manage the Static Route VRF configuration.

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.iosxe.StaticRouteVrf;
import com.pulumi.iosxe.StaticRouteVrfArgs;
import com.pulumi.iosxe.inputs.StaticRouteVrfRouteArgs;
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 StaticRouteVrf("example", StaticRouteVrfArgs.builder()        
            .routes(StaticRouteVrfRouteArgs.builder()
                .mask("255.255.255.255")
                .next_hops(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .prefix("6.6.6.6")
                .build())
            .vrf("VRF1")
            .build());

    }
}
Copy

Coming soon!

Coming soon!

resources:
  example:
    type: iosxe:StaticRouteVrf
    properties:
      routes:
        - mask: 255.255.255.255
          next_hops:
            - global: false
              metric: 10
              name: Route1
              nextHop: 7.7.7.7
              permanent: true
              tag: 100
          prefix: 6.6.6.6
      vrf: VRF1
Copy

Create StaticRouteVrf Resource

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

Constructor syntax

new StaticRouteVrf(name: string, args: StaticRouteVrfArgs, opts?: CustomResourceOptions);
@overload
def StaticRouteVrf(resource_name: str,
                   args: StaticRouteVrfArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def StaticRouteVrf(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   vrf: Optional[str] = None,
                   device: Optional[str] = None,
                   routes: Optional[Sequence[StaticRouteVrfRouteArgs]] = None)
func NewStaticRouteVrf(ctx *Context, name string, args StaticRouteVrfArgs, opts ...ResourceOption) (*StaticRouteVrf, error)
public StaticRouteVrf(string name, StaticRouteVrfArgs args, CustomResourceOptions? opts = null)
public StaticRouteVrf(String name, StaticRouteVrfArgs args)
public StaticRouteVrf(String name, StaticRouteVrfArgs args, CustomResourceOptions options)
type: iosxe:StaticRouteVrf
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. StaticRouteVrfArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. StaticRouteVrfArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. StaticRouteVrfArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. StaticRouteVrfArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. StaticRouteVrfArgs
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 staticRouteVrfResource = new Iosxe.StaticRouteVrf("staticRouteVrfResource", new()
{
    Vrf = "string",
    Device = "string",
    Routes = new[]
    {
        new Iosxe.Inputs.StaticRouteVrfRouteArgs
        {
            Mask = "string",
            Prefix = "string",
            NextHops = new[]
            {
                new Iosxe.Inputs.StaticRouteVrfRouteNextHopArgs
                {
                    NextHop = "string",
                    Global = false,
                    Metric = 0,
                    Name = "string",
                    Permanent = false,
                    Tag = 0,
                },
            },
        },
    },
});
Copy
example, err := iosxe.NewStaticRouteVrf(ctx, "staticRouteVrfResource", &iosxe.StaticRouteVrfArgs{
	Vrf:    pulumi.String("string"),
	Device: pulumi.String("string"),
	Routes: iosxe.StaticRouteVrfRouteArray{
		&iosxe.StaticRouteVrfRouteArgs{
			Mask:   pulumi.String("string"),
			Prefix: pulumi.String("string"),
			NextHops: iosxe.StaticRouteVrfRouteNextHopArray{
				&iosxe.StaticRouteVrfRouteNextHopArgs{
					NextHop:   pulumi.String("string"),
					Global:    pulumi.Bool(false),
					Metric:    pulumi.Int(0),
					Name:      pulumi.String("string"),
					Permanent: pulumi.Bool(false),
					Tag:       pulumi.Int(0),
				},
			},
		},
	},
})
Copy
var staticRouteVrfResource = new StaticRouteVrf("staticRouteVrfResource", StaticRouteVrfArgs.builder()
    .vrf("string")
    .device("string")
    .routes(StaticRouteVrfRouteArgs.builder()
        .mask("string")
        .prefix("string")
        .nextHops(StaticRouteVrfRouteNextHopArgs.builder()
            .nextHop("string")
            .global(false)
            .metric(0)
            .name("string")
            .permanent(false)
            .tag(0)
            .build())
        .build())
    .build());
Copy
static_route_vrf_resource = iosxe.StaticRouteVrf("staticRouteVrfResource",
    vrf="string",
    device="string",
    routes=[{
        "mask": "string",
        "prefix": "string",
        "next_hops": [{
            "next_hop": "string",
            "global_": False,
            "metric": 0,
            "name": "string",
            "permanent": False,
            "tag": 0,
        }],
    }])
Copy
const staticRouteVrfResource = new iosxe.StaticRouteVrf("staticRouteVrfResource", {
    vrf: "string",
    device: "string",
    routes: [{
        mask: "string",
        prefix: "string",
        nextHops: [{
            nextHop: "string",
            global: false,
            metric: 0,
            name: "string",
            permanent: false,
            tag: 0,
        }],
    }],
});
Copy
type: iosxe:StaticRouteVrf
properties:
    device: string
    routes:
        - mask: string
          nextHops:
            - global: false
              metric: 0
              name: string
              nextHop: string
              permanent: false
              tag: 0
          prefix: string
    vrf: string
Copy

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

Vrf This property is required. string
Device string
A device name from the provider configuration.
Routes List<Lbrlabs.PulumiPackage.Iosxe.Inputs.StaticRouteVrfRoute>
Vrf This property is required. string
Device string
A device name from the provider configuration.
Routes []StaticRouteVrfRouteArgs
vrf This property is required. String
device String
A device name from the provider configuration.
routes List<StaticRouteVrfRoute>
vrf This property is required. string
device string
A device name from the provider configuration.
routes StaticRouteVrfRoute[]
vrf This property is required. str
device str
A device name from the provider configuration.
routes Sequence[StaticRouteVrfRouteArgs]
vrf This property is required. String
device String
A device name from the provider configuration.
routes List<Property Map>

Outputs

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

Get an existing StaticRouteVrf 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?: StaticRouteVrfState, opts?: CustomResourceOptions): StaticRouteVrf
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        device: Optional[str] = None,
        routes: Optional[Sequence[StaticRouteVrfRouteArgs]] = None,
        vrf: Optional[str] = None) -> StaticRouteVrf
func GetStaticRouteVrf(ctx *Context, name string, id IDInput, state *StaticRouteVrfState, opts ...ResourceOption) (*StaticRouteVrf, error)
public static StaticRouteVrf Get(string name, Input<string> id, StaticRouteVrfState? state, CustomResourceOptions? opts = null)
public static StaticRouteVrf get(String name, Output<String> id, StaticRouteVrfState state, CustomResourceOptions options)
resources:  _:    type: iosxe:StaticRouteVrf    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
Routes List<Lbrlabs.PulumiPackage.Iosxe.Inputs.StaticRouteVrfRoute>
Vrf string
Device string
A device name from the provider configuration.
Routes []StaticRouteVrfRouteArgs
Vrf string
device String
A device name from the provider configuration.
routes List<StaticRouteVrfRoute>
vrf String
device string
A device name from the provider configuration.
routes StaticRouteVrfRoute[]
vrf string
device str
A device name from the provider configuration.
routes Sequence[StaticRouteVrfRouteArgs]
vrf str
device String
A device name from the provider configuration.
routes List<Property Map>
vrf String

Supporting Types

StaticRouteVrfRoute
, StaticRouteVrfRouteArgs

Mask This property is required. string
Prefix This property is required. string
NextHops List<Lbrlabs.PulumiPackage.Iosxe.Inputs.StaticRouteVrfRouteNextHop>
Mask This property is required. string
Prefix This property is required. string
NextHops []StaticRouteVrfRouteNextHop
mask This property is required. String
prefix This property is required. String
nextHops List<StaticRouteVrfRouteNextHop>
mask This property is required. string
prefix This property is required. string
nextHops StaticRouteVrfRouteNextHop[]
mask This property is required. str
prefix This property is required. str
next_hops Sequence[StaticRouteVrfRouteNextHop]
mask This property is required. String
prefix This property is required. String
nextHops List<Property Map>

StaticRouteVrfRouteNextHop
, StaticRouteVrfRouteNextHopArgs

NextHop This property is required. string
Global bool
Metric int
Name string
Permanent bool
Tag int
NextHop This property is required. string
Global bool
Metric int
Name string
Permanent bool
Tag int
nextHop This property is required. String
global Boolean
metric Integer
name String
permanent Boolean
tag Integer
nextHop This property is required. string
global boolean
metric number
name string
permanent boolean
tag number
next_hop This property is required. str
global_ bool
metric int
name str
permanent bool
tag int
nextHop This property is required. String
global Boolean
metric Number
name String
permanent Boolean
tag Number

Import

 $ pulumi import iosxe:index/staticRouteVrf:StaticRouteVrf example "Cisco-IOS-XE-native:native/ip/route/vrf=VRF1"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
iosxe lbrlabs/pulumi-iosxe
License
Apache-2.0
Notes
This Pulumi package is based on the iosxe Terraform Provider.