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

fortimanager.ObjectSwitchcontrollerVlanpolicy

Explore with Pulumi AI

Configure VLAN policy to be applied on the managed FortiSwitch ports through dynamic-port-policy.

Example Usage

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

const trname = new fortimanager.ObjectSwitchcontrollerVlanpolicy("trname", {allowedVlansAll: "enable"});
Copy
import pulumi
import pulumi_fortimanager as fortimanager

trname = fortimanager.ObjectSwitchcontrollerVlanpolicy("trname", allowed_vlans_all="enable")
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 {
		_, err := fortimanager.NewObjectSwitchcontrollerVlanpolicy(ctx, "trname", &fortimanager.ObjectSwitchcontrollerVlanpolicyArgs{
			AllowedVlansAll: pulumi.String("enable"),
		})
		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 trname = new Fortimanager.ObjectSwitchcontrollerVlanpolicy("trname", new()
    {
        AllowedVlansAll = "enable",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortimanager.ObjectSwitchcontrollerVlanpolicy;
import com.pulumi.fortimanager.ObjectSwitchcontrollerVlanpolicyArgs;
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 ObjectSwitchcontrollerVlanpolicy("trname", ObjectSwitchcontrollerVlanpolicyArgs.builder()
            .allowedVlansAll("enable")
            .build());

    }
}
Copy
resources:
  trname:
    type: fortimanager:ObjectSwitchcontrollerVlanpolicy
    properties:
      allowedVlansAll: enable
Copy

Create ObjectSwitchcontrollerVlanpolicy Resource

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

Constructor syntax

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

@overload
def ObjectSwitchcontrollerVlanpolicy(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     adom: Optional[str] = None,
                                     allowed_vlans: Optional[Sequence[str]] = None,
                                     allowed_vlans_all: Optional[str] = None,
                                     description: Optional[str] = None,
                                     discard_mode: Optional[str] = None,
                                     name: Optional[str] = None,
                                     object_switchcontroller_vlanpolicy_id: Optional[str] = None,
                                     scopetype: Optional[str] = None,
                                     untagged_vlans: Optional[Sequence[str]] = None,
                                     vlan: Optional[str] = None)
func NewObjectSwitchcontrollerVlanpolicy(ctx *Context, name string, args *ObjectSwitchcontrollerVlanpolicyArgs, opts ...ResourceOption) (*ObjectSwitchcontrollerVlanpolicy, error)
public ObjectSwitchcontrollerVlanpolicy(string name, ObjectSwitchcontrollerVlanpolicyArgs? args = null, CustomResourceOptions? opts = null)
public ObjectSwitchcontrollerVlanpolicy(String name, ObjectSwitchcontrollerVlanpolicyArgs args)
public ObjectSwitchcontrollerVlanpolicy(String name, ObjectSwitchcontrollerVlanpolicyArgs args, CustomResourceOptions options)
type: fortimanager:ObjectSwitchcontrollerVlanpolicy
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 ObjectSwitchcontrollerVlanpolicyArgs
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 ObjectSwitchcontrollerVlanpolicyArgs
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 ObjectSwitchcontrollerVlanpolicyArgs
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 ObjectSwitchcontrollerVlanpolicyArgs
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. ObjectSwitchcontrollerVlanpolicyArgs
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 objectSwitchcontrollerVlanpolicyResource = new Fortimanager.ObjectSwitchcontrollerVlanpolicy("objectSwitchcontrollerVlanpolicyResource", new()
{
    Adom = "string",
    AllowedVlans = new[]
    {
        "string",
    },
    AllowedVlansAll = "string",
    Description = "string",
    DiscardMode = "string",
    Name = "string",
    ObjectSwitchcontrollerVlanpolicyId = "string",
    Scopetype = "string",
    UntaggedVlans = new[]
    {
        "string",
    },
    Vlan = "string",
});
Copy
example, err := fortimanager.NewObjectSwitchcontrollerVlanpolicy(ctx, "objectSwitchcontrollerVlanpolicyResource", &fortimanager.ObjectSwitchcontrollerVlanpolicyArgs{
Adom: pulumi.String("string"),
AllowedVlans: pulumi.StringArray{
pulumi.String("string"),
},
AllowedVlansAll: pulumi.String("string"),
Description: pulumi.String("string"),
DiscardMode: pulumi.String("string"),
Name: pulumi.String("string"),
ObjectSwitchcontrollerVlanpolicyId: pulumi.String("string"),
Scopetype: pulumi.String("string"),
UntaggedVlans: pulumi.StringArray{
pulumi.String("string"),
},
Vlan: pulumi.String("string"),
})
Copy
var objectSwitchcontrollerVlanpolicyResource = new ObjectSwitchcontrollerVlanpolicy("objectSwitchcontrollerVlanpolicyResource", ObjectSwitchcontrollerVlanpolicyArgs.builder()
    .adom("string")
    .allowedVlans("string")
    .allowedVlansAll("string")
    .description("string")
    .discardMode("string")
    .name("string")
    .objectSwitchcontrollerVlanpolicyId("string")
    .scopetype("string")
    .untaggedVlans("string")
    .vlan("string")
    .build());
Copy
object_switchcontroller_vlanpolicy_resource = fortimanager.ObjectSwitchcontrollerVlanpolicy("objectSwitchcontrollerVlanpolicyResource",
    adom="string",
    allowed_vlans=["string"],
    allowed_vlans_all="string",
    description="string",
    discard_mode="string",
    name="string",
    object_switchcontroller_vlanpolicy_id="string",
    scopetype="string",
    untagged_vlans=["string"],
    vlan="string")
Copy
const objectSwitchcontrollerVlanpolicyResource = new fortimanager.ObjectSwitchcontrollerVlanpolicy("objectSwitchcontrollerVlanpolicyResource", {
    adom: "string",
    allowedVlans: ["string"],
    allowedVlansAll: "string",
    description: "string",
    discardMode: "string",
    name: "string",
    objectSwitchcontrollerVlanpolicyId: "string",
    scopetype: "string",
    untaggedVlans: ["string"],
    vlan: "string",
});
Copy
type: fortimanager:ObjectSwitchcontrollerVlanpolicy
properties:
    adom: string
    allowedVlans:
        - string
    allowedVlansAll: string
    description: string
    discardMode: string
    name: string
    objectSwitchcontrollerVlanpolicyId: string
    scopetype: string
    untaggedVlans:
        - string
    vlan: string
Copy

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

Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AllowedVlans List<string>
Allowed VLANs to be applied when using this VLAN policy.
AllowedVlansAll string
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
Description string
Description for the VLAN policy.
DiscardMode string
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
Name string
VLAN policy name.
ObjectSwitchcontrollerVlanpolicyId string
an identifier for the resource with format {{name}}.
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.
UntaggedVlans List<string>
Untagged VLANs to be applied when using this VLAN policy.
Vlan string
Native VLAN to be applied when using this VLAN policy.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AllowedVlans []string
Allowed VLANs to be applied when using this VLAN policy.
AllowedVlansAll string
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
Description string
Description for the VLAN policy.
DiscardMode string
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
Name string
VLAN policy name.
ObjectSwitchcontrollerVlanpolicyId string
an identifier for the resource with format {{name}}.
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.
UntaggedVlans []string
Untagged VLANs to be applied when using this VLAN policy.
Vlan string
Native VLAN to be applied when using this VLAN policy.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedVlans List<String>
Allowed VLANs to be applied when using this VLAN policy.
allowedVlansAll String
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
description String
Description for the VLAN policy.
discardMode String
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
name String
VLAN policy name.
objectSwitchcontrollerVlanpolicyId String
an identifier for the resource with format {{name}}.
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.
untaggedVlans List<String>
Untagged VLANs to be applied when using this VLAN policy.
vlan String
Native VLAN to be applied when using this VLAN policy.
adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedVlans string[]
Allowed VLANs to be applied when using this VLAN policy.
allowedVlansAll string
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
description string
Description for the VLAN policy.
discardMode string
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
name string
VLAN policy name.
objectSwitchcontrollerVlanpolicyId string
an identifier for the resource with format {{name}}.
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.
untaggedVlans string[]
Untagged VLANs to be applied when using this VLAN policy.
vlan string
Native VLAN to be applied when using this VLAN policy.
adom str
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowed_vlans Sequence[str]
Allowed VLANs to be applied when using this VLAN policy.
allowed_vlans_all str
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
description str
Description for the VLAN policy.
discard_mode str
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
name str
VLAN policy name.
object_switchcontroller_vlanpolicy_id str
an identifier for the resource with format {{name}}.
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.
untagged_vlans Sequence[str]
Untagged VLANs to be applied when using this VLAN policy.
vlan str
Native VLAN to be applied when using this VLAN policy.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedVlans List<String>
Allowed VLANs to be applied when using this VLAN policy.
allowedVlansAll String
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
description String
Description for the VLAN policy.
discardMode String
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
name String
VLAN policy name.
objectSwitchcontrollerVlanpolicyId String
an identifier for the resource with format {{name}}.
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.
untaggedVlans List<String>
Untagged VLANs to be applied when using this VLAN policy.
vlan String
Native VLAN to be applied when using this VLAN policy.

Outputs

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

Get an existing ObjectSwitchcontrollerVlanpolicy 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?: ObjectSwitchcontrollerVlanpolicyState, opts?: CustomResourceOptions): ObjectSwitchcontrollerVlanpolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        adom: Optional[str] = None,
        allowed_vlans: Optional[Sequence[str]] = None,
        allowed_vlans_all: Optional[str] = None,
        description: Optional[str] = None,
        discard_mode: Optional[str] = None,
        name: Optional[str] = None,
        object_switchcontroller_vlanpolicy_id: Optional[str] = None,
        scopetype: Optional[str] = None,
        untagged_vlans: Optional[Sequence[str]] = None,
        vlan: Optional[str] = None) -> ObjectSwitchcontrollerVlanpolicy
