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

iosxe.StaticRoute

Explore with Pulumi AI

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

    This resource can manage the Static Route 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.StaticRoute;
    import com.pulumi.iosxe.StaticRouteArgs;
    import com.pulumi.iosxe.inputs.StaticRouteNextHopArgs;
    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 StaticRoute("example", StaticRouteArgs.builder()        
                .mask("255.255.255.255")
                .nextHops(StaticRouteNextHopArgs.builder()
                    .global(false)
                    .metric(10)
                    .name("Route1")
                    .next_hop("6.6.6.6")
                    .permanent(true)
                    .tag(100)
                    .build())
                .prefix("5.5.5.5")
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      example:
        type: iosxe:StaticRoute
        properties:
          mask: 255.255.255.255
          nextHops:
            - global: false
              metric: 10
              name: Route1
              next_hop: 6.6.6.6
              permanent: true
              tag: 100
          prefix: 5.5.5.5
    

    Create StaticRoute Resource

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

    Constructor syntax

    new StaticRoute(name: string, args: StaticRouteArgs, opts?: CustomResourceOptions);
    @overload
    def StaticRoute(resource_name: str,
                    args: StaticRouteArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def StaticRoute(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    mask: Optional[str] = None,
                    prefix: Optional[str] = None,
                    device: Optional[str] = None,
                    next_hops: Optional[Sequence[StaticRouteNextHopArgs]] = None)
    func NewStaticRoute(ctx *Context, name string, args StaticRouteArgs, opts ...ResourceOption) (*StaticRoute, error)
    public StaticRoute(string name, StaticRouteArgs args, CustomResourceOptions? opts = null)
    public StaticRoute(String name, StaticRouteArgs args)
    public StaticRoute(String name, StaticRouteArgs args, CustomResourceOptions options)
    
    type: iosxe:StaticRoute
    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 StaticRouteArgs
    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 StaticRouteArgs
    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 StaticRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StaticRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StaticRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var staticRouteResource = new Iosxe.StaticRoute("staticRouteResource", new()
    {
        Mask = "string",
        Prefix = "string",
        Device = "string",
        NextHops = new[]
        {
            new Iosxe.Inputs.StaticRouteNextHopArgs
            {
                NextHop = "string",
                Global = false,
                Metric = 0,
                Name = "string",
                Permanent = false,
                Tag = 0,
            },
        },
    });
    
    example, err := iosxe.NewStaticRoute(ctx, "staticRouteResource", &iosxe.StaticRouteArgs{
    	Mask:   pulumi.String("string"),
    	Prefix: pulumi.String("string"),
    	Device: pulumi.String("string"),
    	NextHops: iosxe.StaticRouteNextHopArray{
    		&iosxe.StaticRouteNextHopArgs{
    			NextHop:   pulumi.String("string"),
    			Global:    pulumi.Bool(false),
    			Metric:    pulumi.Int(0),
    			Name:      pulumi.String("string"),
    			Permanent: pulumi.Bool(false),
    			Tag:       pulumi.Int(0),
    		},
    	},
    })
    
    var staticRouteResource = new StaticRoute("staticRouteResource", StaticRouteArgs.builder()
        .mask("string")
        .prefix("string")
        .device("string")
        .nextHops(StaticRouteNextHopArgs.builder()
            .nextHop("string")
            .global(false)
            .metric(0)
            .name("string")
            .permanent(false)
            .tag(0)
            .build())
        .build());
    
    static_route_resource = iosxe.StaticRoute("staticRouteResource",
        mask="string",
        prefix="string",
        device="string",
        next_hops=[iosxe.StaticRouteNextHopArgs(
            next_hop="string",
            global_=False,
            metric=0,
            name="string",
            permanent=False,
            tag=0,
        )])
    
    const staticRouteResource = new iosxe.StaticRoute("staticRouteResource", {
        mask: "string",
        prefix: "string",
        device: "string",
        nextHops: [{
            nextHop: "string",
            global: false,
            metric: 0,
            name: "string",
            permanent: false,
            tag: 0,
        }],
    });
    
    type: iosxe:StaticRoute
    properties:
        device: string
        mask: string
        nextHops:
            - global: false
              metric: 0
              name: string
              nextHop: string
              permanent: false
              tag: 0
        prefix: string
    

    StaticRoute Resource Properties

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

    Inputs

    The StaticRoute resource accepts the following input properties:

    Mask string
    Prefix string
    Device string
    A device name from the provider configuration.
    NextHops List<Lbrlabs.PulumiPackage.Iosxe.Inputs.StaticRouteNextHop>
    Mask string
    Prefix string
    Device string
    A device name from the provider configuration.
    NextHops []StaticRouteNextHopArgs
    mask String
    prefix String
    device String
    A device name from the provider configuration.
    nextHops List<StaticRouteNextHop>
    mask string
    prefix string
    device string
    A device name from the provider configuration.
    nextHops StaticRouteNextHop[]
    mask str
    prefix str
    device str
    A device name from the provider configuration.
    next_hops Sequence[StaticRouteNextHopArgs]
    mask String
    prefix String
    device String
    A device name from the provider configuration.
    nextHops List<Property Map>

    Outputs

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

    Get an existing StaticRoute 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?: StaticRouteState, opts?: CustomResourceOptions): StaticRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device: Optional[str] = None,
            mask: Optional[str] = None,
            next_hops: Optional[Sequence[StaticRouteNextHopArgs]] = None,
            prefix: Optional[str] = None) -> StaticRoute
    func GetStaticRoute(ctx *Context, name string, id IDInput, state *StaticRouteState, opts ...ResourceOption) (*StaticRoute, error)
    public static StaticRoute Get(string name, Input<string> id, StaticRouteState? state, CustomResourceOptions? opts = null)
    public static StaticRoute get(String name, Output<String> id, StaticRouteState 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.
    Mask string
    NextHops List<Lbrlabs.PulumiPackage.Iosxe.Inputs.StaticRouteNextHop>
    Prefix string
    Device string
    A device name from the provider configuration.
    Mask string
    NextHops []StaticRouteNextHopArgs
    Prefix string
    device String
    A device name from the provider configuration.
    mask String
    nextHops List<StaticRouteNextHop>
    prefix String
    device string
    A device name from the provider configuration.
    mask string
    nextHops StaticRouteNextHop[]
    prefix string
    device str
    A device name from the provider configuration.
    mask str
    next_hops Sequence[StaticRouteNextHopArgs]
    prefix str
    device String
    A device name from the provider configuration.
    mask String
    nextHops List<Property Map>
    prefix String

    Supporting Types

    StaticRouteNextHop, StaticRouteNextHopArgs

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

    Import

     $ pulumi import iosxe:index/staticRoute:StaticRoute example "Cisco-IOS-XE-native:native/ip/route/ip-route-interface-forwarding-list=5.5.5.5,255.255.255.255"
    

    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.
    iosxe logo
    Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs