TrafficMirrorFilterEgressRuleArgs

data class TrafficMirrorFilterEgressRuleArgs(val action: Output<String>? = null, val destinationCidrBlock: Output<String>? = null, val destinationPortRange: Output<String>? = null, val dryRun: Output<Boolean>? = null, val priority: Output<Int>? = null, val protocol: Output<String>? = null, val ruleAction: Output<String>? = null, val sourceCidrBlock: Output<String>? = null, val sourcePortRange: Output<String>? = null, val trafficMirrorFilterId: Output<String>? = null) : ConvertibleToJava<TrafficMirrorFilterEgressRuleArgs>

Provides a VPC Traffic Mirror Filter Egress Rule resource. For information about VPC Traffic Mirror Filter Egress Rule and how to use it, see What is Traffic Mirror Filter Egress Rule.

NOTE: Available since v1.140.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.TrafficMirrorFilter;
import com.pulumi.alicloud.vpc.TrafficMirrorFilterArgs;
import com.pulumi.alicloud.vpc.TrafficMirrorFilterEgressRule;
import com.pulumi.alicloud.vpc.TrafficMirrorFilterEgressRuleArgs;
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 example = new TrafficMirrorFilter("example", TrafficMirrorFilterArgs.builder()
.trafficMirrorFilterName("example_value")
.build());
var default_ = new TrafficMirrorFilterEgressRule("default", TrafficMirrorFilterEgressRuleArgs.builder()
.action("drop")
.priority("2")
.sourceCidrBlock("10.0.0.0/11")
.destinationCidrBlock("10.0.0.0/12")
.trafficMirrorFilterId(example.id())
.protocol("ALL")
.build());
}
}

Import

VPC Traffic Mirror Filter Egress Rule can be imported using the id, e.g.

$ pulumi import alicloud:vpc/trafficMirrorFilterEgressRule:TrafficMirrorFilterEgressRule example <traffic_mirror_filter_id>:<traffic_mirror_filter_egress_rule_id>

Constructors

Link copied to clipboard
fun TrafficMirrorFilterEgressRuleArgs(action: Output<String>? = null, destinationCidrBlock: Output<String>? = null, destinationPortRange: Output<String>? = null, dryRun: Output<Boolean>? = null, priority: Output<Int>? = null, protocol: Output<String>? = null, ruleAction: Output<String>? = null, sourceCidrBlock: Output<String>? = null, sourcePortRange: Output<String>? = null, trafficMirrorFilterId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): TrafficMirrorFilterEgressRuleArgs

Properties

Link copied to clipboard
val action: Output<String>? = null

The collection policy of the inbound rule. Valid values: accept or drop. accept: collects network traffic. drop: does not collect network traffic.

Link copied to clipboard
val destinationCidrBlock: Output<String>? = null

The destination CIDR block of the outbound traffic.

Link copied to clipboard
val destinationPortRange: Output<String>? = null

The destination CIDR block of the outbound traffic. Valid values: 1 to 65535. Separate the first port and last port with a forward slash (/), for example, 1/200 or 80/80. A value of -1/-1 indicates that all ports are available. Therefore, do not set the value to -1/-1. NOTE: When protocol is ICMP, this parameter is invalid.

Link copied to clipboard
val dryRun: Output<Boolean>? = null

Whether to PreCheck this request only. Value:

Link copied to clipboard
val priority: Output<Int>? = null

The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is 10, which indicates that you can configure at most 10 inbound rules for a filter.

Link copied to clipboard
val protocol: Output<String>? = null

The transport protocol used by outbound traffic that needs to be mirrored. Valid values: ALL, ICMP, TCP, UDP.

Link copied to clipboard
val ruleAction: Output<String>? = null

. Field 'rule_action' has been deprecated from provider version 1.211.0. New field 'action' instead.

Link copied to clipboard
val sourceCidrBlock: Output<String>? = null

The source CIDR block of the outbound traffic.

Link copied to clipboard
val sourcePortRange: Output<String>? = null

The source port range of the outbound traffic. Valid values: 1 to 65535. Separate the first port and last port with a forward slash (/), for example, 1/200 or 80/80. A value of -1/-1 indicates that all ports are available. Therefore, do not set the value to -1/-1. NOTE: When protocol is ICMP, this parameter is invalid.

Link copied to clipboard
val trafficMirrorFilterId: Output<String>? = null

The ID of the filter. The following arguments will be discarded. Please use new fields as soon as possible: