1. Packages
  2. Fortimanager Provider
  3. API Docs
  4. ObjectRouterAspathlistRule
fortimanager 1.13.0 published on Thursday, Mar 13, 2025 by fortinetdev

fortimanager.ObjectRouterAspathlistRule

Explore with Pulumi AI

AS path list rule.

This resource is a sub resource for variable rule of resource fortimanager.ObjectRouterAspathlist. Conflict and overwrite may occur if use both of them.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as fortimanager from "@pulumi/fortimanager";

const trnameObjectRouterAspathlist = new fortimanager.ObjectRouterAspathlist("trnameObjectRouterAspathlist", {});
const trnameObjectRouterAspathlistRule = new fortimanager.ObjectRouterAspathlistRule("trnameObjectRouterAspathlistRule", {
    aspathList: trnameObjectRouterAspathlist.name,
    action: "permit",
    fosid: 1,
}, {
    dependsOn: [trnameObjectRouterAspathlist],
});
Copy
import pulumi
import pulumi_fortimanager as fortimanager

trname_object_router_aspathlist = fortimanager.ObjectRouterAspathlist("trnameObjectRouterAspathlist")
trname_object_router_aspathlist_rule = fortimanager.ObjectRouterAspathlistRule("trnameObjectRouterAspathlistRule",
    aspath_list=trname_object_router_aspathlist.name,
    action="permit",
    fosid=1,
    opts = pulumi.ResourceOptions(depends_on=[trname_object_router_aspathlist]))
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/fortimanager/fortimanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		trnameObjectRouterAspathlist, err := fortimanager.NewObjectRouterAspathlist(ctx, "trnameObjectRouterAspathlist", nil)
		if err != nil {
			return err
		}
		_, err = fortimanager.NewObjectRouterAspathlistRule(ctx, "trnameObjectRouterAspathlistRule", &fortimanager.ObjectRouterAspathlistRuleArgs{
			AspathList: trnameObjectRouterAspathlist.Name,
			Action:     pulumi.String("permit"),
			Fosid:      pulumi.Float64(1),
		}, pulumi.DependsOn([]pulumi.Resource{
			trnameObjectRouterAspathlist,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortimanager = Pulumi.Fortimanager;

return await Deployment.RunAsync(() => 
{
    var trnameObjectRouterAspathlist = new Fortimanager.ObjectRouterAspathlist("trnameObjectRouterAspathlist");

    var trnameObjectRouterAspathlistRule = new Fortimanager.ObjectRouterAspathlistRule("trnameObjectRouterAspathlistRule", new()
    {
        AspathList = trnameObjectRouterAspathlist.Name,
        Action = "permit",
        Fosid = 1,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            trnameObjectRouterAspathlist,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortimanager.ObjectRouterAspathlist;
import com.pulumi.fortimanager.ObjectRouterAspathlistRule;
import com.pulumi.fortimanager.ObjectRouterAspathlistRuleArgs;
import com.pulumi.resources.CustomResourceOptions;
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 trnameObjectRouterAspathlist = new ObjectRouterAspathlist("trnameObjectRouterAspathlist");

        var trnameObjectRouterAspathlistRule = new ObjectRouterAspathlistRule("trnameObjectRouterAspathlistRule", ObjectRouterAspathlistRuleArgs.builder()
            .aspathList(trnameObjectRouterAspathlist.name())
            .action("permit")
            .fosid(1)
            .build(), CustomResourceOptions.builder()
                .dependsOn(trnameObjectRouterAspathlist)
                .build());

    }
}
Copy
resources:
  trnameObjectRouterAspathlistRule:
    type: fortimanager:ObjectRouterAspathlistRule
    properties:
      aspathList: ${trnameObjectRouterAspathlist.name}
      action: permit
      fosid: 1
    options:
      dependsOn:
        - ${trnameObjectRouterAspathlist}
  trnameObjectRouterAspathlist:
    type: fortimanager:ObjectRouterAspathlist
Copy

Create ObjectRouterAspathlistRule Resource

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

Constructor syntax

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

@overload
def ObjectRouterAspathlistRule(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               aspath_list: Optional[str] = None,
                               action: Optional[str] = None,
                               adom: Optional[str] = None,
                               fosid: Optional[float] = None,
                               object_router_aspathlist_rule_id: Optional[str] = None,
                               regexp: Optional[str] = None,
                               scopetype: Optional[str] = None)
func NewObjectRouterAspathlistRule(ctx *Context, name string, args ObjectRouterAspathlistRuleArgs, opts ...ResourceOption) (*ObjectRouterAspathlistRule, error)
public ObjectRouterAspathlistRule(string name, ObjectRouterAspathlistRuleArgs args, CustomResourceOptions? opts = null)
public ObjectRouterAspathlistRule(String name, ObjectRouterAspathlistRuleArgs args)
public ObjectRouterAspathlistRule(String name, ObjectRouterAspathlistRuleArgs args, CustomResourceOptions options)
type: fortimanager:ObjectRouterAspathlistRule
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. ObjectRouterAspathlistRuleArgs
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. ObjectRouterAspathlistRuleInitArgs
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. ObjectRouterAspathlistRuleArgs
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. ObjectRouterAspathlistRuleArgs
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. ObjectRouterAspathlistRuleArgs
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 objectRouterAspathlistRuleResource = new Fortimanager.ObjectRouterAspathlistRule("objectRouterAspathlistRuleResource", new()
{
    AspathList = "string",
    Action = "string",
    Adom = "string",
    Fosid = 0,
    ObjectRouterAspathlistRuleId = "string",
    Regexp = "string",
    Scopetype = "string",
});
Copy
example, err := fortimanager.NewObjectRouterAspathlistRule(ctx, "objectRouterAspathlistRuleResource", &fortimanager.ObjectRouterAspathlistRuleArgs{
AspathList: pulumi.String("string"),
Action: pulumi.String("string"),
Adom: pulumi.String("string"),
Fosid: pulumi.Float64(0),
ObjectRouterAspathlistRuleId: pulumi.String("string"),
Regexp: pulumi.String("string"),
Scopetype: pulumi.String("string"),
})
Copy
var objectRouterAspathlistRuleResource = new ObjectRouterAspathlistRule("objectRouterAspathlistRuleResource", ObjectRouterAspathlistRuleArgs.builder()
    .aspathList("string")
    .action("string")
    .adom("string")
    .fosid(0)
    .objectRouterAspathlistRuleId("string")
    .regexp("string")
    .scopetype("string")
    .build());
Copy
object_router_aspathlist_rule_resource = fortimanager.ObjectRouterAspathlistRule("objectRouterAspathlistRuleResource",
    aspath_list="string",
    action="string",
    adom="string",
    fosid=0,
    object_router_aspathlist_rule_id="string",
    regexp="string",
    scopetype="string")
Copy
const objectRouterAspathlistRuleResource = new fortimanager.ObjectRouterAspathlistRule("objectRouterAspathlistRuleResource", {
    aspathList: "string",
    action: "string",
    adom: "string",
    fosid: 0,
    objectRouterAspathlistRuleId: "string",
    regexp: "string",
    scopetype: "string",
});
Copy
type: fortimanager:ObjectRouterAspathlistRule
properties:
    action: string
    adom: string
    aspathList: string
    fosid: 0
    objectRouterAspathlistRuleId: string
    regexp: string
    scopetype: string
Copy

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

AspathList This property is required. string
Aspath List.
Action string
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
Fosid double
ID.
ObjectRouterAspathlistRuleId string
an identifier for the resource with format {{fosid}}.
Regexp string
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
AspathList This property is required. string
Aspath List.
Action string
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
Fosid float64
ID.
ObjectRouterAspathlistRuleId string
an identifier for the resource with format {{fosid}}.
Regexp string
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
aspathList This property is required. String
Aspath List.
action String
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
fosid Double
ID.
objectRouterAspathlistRuleId String
an identifier for the resource with format {{fosid}}.
regexp String
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
aspathList This property is required. string
Aspath List.
action string
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
fosid number
ID.
objectRouterAspathlistRuleId string
an identifier for the resource with format {{fosid}}.
regexp string
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
aspath_list This property is required. str
Aspath List.
action str
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
adom str
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
fosid float
ID.
object_router_aspathlist_rule_id str
an identifier for the resource with format {{fosid}}.
regexp str
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
scopetype str
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
aspathList This property is required. String
Aspath List.
action String
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
fosid Number
ID.
objectRouterAspathlistRuleId String
an identifier for the resource with format {{fosid}}.
regexp String
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.

Outputs

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

Get an existing ObjectRouterAspathlistRule 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?: ObjectRouterAspathlistRuleState, opts?: CustomResourceOptions): ObjectRouterAspathlistRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        adom: Optional[str] = None,
        aspath_list: Optional[str] = None,
        fosid: Optional[float] = None,
        object_router_aspathlist_rule_id: Optional[str] = None,
        regexp: Optional[str] = None,
        scopetype: Optional[str] = None) -> ObjectRouterAspathlistRule
func GetObjectRouterAspathlistRule(ctx *Context, name string, id IDInput, state *ObjectRouterAspathlistRuleState, opts ...ResourceOption) (*ObjectRouterAspathlistRule, error)
public static ObjectRouterAspathlistRule Get(string name, Input<string> id, ObjectRouterAspathlistRuleState? state, CustomResourceOptions? opts = null)
public static ObjectRouterAspathlistRule get(String name, Output<String> id, ObjectRouterAspathlistRuleState state, CustomResourceOptions options)
resources:  _:    type: fortimanager:ObjectRouterAspathlistRule    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:
Action string
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AspathList string
Aspath List.
Fosid double
ID.
ObjectRouterAspathlistRuleId string
an identifier for the resource with format {{fosid}}.
Regexp string
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
Action string
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AspathList string
Aspath List.
Fosid float64
ID.
ObjectRouterAspathlistRuleId string
an identifier for the resource with format {{fosid}}.
Regexp string
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
action String
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
aspathList String
Aspath List.
fosid Double
ID.
objectRouterAspathlistRuleId String
an identifier for the resource with format {{fosid}}.
regexp String
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
action string
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
aspathList string
Aspath List.
fosid number
ID.
objectRouterAspathlistRuleId string
an identifier for the resource with format {{fosid}}.
regexp string
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
action str
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
adom str
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
aspath_list str
Aspath List.
fosid float
ID.
object_router_aspathlist_rule_id str
an identifier for the resource with format {{fosid}}.
regexp str
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
scopetype str
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
action String
Permit or deny route-based operations, based on the route's AS_PATH attribute. Valid values: deny, permit.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
aspathList String
Aspath List.
fosid Number
ID.
objectRouterAspathlistRuleId String
an identifier for the resource with format {{fosid}}.
regexp String
Regular-expression to match the Border Gateway Protocol (BGP) AS paths.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.

Import

ObjectRouter AspathListRule can be imported using any of these accepted formats:

Set import_options = [“aspath_list=YOUR_VALUE”] in the provider section.

$ export “FORTIMANAGER_IMPORT_TABLE”=“true”

$ pulumi import fortimanager:index/objectRouterAspathlistRule:ObjectRouterAspathlistRule labelname {{fosid}}
Copy

$ unset “FORTIMANAGER_IMPORT_TABLE”

-> Hint: The scopetype and adom for import will directly inherit the scopetype and adom configuration of the provider.

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

Package Details

Repository
fortimanager fortinetdev/terraform-provider-fortimanager
License
Notes
This Pulumi package is based on the fortimanager Terraform Provider.