fortios.router.Accesslist
Explore with Pulumi AI
Configure access lists.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as fortios from "@pulumiverse/fortios";
const trname = new fortios.router.Accesslist("trname", {comments: "test accesslist"});
import pulumi
import pulumiverse_fortios as fortios
trname = fortios.router.Accesslist("trname", comments="test accesslist")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/router"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := router.NewAccesslist(ctx, "trname", &router.AccesslistArgs{
Comments: pulumi.String("test accesslist"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortios = Pulumiverse.Fortios;
return await Deployment.RunAsync(() =>
{
var trname = new Fortios.Router.Accesslist("trname", new()
{
Comments = "test accesslist",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortios.router.Accesslist;
import com.pulumi.fortios.router.AccesslistArgs;
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 trname = new Accesslist("trname", AccesslistArgs.builder()
.comments("test accesslist")
.build());
}
}
resources:
trname:
type: fortios:router:Accesslist
properties:
comments: test accesslist
Note
The feature can only be correctly supported when FortiOS Version >= 6.2.4, for FortiOS Version < 6.2.4, please use the following resource configuration as an alternative.
Example
import * as pulumi from "@pulumi/pulumi";
import * as fortios from "@pulumiverse/fortios";
const trname1 = new fortios.system.Autoscript("trname1", {
interval: 1,
outputSize: 10,
repeat: 1,
script: `config router access-list
edit "static-redistribution"
config rule
edit 10
set prefix 10.0.0.0 255.255.255.0
set action permit
set exact-match enable
end
end
`,
start: "auto",
});
import pulumi
import pulumiverse_fortios as fortios
trname1 = fortios.system.Autoscript("trname1",
interval=1,
output_size=10,
repeat=1,
script="""config router access-list
edit "static-redistribution"
config rule
edit 10
set prefix 10.0.0.0 255.255.255.0
set action permit
set exact-match enable
end
end
""",
start="auto")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/system"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := system.NewAutoscript(ctx, "trname1", &system.AutoscriptArgs{
Interval: pulumi.Int(1),
OutputSize: pulumi.Int(10),
Repeat: pulumi.Int(1),
Script: pulumi.String(`config router access-list
edit "static-redistribution"
config rule
edit 10
set prefix 10.0.0.0 255.255.255.0
set action permit
set exact-match enable
end
end
`),
Start: pulumi.String("auto"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortios = Pulumiverse.Fortios;
return await Deployment.RunAsync(() =>
{
var trname1 = new Fortios.System.Autoscript("trname1", new()
{
Interval = 1,
OutputSize = 10,
Repeat = 1,
Script = @"config router access-list
edit ""static-redistribution""
config rule
edit 10
set prefix 10.0.0.0 255.255.255.0
set action permit
set exact-match enable
end
end
",
Start = "auto",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortios.system.Autoscript;
import com.pulumi.fortios.system.AutoscriptArgs;
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 trname1 = new Autoscript("trname1", AutoscriptArgs.builder()
.interval(1)
.outputSize(10)
.repeat(1)
.script("""
config router access-list
edit "static-redistribution"
config rule
edit 10
set prefix 10.0.0.0 255.255.255.0
set action permit
set exact-match enable
end
end
""")
.start("auto")
.build());
}
}
resources:
trname1:
type: fortios:system:Autoscript
properties:
interval: 1
outputSize: 10
repeat: 1
script: |+
config router access-list
edit "static-redistribution"
config rule
edit 10
set prefix 10.0.0.0 255.255.255.0
set action permit
set exact-match enable
end
end
start: auto
Create Accesslist Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Accesslist(name: string, args?: AccesslistArgs, opts?: CustomResourceOptions);
@overload
def Accesslist(resource_name: str,
args: Optional[AccesslistArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Accesslist(resource_name: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
dynamic_sort_subtable: Optional[str] = None,
get_all_tables: Optional[str] = None,
name: Optional[str] = None,
rules: Optional[Sequence[AccesslistRuleArgs]] = None,
vdomparam: Optional[str] = None)
func NewAccesslist(ctx *Context, name string, args *AccesslistArgs, opts ...ResourceOption) (*Accesslist, error)
public Accesslist(string name, AccesslistArgs? args = null, CustomResourceOptions? opts = null)
public Accesslist(String name, AccesslistArgs args)
public Accesslist(String name, AccesslistArgs args, CustomResourceOptions options)
type: fortios:router:Accesslist
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 AccesslistArgs
- 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 AccesslistArgs
- 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 AccesslistArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccesslistArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccesslistArgs
- 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 accesslistResource = new Fortios.Router.Accesslist("accesslistResource", new()
{
Comments = "string",
DynamicSortSubtable = "string",
GetAllTables = "string",
Name = "string",
Rules = new[]
{
new Fortios.Router.Inputs.AccesslistRuleArgs
{
Action = "string",
ExactMatch = "string",
Flags = 0,
Id = 0,
Prefix = "string",
Wildcard = "string",
},
},
Vdomparam = "string",
});
example, err := router.NewAccesslist(ctx, "accesslistResource", &router.AccesslistArgs{
Comments: pulumi.String("string"),
DynamicSortSubtable: pulumi.String("string"),
GetAllTables: pulumi.String("string"),
Name: pulumi.String("string"),
Rules: router.AccesslistRuleArray{
&router.AccesslistRuleArgs{
Action: pulumi.String("string"),
ExactMatch: pulumi.String("string"),
Flags: pulumi.Int(0),
Id: pulumi.Int(0),
Prefix: pulumi.String("string"),
Wildcard: pulumi.String("string"),
},
},
Vdomparam: pulumi.String("string"),
})
var accesslistResource = new Accesslist("accesslistResource", AccesslistArgs.builder()
.comments("string")
.dynamicSortSubtable("string")
.getAllTables("string")
.name("string")
.rules(AccesslistRuleArgs.builder()
.action("string")
.exactMatch("string")
.flags(0)
.id(0)
.prefix("string")
.wildcard("string")
.build())
.vdomparam("string")
.build());
accesslist_resource = fortios.router.Accesslist("accesslistResource",
comments="string",
dynamic_sort_subtable="string",
get_all_tables="string",
name="string",
rules=[{
"action": "string",
"exact_match": "string",
"flags": 0,
"id": 0,
"prefix": "string",
"wildcard": "string",
}],
vdomparam="string")
const accesslistResource = new fortios.router.Accesslist("accesslistResource", {
comments: "string",
dynamicSortSubtable: "string",
getAllTables: "string",
name: "string",
rules: [{
action: "string",
exactMatch: "string",
flags: 0,
id: 0,
prefix: "string",
wildcard: "string",
}],
vdomparam: "string",
});
type: fortios:router:Accesslist
properties:
comments: string
dynamicSortSubtable: string
getAllTables: string
name: string
rules:
- action: string
exactMatch: string
flags: 0
id: 0
prefix: string
wildcard: string
vdomparam: string
Accesslist 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 Accesslist resource accepts the following input properties:
- Comments string
- Comment.
- Dynamic
Sort stringSubtable - Get
All stringTables - Name string
- Name.
- Rules
List<Pulumiverse.
Fortios. Router. Inputs. Accesslist Rule> - Rule. The structure of
rule
block is documented below. - Vdomparam string
- Comments string
- Comment.
- Dynamic
Sort stringSubtable - Get
All stringTables - Name string
- Name.
- Rules
[]Accesslist
Rule Args - Rule. The structure of
rule
block is documented below. - Vdomparam string
- comments String
- Comment.
- dynamic
Sort StringSubtable - get
All StringTables - name String
- Name.
- rules
List<Accesslist
Rule> - Rule. The structure of
rule
block is documented below. - vdomparam String
- comments string
- Comment.
- dynamic
Sort stringSubtable - get
All stringTables - name string
- Name.
- rules
Accesslist
Rule[] - Rule. The structure of
rule
block is documented below. - vdomparam string
- comments str
- Comment.
- dynamic_
sort_ strsubtable - get_
all_ strtables - name str
- Name.
- rules
Sequence[Accesslist
Rule Args] - Rule. The structure of
rule
block is documented below. - vdomparam str
- comments String
- Comment.
- dynamic
Sort StringSubtable - get
All StringTables - name String
- Name.
- rules List<Property Map>
- Rule. The structure of
rule
block is documented below. - vdomparam String
Outputs
All input properties are implicitly available as output properties. Additionally, the Accesslist 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 Accesslist Resource
Get an existing Accesslist 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?: AccesslistState, opts?: CustomResourceOptions): Accesslist
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
dynamic_sort_subtable: Optional[str] = None,
get_all_tables: Optional[str] = None,
name: Optional[str] = None,
rules: Optional[Sequence[AccesslistRuleArgs]] = None,
vdomparam: Optional[str] = None) -> Accesslist
func GetAccesslist(ctx *Context, name string, id IDInput, state *AccesslistState, opts ...ResourceOption) (*Accesslist, error)
public static Accesslist Get(string name, Input<string> id, AccesslistState? state, CustomResourceOptions? opts = null)
public static Accesslist get(String name, Output<String> id, AccesslistState 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.
- Comments string
- Comment.
- Dynamic
Sort stringSubtable - Get
All stringTables - Name string
- Name.
- Rules
List<Pulumiverse.
Fortios. Router. Inputs. Accesslist Rule> - Rule. The structure of
rule
block is documented below. - Vdomparam string
- Comments string
- Comment.
- Dynamic
Sort stringSubtable - Get
All stringTables - Name string
- Name.
- Rules
[]Accesslist
Rule Args - Rule. The structure of
rule
block is documented below. - Vdomparam string
- comments String
- Comment.
- dynamic
Sort StringSubtable - get
All StringTables - name String
- Name.
- rules
List<Accesslist
Rule> - Rule. The structure of
rule
block is documented below. - vdomparam String
- comments string
- Comment.
- dynamic
Sort stringSubtable - get
All stringTables - name string
- Name.
- rules
Accesslist
Rule[] - Rule. The structure of
rule
block is documented below. - vdomparam string
- comments str
- Comment.
- dynamic_
sort_ strsubtable - get_
all_ strtables - name str
- Name.
- rules
Sequence[Accesslist
Rule Args] - Rule. The structure of
rule
block is documented below. - vdomparam str
- comments String
- Comment.
- dynamic
Sort StringSubtable - get
All StringTables - name String
- Name.
- rules List<Property Map>
- Rule. The structure of
rule
block is documented below. - vdomparam String
Supporting Types
AccesslistRule, AccesslistRuleArgs
- action String
- Permit or deny this IP address and netmask prefix.
- exact
Match String - Enable/disable exact match.
- flags Integer
- Flags.
- id Integer
- Rule ID.
- prefix String
- IPv4 prefix to define regular filter criteria, such as "any" or subnets.
- wildcard String
- Wildcard to define Cisco-style wildcard filter criteria.
Import
Router AccessList can be imported using any of these accepted formats:
$ pulumi import fortios:router/accesslist:Accesslist labelname {{name}}
If you do not want to import arguments of block:
$ export “FORTIOS_IMPORT_TABLE”=“true”
$ pulumi import fortios:router/accesslist:Accesslist labelname {{name}}
$ unset “FORTIOS_IMPORT_TABLE”
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- fortios pulumiverse/pulumi-fortios
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fortios
Terraform Provider.