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

iosxe.PrefixList

Explore with Pulumi AI

This resource can manage the Prefix List configuration.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var example = new Iosxe.PrefixList("example", new()
    {
        Prefixes = new[]
        {
            new Iosxe.Inputs.PrefixListPrefixArgs
            {
                Action = "permit",
                Ge = 24,
                Ip = "10.0.0.0/8",
                Le = 32,
                Name = "PREFIX_LIST_1",
                Seq = 10,
            },
        },
    });

});
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.NewPrefixList(ctx, "example", &iosxe.PrefixListArgs{
			Prefixes: iosxe.PrefixListPrefixArray{
				&iosxe.PrefixListPrefixArgs{
					Action: pulumi.String("permit"),
					Ge:     pulumi.Int(24),
					Ip:     pulumi.String("10.0.0.0/8"),
					Le:     pulumi.Int(32),
					Name:   pulumi.String("PREFIX_LIST_1"),
					Seq:    pulumi.Int(10),
				},
			},
		})
		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.PrefixList;
import com.pulumi.iosxe.PrefixListArgs;
import com.pulumi.iosxe.inputs.PrefixListPrefixArgs;
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 PrefixList("example", PrefixListArgs.builder()        
            .prefixes(PrefixListPrefixArgs.builder()
                .action("permit")
                .ge(24)
                .ip("10.0.0.0/8")
                .le(32)
                .name("PREFIX_LIST_1")
                .seq(10)
                .build())
            .build());

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

const example = new iosxe.PrefixList("example", {prefixes: [{
    action: "permit",
    ge: 24,
    ip: "10.0.0.0/8",
    le: 32,
    name: "PREFIX_LIST_1",
    seq: 10,
}]});
Copy
import pulumi
import lbrlabs_pulumi_iosxe as iosxe

example = iosxe.PrefixList("example", prefixes=[iosxe.PrefixListPrefixArgs(
    action="permit",
    ge=24,
    ip="10.0.0.0/8",
    le=32,
    name="PREFIX_LIST_1",
    seq=10,
)])
Copy
resources:
  example:
    type: iosxe:PrefixList
    properties:
      prefixes:
        - action: permit
          ge: 24
          ip: 10.0.0.0/8
          le: 32
          name: PREFIX_LIST_1
          seq: 10
Copy

Create PrefixList Resource

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

Constructor syntax

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

@overload
def PrefixList(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               device: Optional[str] = None,
               prefixes: Optional[Sequence[PrefixListPrefixArgs]] = None)
func NewPrefixList(ctx *Context, name string, args *PrefixListArgs, opts ...ResourceOption) (*PrefixList, error)
public PrefixList(string name, PrefixListArgs? args = null, CustomResourceOptions? opts = null)
public PrefixList(String name, PrefixListArgs args)
public PrefixList(String name, PrefixListArgs args, CustomResourceOptions options)
type: iosxe:PrefixList
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 PrefixListArgs
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 PrefixListArgs
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 PrefixListArgs
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 PrefixListArgs
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. PrefixListArgs
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 prefixListResource = new Iosxe.PrefixList("prefixListResource", new()
{
    Device = "string",
    Prefixes = new[]
    {
        new Iosxe.Inputs.PrefixListPrefixArgs
        {
            Name = "string",
            Seq = 0,
            Action = "string",
            Ge = 0,
            Ip = "string",
            Le = 0,
        },
    },
});
Copy
example, err := iosxe.NewPrefixList(ctx, "prefixListResource", &iosxe.PrefixListArgs{
	Device: pulumi.String("string"),
	Prefixes: iosxe.PrefixListPrefixArray{
		&iosxe.PrefixListPrefixArgs{
			Name:   pulumi.String("string"),
			Seq:    pulumi.Int(0),
			Action: pulumi.String("string"),
			Ge:     pulumi.Int(0),
			Ip:     pulumi.String("string"),
			Le:     pulumi.Int(0),
		},
	},
})
Copy
var prefixListResource = new PrefixList("prefixListResource", PrefixListArgs.builder()
    .device("string")
    .prefixes(PrefixListPrefixArgs.builder()
        .name("string")
        .seq(0)
        .action("string")
        .ge(0)
        .ip("string")
        .le(0)
        .build())
    .build());
