routeros.InterfaceEthernetSwitchRule
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";
const test = new routeros.InterfaceEthernetSwitchRule("test", {
copyToCpu: true,
ports: ["ether1"],
"switch": "switch1",
});
import pulumi
import pulumi_routeros as routeros
test = routeros.InterfaceEthernetSwitchRule("test",
copy_to_cpu=True,
ports=["ether1"],
switch="switch1")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := routeros.NewInterfaceEthernetSwitchRule(ctx, "test", &routeros.InterfaceEthernetSwitchRuleArgs{
CopyToCpu: pulumi.Bool(true),
Ports: pulumi.StringArray{
pulumi.String("ether1"),
},
Switch: pulumi.String("switch1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Routeros = Pulumi.Routeros;
return await Deployment.RunAsync(() =>
{
var test = new Routeros.InterfaceEthernetSwitchRule("test", new()
{
CopyToCpu = true,
Ports = new[]
{
"ether1",
},
Switch = "switch1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.InterfaceEthernetSwitchRule;
import com.pulumi.routeros.InterfaceEthernetSwitchRuleArgs;
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 test = new InterfaceEthernetSwitchRule("test", InterfaceEthernetSwitchRuleArgs.builder()
.copyToCpu(true)
.ports("ether1")
.switch_("switch1")
.build());
}
}
resources:
test:
type: routeros:InterfaceEthernetSwitchRule
properties:
copyToCpu: true
ports:
- ether1
switch: switch1
Create InterfaceEthernetSwitchRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InterfaceEthernetSwitchRule(name: string, args: InterfaceEthernetSwitchRuleArgs, opts?: CustomResourceOptions);
@overload
def InterfaceEthernetSwitchRule(resource_name: str,
args: InterfaceEthernetSwitchRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InterfaceEthernetSwitchRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
ports: Optional[Sequence[str]] = None,
switch: Optional[str] = None,
mirror_ports: Optional[Sequence[str]] = None,
redirect_to_cpu: Optional[bool] = None,
disabled: Optional[bool] = None,
dscp: Optional[float] = None,
dst_address: Optional[str] = None,
dst_address6: Optional[str] = None,
dst_mac_address: Optional[str] = None,
dst_port: Optional[float] = None,
flow_label: Optional[float] = None,
interface_ethernet_switch_rule_id: Optional[str] = None,
mac_protocol: Optional[str] = None,
mirror: Optional[bool] = None,
___id_: Optional[float] = None,
new_dst_ports: Optional[Sequence[str]] = None,
copy_to_cpu: Optional[bool] = None,
comment: Optional[str] = None,
new_vlan_id: Optional[float] = None,
protocol: Optional[str] = None,
rate: Optional[float] = None,
new_vlan_priority: Optional[float] = None,
src_address: Optional[str] = None,
src_address6: Optional[str] = None,
src_mac_address: Optional[str] = None,
src_port: Optional[float] = None,
___path_: Optional[str] = None,
traffic_class: Optional[float] = None,
vlan_header: Optional[str] = None,
vlan_id: Optional[float] = None,
vlan_priority: Optional[float] = None)
func NewInterfaceEthernetSwitchRule(ctx *Context, name string, args InterfaceEthernetSwitchRuleArgs, opts ...ResourceOption) (*InterfaceEthernetSwitchRule, error)
public InterfaceEthernetSwitchRule(string name, InterfaceEthernetSwitchRuleArgs args, CustomResourceOptions? opts = null)
public InterfaceEthernetSwitchRule(String name, InterfaceEthernetSwitchRuleArgs args)
public InterfaceEthernetSwitchRule(String name, InterfaceEthernetSwitchRuleArgs args, CustomResourceOptions options)
type: routeros:InterfaceEthernetSwitchRule
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 InterfaceEthernetSwitchRuleArgs
- 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 InterfaceEthernetSwitchRuleArgs
- 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 InterfaceEthernetSwitchRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InterfaceEthernetSwitchRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InterfaceEthernetSwitchRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
InterfaceEthernetSwitchRule 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 InterfaceEthernetSwitchRule resource accepts the following input properties:
- Ports List<string>
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- Switch string
- Matching switch group on which will the rule apply.
- Comment string
- Copy
To boolCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- Disabled bool
- Dscp double
- Matching DSCP field of the packet.
- Dst
Address string - Matching destination IP address and mask.
- Dst
Address6 string - Matching destination IPv6 address and mask.
- Dst
Mac stringAddress - Matching destination MAC address and mask.
- Dst
Port double - Matching destination protocol port number or range.
- Flow
Label double - Matching IPv6 flow label.
- Interface
Ethernet stringSwitch Rule Id - The ID of this resource.
- Mac
Protocol string - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- Mirror bool
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- Mirror
Ports List<string> - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- New
Dst List<string>Ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- New
Vlan doubleId - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- New
Vlan doublePriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- Protocol string
- Matching particular IP protocol specified by protocol name or number.
- Rate double
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- Redirect
To boolCpu - Changes the destination port of a matching packet to the switch CPU.
- Src
Address string - Matching source IP address and mask.
- Src
Address6 string - Matching source IPv6 address and mask.
- Src
Mac stringAddress - Matching source MAC address and mask.
- Src
Port double - Matching source protocol port number or range.
- Traffic
Class double - Matching IPv6 traffic class.
- Vlan
Header string - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- Vlan
Id double - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- Vlan
Priority double - Matching VLAN priority (priority code point).
- ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- Ports []string
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- Switch string
- Matching switch group on which will the rule apply.
- Comment string
- Copy
To boolCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- Disabled bool
- Dscp float64
- Matching DSCP field of the packet.
- Dst
Address string - Matching destination IP address and mask.
- Dst
Address6 string - Matching destination IPv6 address and mask.
- Dst
Mac stringAddress - Matching destination MAC address and mask.
- Dst
Port float64 - Matching destination protocol port number or range.
- Flow
Label float64 - Matching IPv6 flow label.
- Interface
Ethernet stringSwitch Rule Id - The ID of this resource.
- Mac
Protocol string - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- Mirror bool
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- Mirror
Ports []string - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- New
Dst []stringPorts - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- New
Vlan float64Id - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- New
Vlan float64Priority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- Protocol string
- Matching particular IP protocol specified by protocol name or number.
- Rate float64
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- Redirect
To boolCpu - Changes the destination port of a matching packet to the switch CPU.
- Src
Address string - Matching source IP address and mask.
- Src
Address6 string - Matching source IPv6 address and mask.
- Src
Mac stringAddress - Matching source MAC address and mask.
- Src
Port float64 - Matching source protocol port number or range.
- Traffic
Class float64 - Matching IPv6 traffic class.
- Vlan
Header string - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- Vlan
Id float64 - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- Vlan
Priority float64 - Matching VLAN priority (priority code point).
- ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ports List<String>
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- switch_ String
- Matching switch group on which will the rule apply.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- comment String
- copy
To BooleanCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- disabled Boolean
- dscp Double
- Matching DSCP field of the packet.
- dst
Address String - Matching destination IP address and mask.
- dst
Address6 String - Matching destination IPv6 address and mask.
- dst
Mac StringAddress - Matching destination MAC address and mask.
- dst
Port Double - Matching destination protocol port number or range.
- flow
Label Double - Matching IPv6 flow label.
- interface
Ethernet StringSwitch Rule Id - The ID of this resource.
- mac
Protocol String - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- mirror Boolean
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- mirror
Ports List<String> - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- new
Dst List<String>Ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- new
Vlan DoubleId - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- new
Vlan DoublePriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- protocol String
- Matching particular IP protocol specified by protocol name or number.
- rate Double
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- redirect
To BooleanCpu - Changes the destination port of a matching packet to the switch CPU.
- src
Address String - Matching source IP address and mask.
- src
Address6 String - Matching source IPv6 address and mask.
- src
Mac StringAddress - Matching source MAC address and mask.
- src
Port Double - Matching source protocol port number or range.
- traffic
Class Double - Matching IPv6 traffic class.
- vlan
Header String - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Id Double - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Priority Double - Matching VLAN priority (priority code point).
- ports string[]
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- switch string
- Matching switch group on which will the rule apply.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- comment string
- copy
To booleanCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- disabled boolean
- dscp number
- Matching DSCP field of the packet.
- dst
Address string - Matching destination IP address and mask.
- dst
Address6 string - Matching destination IPv6 address and mask.
- dst
Mac stringAddress - Matching destination MAC address and mask.
- dst
Port number - Matching destination protocol port number or range.
- flow
Label number - Matching IPv6 flow label.
- interface
Ethernet stringSwitch Rule Id - The ID of this resource.
- mac
Protocol string - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- mirror boolean
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- mirror
Ports string[] - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- new
Dst string[]Ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- new
Vlan numberId - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- new
Vlan numberPriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- protocol string
- Matching particular IP protocol specified by protocol name or number.
- rate number
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- redirect
To booleanCpu - Changes the destination port of a matching packet to the switch CPU.
- src
Address string - Matching source IP address and mask.
- src
Address6 string - Matching source IPv6 address and mask.
- src
Mac stringAddress - Matching source MAC address and mask.
- src
Port number - Matching source protocol port number or range.
- traffic
Class number - Matching IPv6 traffic class.
- vlan
Header string - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Id number - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Priority number - Matching VLAN priority (priority code point).
- ports Sequence[str]
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- switch str
- Matching switch group on which will the rule apply.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- comment str
- copy_
to_ boolcpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- disabled bool
- dscp float
- Matching DSCP field of the packet.
- dst_
address str - Matching destination IP address and mask.
- dst_
address6 str - Matching destination IPv6 address and mask.
- dst_
mac_ straddress - Matching destination MAC address and mask.
- dst_
port float - Matching destination protocol port number or range.
- flow_
label float - Matching IPv6 flow label.
- interface_
ethernet_ strswitch_ rule_ id - The ID of this resource.
- mac_
protocol str - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- mirror bool
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- mirror_
ports Sequence[str] - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- new_
dst_ Sequence[str]ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- new_
vlan_ floatid - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- new_
vlan_ floatpriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- protocol str
- Matching particular IP protocol specified by protocol name or number.
- rate float
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- redirect_
to_ boolcpu - Changes the destination port of a matching packet to the switch CPU.
- src_
address str - Matching source IP address and mask.
- src_
address6 str - Matching source IPv6 address and mask.
- src_
mac_ straddress - Matching source MAC address and mask.
- src_
port float - Matching source protocol port number or range.
- traffic_
class float - Matching IPv6 traffic class.
- vlan_
header str - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan_
id float - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan_
priority float - Matching VLAN priority (priority code point).
- ports List<String>
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- switch String
- Matching switch group on which will the rule apply.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- comment String
- copy
To BooleanCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- disabled Boolean
- dscp Number
- Matching DSCP field of the packet.
- dst
Address String - Matching destination IP address and mask.
- dst
Address6 String - Matching destination IPv6 address and mask.
- dst
Mac StringAddress - Matching destination MAC address and mask.
- dst
Port Number - Matching destination protocol port number or range.
- flow
Label Number - Matching IPv6 flow label.
- interface
Ethernet StringSwitch Rule Id - The ID of this resource.
- mac
Protocol String - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- mirror Boolean
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- mirror
Ports List<String> - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- new
Dst List<String>Ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- new
Vlan NumberId - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- new
Vlan NumberPriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- protocol String
- Matching particular IP protocol specified by protocol name or number.
- rate Number
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- redirect
To BooleanCpu - Changes the destination port of a matching packet to the switch CPU.
- src
Address String - Matching source IP address and mask.
- src
Address6 String - Matching source IPv6 address and mask.
- src
Mac StringAddress - Matching source MAC address and mask.
- src
Port Number - Matching source protocol port number or range.
- traffic
Class Number - Matching IPv6 traffic class.
- vlan
Header String - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Id Number - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Priority Number - Matching VLAN priority (priority code point).
Outputs
All input properties are implicitly available as output properties. Additionally, the InterfaceEthernetSwitchRule resource produces the following output properties:
Look up Existing InterfaceEthernetSwitchRule Resource
Get an existing InterfaceEthernetSwitchRule 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?: InterfaceEthernetSwitchRuleState, opts?: CustomResourceOptions): InterfaceEthernetSwitchRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
comment: Optional[str] = None,
copy_to_cpu: Optional[bool] = None,
disabled: Optional[bool] = None,
dscp: Optional[float] = None,
dst_address: Optional[str] = None,
dst_address6: Optional[str] = None,
dst_mac_address: Optional[str] = None,
dst_port: Optional[float] = None,
dynamic: Optional[bool] = None,
flow_label: Optional[float] = None,
interface_ethernet_switch_rule_id: Optional[str] = None,
invalid: Optional[bool] = None,
mac_protocol: Optional[str] = None,
mirror: Optional[bool] = None,
mirror_ports: Optional[Sequence[str]] = None,
new_dst_ports: Optional[Sequence[str]] = None,
new_vlan_id: Optional[float] = None,
new_vlan_priority: Optional[float] = None,
ports: Optional[Sequence[str]] = None,
protocol: Optional[str] = None,
rate: Optional[float] = None,
redirect_to_cpu: Optional[bool] = None,
src_address: Optional[str] = None,
src_address6: Optional[str] = None,
src_mac_address: Optional[str] = None,
src_port: Optional[float] = None,
switch: Optional[str] = None,
traffic_class: Optional[float] = None,
vlan_header: Optional[str] = None,
vlan_id: Optional[float] = None,
vlan_priority: Optional[float] = None) -> InterfaceEthernetSwitchRule
func GetInterfaceEthernetSwitchRule(ctx *Context, name string, id IDInput, state *InterfaceEthernetSwitchRuleState, opts ...ResourceOption) (*InterfaceEthernetSwitchRule, error)
public static InterfaceEthernetSwitchRule Get(string name, Input<string> id, InterfaceEthernetSwitchRuleState? state, CustomResourceOptions? opts = null)
public static InterfaceEthernetSwitchRule get(String name, Output<String> id, InterfaceEthernetSwitchRuleState state, CustomResourceOptions options)
resources: _: type: routeros:InterfaceEthernetSwitchRule 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.
- Comment string
- Copy
To boolCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- Disabled bool
- Dscp double
- Matching DSCP field of the packet.
- Dst
Address string - Matching destination IP address and mask.
- Dst
Address6 string - Matching destination IPv6 address and mask.
- Dst
Mac stringAddress - Matching destination MAC address and mask.
- Dst
Port double - Matching destination protocol port number or range.
- Dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- Flow
Label double - Matching IPv6 flow label.
- Interface
Ethernet stringSwitch Rule Id - The ID of this resource.
- Invalid bool
- Mac
Protocol string - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- Mirror bool
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- Mirror
Ports List<string> - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- New
Dst List<string>Ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- New
Vlan doubleId - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- New
Vlan doublePriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- Ports List<string>
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- Protocol string
- Matching particular IP protocol specified by protocol name or number.
- Rate double
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- Redirect
To boolCpu - Changes the destination port of a matching packet to the switch CPU.
- Src
Address string - Matching source IP address and mask.
- Src
Address6 string - Matching source IPv6 address and mask.
- Src
Mac stringAddress - Matching source MAC address and mask.
- Src
Port double - Matching source protocol port number or range.
- Switch string
- Matching switch group on which will the rule apply.
- Traffic
Class double - Matching IPv6 traffic class.
- Vlan
Header string - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- Vlan
Id double - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- Vlan
Priority double - Matching VLAN priority (priority code point).
- ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- Comment string
- Copy
To boolCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- Disabled bool
- Dscp float64
- Matching DSCP field of the packet.
- Dst
Address string - Matching destination IP address and mask.
- Dst
Address6 string - Matching destination IPv6 address and mask.
- Dst
Mac stringAddress - Matching destination MAC address and mask.
- Dst
Port float64 - Matching destination protocol port number or range.
- Dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- Flow
Label float64 - Matching IPv6 flow label.
- Interface
Ethernet stringSwitch Rule Id - The ID of this resource.
- Invalid bool
- Mac
Protocol string - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- Mirror bool
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- Mirror
Ports []string - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- New
Dst []stringPorts - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- New
Vlan float64Id - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- New
Vlan float64Priority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- Ports []string
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- Protocol string
- Matching particular IP protocol specified by protocol name or number.
- Rate float64
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- Redirect
To boolCpu - Changes the destination port of a matching packet to the switch CPU.
- Src
Address string - Matching source IP address and mask.
- Src
Address6 string - Matching source IPv6 address and mask.
- Src
Mac stringAddress - Matching source MAC address and mask.
- Src
Port float64 - Matching source protocol port number or range.
- Switch string
- Matching switch group on which will the rule apply.
- Traffic
Class float64 - Matching IPv6 traffic class.
- Vlan
Header string - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- Vlan
Id float64 - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- Vlan
Priority float64 - Matching VLAN priority (priority code point).
- ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- comment String
- copy
To BooleanCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- disabled Boolean
- dscp Double
- Matching DSCP field of the packet.
- dst
Address String - Matching destination IP address and mask.
- dst
Address6 String - Matching destination IPv6 address and mask.
- dst
Mac StringAddress - Matching destination MAC address and mask.
- dst
Port Double - Matching destination protocol port number or range.
- dynamic Boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- flow
Label Double - Matching IPv6 flow label.
- interface
Ethernet StringSwitch Rule Id - The ID of this resource.
- invalid Boolean
- mac
Protocol String - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- mirror Boolean
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- mirror
Ports List<String> - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- new
Dst List<String>Ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- new
Vlan DoubleId - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- new
Vlan DoublePriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- ports List<String>
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- protocol String
- Matching particular IP protocol specified by protocol name or number.
- rate Double
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- redirect
To BooleanCpu - Changes the destination port of a matching packet to the switch CPU.
- src
Address String - Matching source IP address and mask.
- src
Address6 String - Matching source IPv6 address and mask.
- src
Mac StringAddress - Matching source MAC address and mask.
- src
Port Double - Matching source protocol port number or range.
- switch_ String
- Matching switch group on which will the rule apply.
- traffic
Class Double - Matching IPv6 traffic class.
- vlan
Header String - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Id Double - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Priority Double - Matching VLAN priority (priority code point).
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- comment string
- copy
To booleanCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- disabled boolean
- dscp number
- Matching DSCP field of the packet.
- dst
Address string - Matching destination IP address and mask.
- dst
Address6 string - Matching destination IPv6 address and mask.
- dst
Mac stringAddress - Matching destination MAC address and mask.
- dst
Port number - Matching destination protocol port number or range.
- dynamic boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- flow
Label number - Matching IPv6 flow label.
- interface
Ethernet stringSwitch Rule Id - The ID of this resource.
- invalid boolean
- mac
Protocol string - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- mirror boolean
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- mirror
Ports string[] - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- new
Dst string[]Ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- new
Vlan numberId - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- new
Vlan numberPriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- ports string[]
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- protocol string
- Matching particular IP protocol specified by protocol name or number.
- rate number
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- redirect
To booleanCpu - Changes the destination port of a matching packet to the switch CPU.
- src
Address string - Matching source IP address and mask.
- src
Address6 string - Matching source IPv6 address and mask.
- src
Mac stringAddress - Matching source MAC address and mask.
- src
Port number - Matching source protocol port number or range.
- switch string
- Matching switch group on which will the rule apply.
- traffic
Class number - Matching IPv6 traffic class.
- vlan
Header string - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Id number - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Priority number - Matching VLAN priority (priority code point).
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- comment str
- copy_
to_ boolcpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- disabled bool
- dscp float
- Matching DSCP field of the packet.
- dst_
address str - Matching destination IP address and mask.
- dst_
address6 str - Matching destination IPv6 address and mask.
- dst_
mac_ straddress - Matching destination MAC address and mask.
- dst_
port float - Matching destination protocol port number or range.
- dynamic bool
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- flow_
label float - Matching IPv6 flow label.
- interface_
ethernet_ strswitch_ rule_ id - The ID of this resource.
- invalid bool
- mac_
protocol str - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- mirror bool
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- mirror_
ports Sequence[str] - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- new_
dst_ Sequence[str]ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- new_
vlan_ floatid - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- new_
vlan_ floatpriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- ports Sequence[str]
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- protocol str
- Matching particular IP protocol specified by protocol name or number.
- rate float
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- redirect_
to_ boolcpu - Changes the destination port of a matching packet to the switch CPU.
- src_
address str - Matching source IP address and mask.
- src_
address6 str - Matching source IPv6 address and mask.
- src_
mac_ straddress - Matching source MAC address and mask.
- src_
port float - Matching source protocol port number or range.
- switch str
- Matching switch group on which will the rule apply.
- traffic_
class float - Matching IPv6 traffic class.
- vlan_
header str - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan_
id float - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan_
priority float - Matching VLAN priority (priority code point).
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- comment String
- copy
To BooleanCpu - Whether to send a frame copy to switch CPU port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- disabled Boolean
- dscp Number
- Matching DSCP field of the packet.
- dst
Address String - Matching destination IP address and mask.
- dst
Address6 String - Matching destination IPv6 address and mask.
- dst
Mac StringAddress - Matching destination MAC address and mask.
- dst
Port Number - Matching destination protocol port number or range.
- dynamic Boolean
- Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
- flow
Label Number - Matching IPv6 flow label.
- interface
Ethernet StringSwitch Rule Id - The ID of this resource.
- invalid Boolean
- mac
Protocol String - Matching particular MAC protocol specified by protocol name or number (skips VLAN tags if any).
- mirror Boolean
- Whether to send a frame copy to mirror-target port from a frame with matching MAC destination address (matching destination or source address for CRS3xx series switches).
- mirror
Ports List<String> - Selects multiple mirroring target ports, only available on 88E6393X switch chip. Matched packets in the ACL rule will be copied and sent to selected ports.
- new
Dst List<String>Ports - Changes the destination port as specified, multiple ports allowed, including a switch CPU port. An empty setting will drop the packet. When the parameter is not used, the packet will be accepted.
- new
Vlan NumberId - Changes the VLAN ID to the specified value or adds a new VLAN tag if one was not already present (the property only applies to the Atheros8316, and 88E6393X switch chips).
- new
Vlan NumberPriority - Changes the VLAN priority field (priority code point, the property only applies to Atheros8327, QCA8337 and Atheros8316 switch chips).
- ports List<String>
- Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.
- protocol String
- Matching particular IP protocol specified by protocol name or number.
- rate Number
- Sets ingress traffic limitation (bits per second) for matched traffic, can only be applied to the first 32 rule slots (the property only applies to Atheros8327/QCA8337 switch chips).
- redirect
To BooleanCpu - Changes the destination port of a matching packet to the switch CPU.
- src
Address String - Matching source IP address and mask.
- src
Address6 String - Matching source IPv6 address and mask.
- src
Mac StringAddress - Matching source MAC address and mask.
- src
Port Number - Matching source protocol port number or range.
- switch String
- Matching switch group on which will the rule apply.
- traffic
Class Number - Matching IPv6 traffic class.
- vlan
Header String - Matching VLAN header, whether the VLAN header is present or not (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Id Number - Matching VLAN ID (the property only applies to the Atheros8316, Atheros8327, QCA8337, 88E6393X switch chips).
- vlan
Priority Number - Matching VLAN priority (priority code point).
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/interface/ethernet/switch/rule get [print show-ids]]
$ pulumi import routeros:index/interfaceEthernetSwitchRule:InterfaceEthernetSwitchRule test *0
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- routeros terraform-routeros/terraform-provider-routeros
- License
- Notes
- This Pulumi package is based on the
routeros
Terraform Provider.