1. Packages
  2. Fortios
  3. API Docs
  4. switchcontroller
  5. Trafficpolicy
Fortios v0.0.5 published on Tuesday, Apr 9, 2024 by pulumiverse

fortios.switchcontroller.Trafficpolicy

Explore with Pulumi AI

fortios logo
Fortios v0.0.5 published on Tuesday, Apr 9, 2024 by pulumiverse

    Configure FortiSwitch traffic policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fortios from "@pulumiverse/fortios";
    
    const trname = new fortios.switchcontroller.Trafficpolicy("trname", {
        guaranteedBandwidth: 0,
        guaranteedBurst: 0,
        maximumBurst: 0,
        policerStatus: "enable",
        type: "ingress",
    });
    
    import pulumi
    import pulumiverse_fortios as fortios
    
    trname = fortios.switchcontroller.Trafficpolicy("trname",
        guaranteed_bandwidth=0,
        guaranteed_burst=0,
        maximum_burst=0,
        policer_status="enable",
        type="ingress")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/switchcontroller"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := switchcontroller.NewTrafficpolicy(ctx, "trname", &switchcontroller.TrafficpolicyArgs{
    			GuaranteedBandwidth: pulumi.Int(0),
    			GuaranteedBurst:     pulumi.Int(0),
    			MaximumBurst:        pulumi.Int(0),
    			PolicerStatus:       pulumi.String("enable"),
    			Type:                pulumi.String("ingress"),
    		})
    		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.Switchcontroller.Trafficpolicy("trname", new()
        {
            GuaranteedBandwidth = 0,
            GuaranteedBurst = 0,
            MaximumBurst = 0,
            PolicerStatus = "enable",
            Type = "ingress",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fortios.switchcontroller.Trafficpolicy;
    import com.pulumi.fortios.switchcontroller.TrafficpolicyArgs;
    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 Trafficpolicy("trname", TrafficpolicyArgs.builder()        
                .guaranteedBandwidth(0)
                .guaranteedBurst(0)
                .maximumBurst(0)
                .policerStatus("enable")
                .type("ingress")
                .build());
    
        }
    }
    
    resources:
      trname:
        type: fortios:switchcontroller:Trafficpolicy
        properties:
          guaranteedBandwidth: 0
          guaranteedBurst: 0
          maximumBurst: 0
          policerStatus: enable
          type: ingress
    

    Create Trafficpolicy Resource

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

    Constructor syntax

    new Trafficpolicy(name: string, args?: TrafficpolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Trafficpolicy(resource_name: str,
                      args: Optional[TrafficpolicyArgs] = None,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def Trafficpolicy(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cos: Optional[int] = None,
                      cos_queue: Optional[int] = None,
                      description: Optional[str] = None,
                      fosid: Optional[int] = None,
                      guaranteed_bandwidth: Optional[int] = None,
                      guaranteed_burst: Optional[int] = None,
                      maximum_burst: Optional[int] = None,
                      name: Optional[str] = None,
                      policer_status: Optional[str] = None,
                      type: Optional[str] = None,
                      vdomparam: Optional[str] = None)
    func NewTrafficpolicy(ctx *Context, name string, args *TrafficpolicyArgs, opts ...ResourceOption) (*Trafficpolicy, error)
    public Trafficpolicy(string name, TrafficpolicyArgs? args = null, CustomResourceOptions? opts = null)
    public Trafficpolicy(String name, TrafficpolicyArgs args)
    public Trafficpolicy(String name, TrafficpolicyArgs args, CustomResourceOptions options)
    
    type: fortios:switchcontroller:Trafficpolicy
    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 TrafficpolicyArgs
    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 TrafficpolicyArgs
    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 TrafficpolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TrafficpolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TrafficpolicyArgs
    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 trafficpolicyResource = new Fortios.Switchcontroller.Trafficpolicy("trafficpolicyResource", new()
    {
        Cos = 0,
        CosQueue = 0,
        Description = "string",
        Fosid = 0,
        GuaranteedBandwidth = 0,
        GuaranteedBurst = 0,
        MaximumBurst = 0,
        Name = "string",
        PolicerStatus = "string",
        Type = "string",
        Vdomparam = "string",
    });
    
    example, err := switchcontroller.NewTrafficpolicy(ctx, "trafficpolicyResource", &switchcontroller.TrafficpolicyArgs{
    	Cos:                 pulumi.Int(0),
    	CosQueue:            pulumi.Int(0),
    	Description:         pulumi.String("string"),
    	Fosid:               pulumi.Int(0),
    	GuaranteedBandwidth: pulumi.Int(0),
    	GuaranteedBurst:     pulumi.Int(0),
    	MaximumBurst:        pulumi.Int(0),
    	Name:                pulumi.String("string"),
    	PolicerStatus:       pulumi.String("string"),
    	Type:                pulumi.String("string"),
    	Vdomparam:           pulumi.String("string"),
    })
    
    var trafficpolicyResource = new Trafficpolicy("trafficpolicyResource", TrafficpolicyArgs.builder()
        .cos(0)
        .cosQueue(0)
        .description("string")
        .fosid(0)
        .guaranteedBandwidth(0)
        .guaranteedBurst(0)
        .maximumBurst(0)
        .name("string")
        .policerStatus("string")
        .type("string")
        .vdomparam("string")
        .build());
    
    trafficpolicy_resource = fortios.switchcontroller.Trafficpolicy("trafficpolicyResource",
        cos=0,
        cos_queue=0,
        description="string",
        fosid=0,
        guaranteed_bandwidth=0,
        guaranteed_burst=0,
        maximum_burst=0,
        name="string",
        policer_status="string",
        type="string",
        vdomparam="string")
    
    const trafficpolicyResource = new fortios.switchcontroller.Trafficpolicy("trafficpolicyResource", {
        cos: 0,
        cosQueue: 0,
        description: "string",
        fosid: 0,
        guaranteedBandwidth: 0,
        guaranteedBurst: 0,
        maximumBurst: 0,
        name: "string",
        policerStatus: "string",
        type: "string",
        vdomparam: "string",
    });
    
    type: fortios:switchcontroller:Trafficpolicy
    properties:
        cos: 0
        cosQueue: 0
        description: string
        fosid: 0
        guaranteedBandwidth: 0
        guaranteedBurst: 0
        maximumBurst: 0
        name: string
        policerStatus: string
        type: string
        vdomparam: string
    

    Trafficpolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Trafficpolicy resource accepts the following input properties:

    Cos int
    COS queue(0 - 7), or unset to disable.
    CosQueue int
    COS queue(0 - 7), or unset to disable.
    Description string
    Description of the traffic policy.
    Fosid int
    FSW Policer id
    GuaranteedBandwidth int
    Guaranteed bandwidth in kbps (max value = 524287000).
    GuaranteedBurst int
    Guaranteed burst size in bytes (max value = 4294967295).
    MaximumBurst int
    Maximum burst size in bytes (max value = 4294967295).
    Name string
    Traffic policy name.
    PolicerStatus string
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    Type string
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    Vdomparam string
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    Cos int
    COS queue(0 - 7), or unset to disable.
    CosQueue int
    COS queue(0 - 7), or unset to disable.
    Description string
    Description of the traffic policy.
    Fosid int
    FSW Policer id
    GuaranteedBandwidth int
    Guaranteed bandwidth in kbps (max value = 524287000).
    GuaranteedBurst int
    Guaranteed burst size in bytes (max value = 4294967295).
    MaximumBurst int
    Maximum burst size in bytes (max value = 4294967295).
    Name string
    Traffic policy name.
    PolicerStatus string
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    Type string
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    Vdomparam string
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    cos Integer
    COS queue(0 - 7), or unset to disable.
    cosQueue Integer
    COS queue(0 - 7), or unset to disable.
    description String
    Description of the traffic policy.
    fosid Integer
    FSW Policer id
    guaranteedBandwidth Integer
    Guaranteed bandwidth in kbps (max value = 524287000).
    guaranteedBurst Integer
    Guaranteed burst size in bytes (max value = 4294967295).
    maximumBurst Integer
    Maximum burst size in bytes (max value = 4294967295).
    name String
    Traffic policy name.
    policerStatus String
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    type String
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    vdomparam String
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    cos number
    COS queue(0 - 7), or unset to disable.
    cosQueue number
    COS queue(0 - 7), or unset to disable.
    description string
    Description of the traffic policy.
    fosid number
    FSW Policer id
    guaranteedBandwidth number
    Guaranteed bandwidth in kbps (max value = 524287000).
    guaranteedBurst number
    Guaranteed burst size in bytes (max value = 4294967295).
    maximumBurst number
    Maximum burst size in bytes (max value = 4294967295).
    name string
    Traffic policy name.
    policerStatus string
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    type string
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    vdomparam string
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    cos int
    COS queue(0 - 7), or unset to disable.
    cos_queue int
    COS queue(0 - 7), or unset to disable.
    description str
    Description of the traffic policy.
    fosid int
    FSW Policer id
    guaranteed_bandwidth int
    Guaranteed bandwidth in kbps (max value = 524287000).
    guaranteed_burst int
    Guaranteed burst size in bytes (max value = 4294967295).
    maximum_burst int
    Maximum burst size in bytes (max value = 4294967295).
    name str
    Traffic policy name.
    policer_status str
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    type str
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    vdomparam str
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    cos Number
    COS queue(0 - 7), or unset to disable.
    cosQueue Number
    COS queue(0 - 7), or unset to disable.
    description String
    Description of the traffic policy.
    fosid Number
    FSW Policer id
    guaranteedBandwidth Number
    Guaranteed bandwidth in kbps (max value = 524287000).
    guaranteedBurst Number
    Guaranteed burst size in bytes (max value = 4294967295).
    maximumBurst Number
    Maximum burst size in bytes (max value = 4294967295).
    name String
    Traffic policy name.
    policerStatus String
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    type String
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    vdomparam String
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.

    Outputs

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

    Get an existing Trafficpolicy 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?: TrafficpolicyState, opts?: CustomResourceOptions): Trafficpolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cos: Optional[int] = None,
            cos_queue: Optional[int] = None,
            description: Optional[str] = None,
            fosid: Optional[int] = None,
            guaranteed_bandwidth: Optional[int] = None,
            guaranteed_burst: Optional[int] = None,
            maximum_burst: Optional[int] = None,
            name: Optional[str] = None,
            policer_status: Optional[str] = None,
            type: Optional[str] = None,
            vdomparam: Optional[str] = None) -> Trafficpolicy
    func GetTrafficpolicy(ctx *Context, name string, id IDInput, state *TrafficpolicyState, opts ...ResourceOption) (*Trafficpolicy, error)
    public static Trafficpolicy Get(string name, Input<string> id, TrafficpolicyState? state, CustomResourceOptions? opts = null)
    public static Trafficpolicy get(String name, Output<String> id, TrafficpolicyState 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.
    The following state arguments are supported:
    Cos int
    COS queue(0 - 7), or unset to disable.
    CosQueue int
    COS queue(0 - 7), or unset to disable.
    Description string
    Description of the traffic policy.
    Fosid int
    FSW Policer id
    GuaranteedBandwidth int
    Guaranteed bandwidth in kbps (max value = 524287000).
    GuaranteedBurst int
    Guaranteed burst size in bytes (max value = 4294967295).
    MaximumBurst int
    Maximum burst size in bytes (max value = 4294967295).
    Name string
    Traffic policy name.
    PolicerStatus string
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    Type string
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    Vdomparam string
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    Cos int
    COS queue(0 - 7), or unset to disable.
    CosQueue int
    COS queue(0 - 7), or unset to disable.
    Description string
    Description of the traffic policy.
    Fosid int
    FSW Policer id
    GuaranteedBandwidth int
    Guaranteed bandwidth in kbps (max value = 524287000).
    GuaranteedBurst int
    Guaranteed burst size in bytes (max value = 4294967295).
    MaximumBurst int
    Maximum burst size in bytes (max value = 4294967295).
    Name string
    Traffic policy name.
    PolicerStatus string
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    Type string
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    Vdomparam string
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    cos Integer
    COS queue(0 - 7), or unset to disable.
    cosQueue Integer
    COS queue(0 - 7), or unset to disable.
    description String
    Description of the traffic policy.
    fosid Integer
    FSW Policer id
    guaranteedBandwidth Integer
    Guaranteed bandwidth in kbps (max value = 524287000).
    guaranteedBurst Integer
    Guaranteed burst size in bytes (max value = 4294967295).
    maximumBurst Integer
    Maximum burst size in bytes (max value = 4294967295).
    name String
    Traffic policy name.
    policerStatus String
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    type String
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    vdomparam String
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    cos number
    COS queue(0 - 7), or unset to disable.
    cosQueue number
    COS queue(0 - 7), or unset to disable.
    description string
    Description of the traffic policy.
    fosid number
    FSW Policer id
    guaranteedBandwidth number
    Guaranteed bandwidth in kbps (max value = 524287000).
    guaranteedBurst number
    Guaranteed burst size in bytes (max value = 4294967295).
    maximumBurst number
    Maximum burst size in bytes (max value = 4294967295).
    name string
    Traffic policy name.
    policerStatus string
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    type string
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    vdomparam string
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    cos int
    COS queue(0 - 7), or unset to disable.
    cos_queue int
    COS queue(0 - 7), or unset to disable.
    description str
    Description of the traffic policy.
    fosid int
    FSW Policer id
    guaranteed_bandwidth int
    Guaranteed bandwidth in kbps (max value = 524287000).
    guaranteed_burst int
    Guaranteed burst size in bytes (max value = 4294967295).
    maximum_burst int
    Maximum burst size in bytes (max value = 4294967295).
    name str
    Traffic policy name.
    policer_status str
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    type str
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    vdomparam str
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
    cos Number
    COS queue(0 - 7), or unset to disable.
    cosQueue Number
    COS queue(0 - 7), or unset to disable.
    description String
    Description of the traffic policy.
    fosid Number
    FSW Policer id
    guaranteedBandwidth Number
    Guaranteed bandwidth in kbps (max value = 524287000).
    guaranteedBurst Number
    Guaranteed burst size in bytes (max value = 4294967295).
    maximumBurst Number
    Maximum burst size in bytes (max value = 4294967295).
    name String
    Traffic policy name.
    policerStatus String
    Enable/disable policer config on the traffic policy. Valid values: enable, disable.
    type String
    Configure type of policy(ingress/egress). Valid values: ingress, egress.
    vdomparam String
    Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.

    Import

    SwitchController TrafficPolicy can be imported using any of these accepted formats:

    $ pulumi import fortios:switchcontroller/trafficpolicy:Trafficpolicy labelname {{name}}
    

    If you do not want to import arguments of block:

    $ export “FORTIOS_IMPORT_TABLE”=“false”

    $ pulumi import fortios:switchcontroller/trafficpolicy:Trafficpolicy 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.
    fortios logo
    Fortios v0.0.5 published on Tuesday, Apr 9, 2024 by pulumiverse