RoutePrefixList resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scm from "@pulumi/scm";
const scmRoutePrefixList = new scm.RoutePrefixList("scm_route_prefix_list", {
folder: "ngfw-shared",
name: "scm_bgp_prefix_list",
description: "Managed by Pulumi",
type: {
ipv4: {
ipv4Entries: [{
name: 10,
action: "permit",
prefix: {
greaterThanOrEqual: 24,
network: "198.18.1.0/24",
},
}],
},
},
});
import pulumi
import pulumi_scm as scm
scm_route_prefix_list = scm.RoutePrefixList("scm_route_prefix_list",
folder="ngfw-shared",
name="scm_bgp_prefix_list",
description="Managed by Pulumi",
type={
"ipv4": {
"ipv4_entries": [{
"name": 10,
"action": "permit",
"prefix": {
"greater_than_or_equal": 24,
"network": "198.18.1.0/24",
},
}],
},
})
package main
import (
"github.com/pulumi/pulumi-scm/sdk/go/scm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scm.NewRoutePrefixList(ctx, "scm_route_prefix_list", &scm.RoutePrefixListArgs{
Folder: pulumi.String("ngfw-shared"),
Name: pulumi.String("scm_bgp_prefix_list"),
Description: pulumi.String("Managed by Pulumi"),
Type: &scm.RoutePrefixListTypeArgs{
Ipv4: &scm.RoutePrefixListTypeIpv4Args{
Ipv4Entries: scm.RoutePrefixListTypeIpv4Ipv4EntryArray{
&scm.RoutePrefixListTypeIpv4Ipv4EntryArgs{
Name: pulumi.Int(10),
Action: pulumi.String("permit"),
Prefix: &scm.RoutePrefixListTypeIpv4Ipv4EntryPrefixArgs{
GreaterThanOrEqual: 24,
Network: pulumi.String("198.18.1.0/24"),
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scm = Pulumi.Scm;
return await Deployment.RunAsync(() =>
{
var scmRoutePrefixList = new Scm.RoutePrefixList("scm_route_prefix_list", new()
{
Folder = "ngfw-shared",
Name = "scm_bgp_prefix_list",
Description = "Managed by Pulumi",
Type = new Scm.Inputs.RoutePrefixListTypeArgs
{
Ipv4 = new Scm.Inputs.RoutePrefixListTypeIpv4Args
{
Ipv4Entries = new[]
{
new Scm.Inputs.RoutePrefixListTypeIpv4Ipv4EntryArgs
{
Name = 10,
Action = "permit",
Prefix = new Scm.Inputs.RoutePrefixListTypeIpv4Ipv4EntryPrefixArgs
{
GreaterThanOrEqual = 24,
Network = "198.18.1.0/24",
},
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scm.RoutePrefixList;
import com.pulumi.scm.RoutePrefixListArgs;
import com.pulumi.scm.inputs.RoutePrefixListTypeArgs;
import com.pulumi.scm.inputs.RoutePrefixListTypeIpv4Args;
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 scmRoutePrefixList = new RoutePrefixList("scmRoutePrefixList", RoutePrefixListArgs.builder()
.folder("ngfw-shared")
.name("scm_bgp_prefix_list")
.description("Managed by Pulumi")
.type(RoutePrefixListTypeArgs.builder()
.ipv4(RoutePrefixListTypeIpv4Args.builder()
.ipv4Entries(RoutePrefixListTypeIpv4Ipv4EntryArgs.builder()
.name(10)
.action("permit")
.prefix(RoutePrefixListTypeIpv4Ipv4EntryPrefixArgs.builder()
.greaterThanOrEqual(24)
.network("198.18.1.0/24")
.build())
.build())
.build())
.build())
.build());
}
}
resources:
scmRoutePrefixList:
type: scm:RoutePrefixList
name: scm_route_prefix_list
properties:
folder: ngfw-shared
name: scm_bgp_prefix_list
description: Managed by Pulumi
type:
ipv4:
ipv4Entries:
- name: 10
action: permit
prefix:
greaterThanOrEqual: 24
network: 198.18.1.0/24
Create RoutePrefixList Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoutePrefixList(name: string, args?: RoutePrefixListArgs, opts?: CustomResourceOptions);@overload
def RoutePrefixList(resource_name: str,
args: Optional[RoutePrefixListArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def RoutePrefixList(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
device: Optional[str] = None,
folder: Optional[str] = None,
name: Optional[str] = None,
snippet: Optional[str] = None,
type: Optional[RoutePrefixListTypeArgs] = None)func NewRoutePrefixList(ctx *Context, name string, args *RoutePrefixListArgs, opts ...ResourceOption) (*RoutePrefixList, error)public RoutePrefixList(string name, RoutePrefixListArgs? args = null, CustomResourceOptions? opts = null)
public RoutePrefixList(String name, RoutePrefixListArgs args)
public RoutePrefixList(String name, RoutePrefixListArgs args, CustomResourceOptions options)
type: scm:RoutePrefixList
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 RoutePrefixListArgs
- 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 RoutePrefixListArgs
- 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 RoutePrefixListArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoutePrefixListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoutePrefixListArgs
- 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 routePrefixListResource = new Scm.RoutePrefixList("routePrefixListResource", new()
{
Description = "string",
Device = "string",
Folder = "string",
Name = "string",
Snippet = "string",
Type = new Scm.Inputs.RoutePrefixListTypeArgs
{
Ipv4 = new Scm.Inputs.RoutePrefixListTypeIpv4Args
{
Ipv4Entries = new[]
{
new Scm.Inputs.RoutePrefixListTypeIpv4Ipv4EntryArgs
{
Action = "string",
Name = 0,
Prefix = new Scm.Inputs.RoutePrefixListTypeIpv4Ipv4EntryPrefixArgs
{
Entry = new Scm.Inputs.RoutePrefixListTypeIpv4Ipv4EntryPrefixEntryArgs
{
GreaterThanOrEqual = 0,
LessThanOrEqual = 0,
Network = "string",
},
Network = "string",
},
},
},
},
},
});
example, err := scm.NewRoutePrefixList(ctx, "routePrefixListResource", &scm.RoutePrefixListArgs{
Description: pulumi.String("string"),
Device: pulumi.String("string"),
Folder: pulumi.String("string"),
Name: pulumi.String("string"),
Snippet: pulumi.String("string"),
Type: &scm.RoutePrefixListTypeArgs{
Ipv4: &scm.RoutePrefixListTypeIpv4Args{
Ipv4Entries: scm.RoutePrefixListTypeIpv4Ipv4EntryArray{
&scm.RoutePrefixListTypeIpv4Ipv4EntryArgs{
Action: pulumi.String("string"),
Name: pulumi.Int(0),
Prefix: &scm.RoutePrefixListTypeIpv4Ipv4EntryPrefixArgs{
Entry: &scm.RoutePrefixListTypeIpv4Ipv4EntryPrefixEntryArgs{
GreaterThanOrEqual: pulumi.Int(0),
LessThanOrEqual: pulumi.Int(0),
Network: pulumi.String("string"),
},
Network: pulumi.String("string"),
},
},
},
},
},
})
var routePrefixListResource = new RoutePrefixList("routePrefixListResource", RoutePrefixListArgs.builder()
.description("string")
.device("string")
.folder("string")
.name("string")
.snippet("string")
.type(RoutePrefixListTypeArgs.builder()
.ipv4(RoutePrefixListTypeIpv4Args.builder()
.ipv4Entries(RoutePrefixListTypeIpv4Ipv4EntryArgs.builder()
.action("string")
.name(0)
.prefix(RoutePrefixListTypeIpv4Ipv4EntryPrefixArgs.builder()
.entry(RoutePrefixListTypeIpv4Ipv4EntryPrefixEntryArgs.builder()
.greaterThanOrEqual(0)
.lessThanOrEqual(0)
.network("string")
.build())
.network("string")
.build())
.build())
.build())
.build())
.build());
route_prefix_list_resource = scm.RoutePrefixList("routePrefixListResource",
description="string",
device="string",
folder="string",
name="string",
snippet="string",
type={
"ipv4": {
"ipv4_entries": [{
"action": "string",
"name": 0,
"prefix": {
"entry": {
"greater_than_or_equal": 0,
"less_than_or_equal": 0,
"network": "string",
},
"network": "string",
},
}],
},
})
const routePrefixListResource = new scm.RoutePrefixList("routePrefixListResource", {
description: "string",
device: "string",
folder: "string",
name: "string",
snippet: "string",
type: {
ipv4: {
ipv4Entries: [{
action: "string",
name: 0,
prefix: {
entry: {
greaterThanOrEqual: 0,
lessThanOrEqual: 0,
network: "string",
},
network: "string",
},
}],
},
},
});
type: scm:RoutePrefixList
properties:
description: string
device: string
folder: string
name: string
snippet: string
type:
ipv4:
ipv4Entries:
- action: string
name: 0
prefix:
entry:
greaterThanOrEqual: 0
lessThanOrEqual: 0
network: string
network: string
RoutePrefixList 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 RoutePrefixList resource accepts the following input properties:
- Description string
- Description
- Device string
- The device in which the resource is defined
- Folder string
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- Name string
- Filter prefix list name
- Snippet string
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- Type
Route
Prefix List Type - Address Family Type
- Description string
- Description
- Device string
- The device in which the resource is defined
- Folder string
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- Name string
- Filter prefix list name
- Snippet string
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- Type
Route
Prefix List Type Args - Address Family Type
- description String
- Description
- device String
- The device in which the resource is defined
- folder String
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- name String
- Filter prefix list name
- snippet String
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- type
Route
Prefix List Type - Address Family Type
- description string
- Description
- device string
- The device in which the resource is defined
- folder string
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- name string
- Filter prefix list name
- snippet string
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- type
Route
Prefix List Type - Address Family Type
- description str
- Description
- device str
- The device in which the resource is defined
- folder str
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- name str
- Filter prefix list name
- snippet str
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- type
Route
Prefix List Type Args - Address Family Type
- description String
- Description
- device String
- The device in which the resource is defined
- folder String
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- name String
- Filter prefix list name
- snippet String
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- type Property Map
- Address Family Type
Outputs
All input properties are implicitly available as output properties. Additionally, the RoutePrefixList resource produces the following output properties:
Look up Existing RoutePrefixList Resource
Get an existing RoutePrefixList 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?: RoutePrefixListState, opts?: CustomResourceOptions): RoutePrefixList@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
device: Optional[str] = None,
folder: Optional[str] = None,
name: Optional[str] = None,
snippet: Optional[str] = None,
tfid: Optional[str] = None,
type: Optional[RoutePrefixListTypeArgs] = None) -> RoutePrefixListfunc GetRoutePrefixList(ctx *Context, name string, id IDInput, state *RoutePrefixListState, opts ...ResourceOption) (*RoutePrefixList, error)public static RoutePrefixList Get(string name, Input<string> id, RoutePrefixListState? state, CustomResourceOptions? opts = null)public static RoutePrefixList get(String name, Output<String> id, RoutePrefixListState state, CustomResourceOptions options)resources: _: type: scm:RoutePrefixList get: id: ${id}- 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.
- Description string
- Description
- Device string
- The device in which the resource is defined
- Folder string
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- Name string
- Filter prefix list name
- Snippet string
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- Tfid string
- Type
Route
Prefix List Type - Address Family Type
- Description string
- Description
- Device string
- The device in which the resource is defined
- Folder string
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- Name string
- Filter prefix list name
- Snippet string
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- Tfid string
- Type
Route
Prefix List Type Args - Address Family Type
- description String
- Description
- device String
- The device in which the resource is defined
- folder String
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- name String
- Filter prefix list name
- snippet String
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- tfid String
- type
Route
Prefix List Type - Address Family Type
- description string
- Description
- device string
- The device in which the resource is defined
- folder string
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- name string
- Filter prefix list name
- snippet string
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- tfid string
- type
Route
Prefix List Type - Address Family Type
- description str
- Description
- device str
- The device in which the resource is defined
- folder str
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- name str
- Filter prefix list name
- snippet str
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- tfid str
- type
Route
Prefix List Type Args - Address Family Type
- description String
- Description
- device String
- The device in which the resource is defined
- folder String
The folder in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- name String
- Filter prefix list name
- snippet String
The snippet in which the resource is defined
ℹ️ Note: You must specify exactly one of
device,folder, andsnippet.- tfid String
- type Property Map
- Address Family Type
Supporting Types
RoutePrefixListType, RoutePrefixListTypeArgs
- ipv4 Property Map
- Ipv4
RoutePrefixListTypeIpv4, RoutePrefixListTypeIpv4Args
- Ipv4Entries
List<Route
Prefix List Type Ipv4Ipv4Entry> - IPv4 prefix lists
- Ipv4Entries
[]Route
Prefix List Type Ipv4Ipv4Entry - IPv4 prefix lists
- ipv4Entries
List<Route
Prefix List Type Ipv4Ipv4Entry> - IPv4 prefix lists
- ipv4Entries
Route
Prefix List Type Ipv4Ipv4Entry[] - IPv4 prefix lists
- ipv4_
entries Sequence[RoutePrefix List Type Ipv4Ipv4Entry] - IPv4 prefix lists
- ipv4Entries List<Property Map>
- IPv4 prefix lists
RoutePrefixListTypeIpv4Ipv4Entry, RoutePrefixListTypeIpv4Ipv4EntryArgs
- Action string
- Action
- Name int
- Sequence number
- Prefix
Route
Prefix List Type Ipv4Ipv4Entry Prefix - Prefix
- Action string
- Action
- Name int
- Sequence number
- Prefix
Route
Prefix List Type Ipv4Ipv4Entry Prefix - Prefix
- action String
- Action
- name Integer
- Sequence number
- prefix
Route
Prefix List Type Ipv4Ipv4Entry Prefix - Prefix
- action string
- Action
- name number
- Sequence number
- prefix
Route
Prefix List Type Ipv4Ipv4Entry Prefix - Prefix
- action str
- Action
- name int
- Sequence number
- prefix
Route
Prefix List Type Ipv4Ipv4Entry Prefix - Prefix
- action String
- Action
- name Number
- Sequence number
- prefix Property Map
- Prefix
RoutePrefixListTypeIpv4Ipv4EntryPrefix, RoutePrefixListTypeIpv4Ipv4EntryPrefixArgs
- Entry
Route
Prefix List Type Ipv4Ipv4Entry Prefix Entry - Entry
- Network string
Network
ℹ️ Note: You must specify exactly one of
entryandnetwork.
- Entry
Route
Prefix List Type Ipv4Ipv4Entry Prefix Entry - Entry
- Network string
Network
ℹ️ Note: You must specify exactly one of
entryandnetwork.
- entry
Route
Prefix List Type Ipv4Ipv4Entry Prefix Entry - Entry
- network String
Network
ℹ️ Note: You must specify exactly one of
entryandnetwork.
- entry
Route
Prefix List Type Ipv4Ipv4Entry Prefix Entry - Entry
- network string
Network
ℹ️ Note: You must specify exactly one of
entryandnetwork.
- entry
Route
Prefix List Type Ipv4Ipv4Entry Prefix Entry - Entry
- network str
Network
ℹ️ Note: You must specify exactly one of
entryandnetwork.
- entry Property Map
- Entry
- network String
Network
ℹ️ Note: You must specify exactly one of
entryandnetwork.
RoutePrefixListTypeIpv4Ipv4EntryPrefixEntry, RoutePrefixListTypeIpv4Ipv4EntryPrefixEntryArgs
- Greater
Than intOr Equal - Greater than or equal to
- Less
Than intOr Equal - Less than or equal to
- Network string
- Network
- Greater
Than intOr Equal - Greater than or equal to
- Less
Than intOr Equal - Less than or equal to
- Network string
- Network
- greater
Than IntegerOr Equal - Greater than or equal to
- less
Than IntegerOr Equal - Less than or equal to
- network String
- Network
- greater
Than numberOr Equal - Greater than or equal to
- less
Than numberOr Equal - Less than or equal to
- network string
- Network
- greater_
than_ intor_ equal - Greater than or equal to
- less_
than_ intor_ equal - Less than or equal to
- network str
- Network
- greater
Than NumberOr Equal - Greater than or equal to
- less
Than NumberOr Equal - Less than or equal to
- network String
- Network
Import
The following command can be used to import a resource not managed by Terraform:
bash
$ pulumi import scm:index/routePrefixList:RoutePrefixList example folder:::id
or
bash
$ pulumi import scm:index/routePrefixList:RoutePrefixList example :snippet::id
or
bash
$ pulumi import scm:index/routePrefixList:RoutePrefixList example ::device:id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- scm pulumi/pulumi-scm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scmTerraform Provider.