func GetObjectSwitchcontrollerVlanpolicy(ctx *Context, name string, id IDInput, state *ObjectSwitchcontrollerVlanpolicyState, opts ...ResourceOption) (*ObjectSwitchcontrollerVlanpolicy, error)
public static ObjectSwitchcontrollerVlanpolicy Get(string name, Input<string> id, ObjectSwitchcontrollerVlanpolicyState? state, CustomResourceOptions? opts = null)
public static ObjectSwitchcontrollerVlanpolicy get(String name, Output<String> id, ObjectSwitchcontrollerVlanpolicyState state, CustomResourceOptions options)
resources:  _:    type: fortimanager:ObjectSwitchcontrollerVlanpolicy    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:
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AllowedVlans List<string>
Allowed VLANs to be applied when using this VLAN policy.
AllowedVlansAll string
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
Description string
Description for the VLAN policy.
DiscardMode string
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
Name string
VLAN policy name.
ObjectSwitchcontrollerVlanpolicyId string
an identifier for the resource with format {{name}}.
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.
UntaggedVlans List<string>
Untagged VLANs to be applied when using this VLAN policy.
Vlan string
Native VLAN to be applied when using this VLAN policy.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AllowedVlans []string
Allowed VLANs to be applied when using this VLAN policy.
AllowedVlansAll string
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
Description string
Description for the VLAN policy.
DiscardMode string
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
Name string
VLAN policy name.
ObjectSwitchcontrollerVlanpolicyId string
an identifier for the resource with format {{name}}.
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.
UntaggedVlans []string
Untagged VLANs to be applied when using this VLAN policy.
Vlan string
Native VLAN to be applied when using this VLAN policy.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedVlans List<String>
Allowed VLANs to be applied when using this VLAN policy.
allowedVlansAll String
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
description String
Description for the VLAN policy.
discardMode String
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
name String
VLAN policy name.
objectSwitchcontrollerVlanpolicyId String
an identifier for the resource with format {{name}}.
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.
untaggedVlans List<String>
Untagged VLANs to be applied when using this VLAN policy.
vlan String
Native VLAN to be applied when using this VLAN policy.
adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedVlans string[]
Allowed VLANs to be applied when using this VLAN policy.
allowedVlansAll string
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
description string
Description for the VLAN policy.
discardMode string
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
name string
VLAN policy name.
objectSwitchcontrollerVlanpolicyId string
an identifier for the resource with format {{name}}.
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.
untaggedVlans string[]
Untagged VLANs to be applied when using this VLAN policy.
vlan string
Native VLAN to be applied when using this VLAN policy.
adom str
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowed_vlans Sequence[str]
Allowed VLANs to be applied when using this VLAN policy.
allowed_vlans_all str
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
description str
Description for the VLAN policy.
discard_mode str
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
name str
VLAN policy name.
object_switchcontroller_vlanpolicy_id str
an identifier for the resource with format {{name}}.
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.
untagged_vlans Sequence[str]
Untagged VLANs to be applied when using this VLAN policy.
vlan str
Native VLAN to be applied when using this VLAN policy.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedVlans List<String>
Allowed VLANs to be applied when using this VLAN policy.
allowedVlansAll String
Enable/disable all defined VLANs when using this VLAN policy. Valid values: disable, enable.
description String
Description for the VLAN policy.
discardMode String
Discard mode to be applied when using this VLAN policy. Valid values: none, all-untagged, all-tagged.
name String
VLAN policy name.
objectSwitchcontrollerVlanpolicyId String
an identifier for the resource with format {{name}}.
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.
untaggedVlans List<String>
Untagged VLANs to be applied when using this VLAN policy.
vlan String
Native VLAN to be applied when using this VLAN policy.

Import

ObjectSwitchController VlanPolicy can be imported using any of these accepted formats:

$ export “FORTIMANAGER_IMPORT_TABLE”=“true”

$ pulumi import fortimanager:index/objectSwitchcontrollerVlanpolicy:ObjectSwitchcontrollerVlanpolicy labelname {{name}}
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.