TrafficMirrorFilterIngressRuleArgs

data class TrafficMirrorFilterIngressRuleArgs(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<TrafficMirrorFilterIngressRuleArgs>

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

NOTE: Available in v1.141.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.TrafficMirrorFilterIngressRule;
import com.pulumi.alicloud.vpc.TrafficMirrorFilterIngressRuleArgs;
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 exampleTrafficMirrorFilter = new TrafficMirrorFilter("exampleTrafficMirrorFilter", TrafficMirrorFilterArgs.builder()
.trafficMirrorFilterName("example_value")
.build());
var exampleTrafficMirrorFilterIngressRule = new TrafficMirrorFilterIngressRule("exampleTrafficMirrorFilterIngressRule", TrafficMirrorFilterIngressRuleArgs.builder()
.trafficMirrorFilterId(exampleTrafficMirrorFilter.id())
.priority("1")
.ruleAction("accept")
.protocol("UDP")
.destinationCidrBlock("10.0.0.0/24")
.sourceCidrBlock("10.0.0.0/24")
.destinationPortRange("1/120")
.sourcePortRange("1/120")
.build());
}
}

Import

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

$ pulumi import alicloud:vpc/trafficMirrorFilterIngressRule:TrafficMirrorFilterIngressRule example <traffic_mirror_filter_id>:<traffic_mirror_filter_ingress_rule_id>

Constructors

Link copied to clipboard
fun TrafficMirrorFilterIngressRuleArgs(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(): TrafficMirrorFilterIngressRuleArgs

Properties

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

The destination CIDR block of the inbound traffic.

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

The destination CIDR block of the inbound 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 pre-check this request only. Default to: false

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 inbound traffic that needs to be mirrored. Valid values: ALL, ICMP, TCP, UDP.

Link copied to clipboard
val ruleAction: 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 sourceCidrBlock: Output<String>? = null

The source CIDR block of the inbound traffic.

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

The source port range of the inbound 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.