Copy
prefix_list_resource = iosxe.PrefixList("prefixListResource",
    device="string",
    prefixes=[{
        "name": "string",
        "seq": 0,
        "action": "string",
        "ge": 0,
        "ip": "string",
        "le": 0,
    }])
Copy
const prefixListResource = new iosxe.PrefixList("prefixListResource", {
    device: "string",
    prefixes: [{
        name: "string",
        seq: 0,
        action: "string",
        ge: 0,
        ip: "string",
        le: 0,
    }],
});
Copy
type: iosxe:PrefixList
properties:
    device: string
    prefixes:
        - action: string
          ge: 0
          ip: string
          le: 0
          name: string
          seq: 0
Copy

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

Device string
A device name from the provider configuration.
Prefixes List<Lbrlabs.PulumiPackage.Iosxe.Inputs.PrefixListPrefix>
Build prefix-lists with name ans seq.no
Device string
A device name from the provider configuration.
Prefixes []PrefixListPrefixArgs
Build prefix-lists with name ans seq.no
device String
A device name from the provider configuration.
prefixes List<PrefixListPrefix>
Build prefix-lists with name ans seq.no
device string
A device name from the provider configuration.
prefixes PrefixListPrefix[]
Build prefix-lists with name ans seq.no
device str
A device name from the provider configuration.
prefixes Sequence[PrefixListPrefixArgs]
Build prefix-lists with name ans seq.no
device String
A device name from the provider configuration.
prefixes List<Property Map>
Build prefix-lists with name ans seq.no

Outputs

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

Get an existing PrefixList 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?: PrefixListState, opts?: CustomResourceOptions): PrefixList
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        device: Optional[str] = None,
        prefixes: Optional[Sequence[PrefixListPrefixArgs]] = None) -> PrefixList
func GetPrefixList(ctx *Context, name string, id IDInput, state *PrefixListState, opts ...ResourceOption) (*PrefixList, error)
public static PrefixList Get(string name, Input<string> id, PrefixListState? state, CustomResourceOptions? opts = null)
public static PrefixList get(String name, Output<String> id, PrefixListState state, CustomResourceOptions options)
resources:  _:    type: iosxe:PrefixList    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.
Prefixes List<Lbrlabs.PulumiPackage.Iosxe.Inputs.PrefixListPrefix>
Build prefix-lists with name ans seq.no
Device string
A device name from the provider configuration.
Prefixes []PrefixListPrefixArgs
Build prefix-lists with name ans seq.no
device String
A device name from the provider configuration.
prefixes List<PrefixListPrefix>
Build prefix-lists with name ans seq.no
device string
A device name from the provider configuration.
prefixes PrefixListPrefix[]
Build prefix-lists with name ans seq.no
device str
A device name from the provider configuration.
prefixes Sequence[PrefixListPrefixArgs]
Build prefix-lists with name ans seq.no
device String
A device name from the provider configuration.
prefixes List<Property Map>
Build prefix-lists with name ans seq.no

Supporting Types

PrefixListPrefix
, PrefixListPrefixArgs

Name This property is required. string
Seq This property is required. int
Action string
Ge int
Ip string
Le int
Name This property is required. string
Seq This property is required. int
Action string
Ge int
Ip string
Le int
name This property is required. String
seq This property is required. Integer
action String
ge Integer
ip String
le Integer
name This property is required. string
seq This property is required. number
action string
ge number
ip string
le number
name This property is required. str
seq This property is required. int
action str
ge int
ip str
le int
name This property is required. String
seq This property is required. Number
action String
ge Number
ip String
le Number

Import

 $ pulumi import iosxe:index/prefixList:PrefixList example "Cisco-IOS-XE-native:native/ip/prefix-lists"
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.