public static final class CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder extends Object
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder addressFamily(String addressFamily)
The address family. You can set the value to IPv4 or IPv6, or leave the value empty.
example:IPv4
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder dstCidr(String dstCidr)
The destination CIDR block of packets. IPv4 and IPv6 addresses are supported.
Packets whose destination IP addresses fall into the specified destination CIDR block meet the traffic classification rule. If you do not specify a destination CIDR block, all packets meet the traffic classification rule.
You can create up to 50 traffic classification rules in each call You can specify a destination CIDR block for each traffic classification rule.
example:10.10.10.0/24
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder dstPortRange(List<Integer> dstPortRange)
The destination port range that is used to match packets. Valid values: -1 and 1 to 65535.
Packets whose destination ports fall within the destination port range meet the traffic classification rule. If you do not specify destination port range, all packets meet the traffic classification rule.
You can enter up to two port numbers. Take note of the following rules:
You can create up to 50 traffic classification rules in each call. You can specify a destination port range for each traffic classification rule.
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder matchDscp(Integer matchDscp)
The Differentiated Service Code Point (DSCP) value that is used to match packets. Valid values: 0 to 63.
Packets that carry the specified DSCP value meet the traffic classification rule. If you do not specify a DSCP value, all packets meet the traffic classification rule.
The DSCP value that you specify for this parameter is the DSCP value that packets carry before they are transmitted over the inter-region connection.
You can create up to 50 traffic classification rules in each call. You can specify a DSCP value for each traffic classification rule.
example:6
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder protocol(String protocol)
The protocol that is used to match packets.
Traffic classification rules support the following protocols: HTTP, HTTPS, TCP, UDP, SSH, and Telnet. For more information, log on to the CEN console.
Some protocols use a fixed port. Click to view the protocols and ports.
You can create up to 50 traffic classification rules in each call. You can specify a protocol for each traffic classification rule.
example:HTTP
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder srcCidr(String srcCidr)
The source CIDR block of packets. IPv6 and IPv4 addresses are supported.
Packets whose source IP addresses fall into the specified source CIDR block meet the traffic classification rule. If you do not specify a source CIDR block, all packets meet the traffic classification rule.
You can create up to 50 traffic classification rules in each call. You can specify a source CIDR block for each traffic classification rule.
example:192.168.10.0/24
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder srcPortRange(List<Integer> srcPortRange)
The source port range that is used to match packets. Valid values: -1 and 1 to 65535.
Packets whose source ports fall within the source port range meet the traffic classification rule. If you do not specify a source port range, all packets meet the traffic classification rule.
You can enter up to two port numbers. Take note of the following rules:
You can create up to 50 traffic classification rules in each call. You can specify a source port range for each traffic classification rule.
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder trafficMatchRuleDescription(String trafficMatchRuleDescription)
The description of the traffic classification rule.
You can create up to 50 traffic classification rules in each call. You can specify a description for each traffic classification rule.
This parameter is optional. If you enter a description, it must be 1 to 256 characters in length and cannot start with http:// or https://.
example:desctest
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules.Builder trafficMatchRuleName(String trafficMatchRuleName)
The name of the traffic classification rule.
You can create up to 50 traffic classification rules in each call. You can specify a name for each traffic classification rule.
The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://.
example:nametest
public CreateTrafficMarkingPolicyRequest.TrafficMatchRules build()
Copyright © 2025. All rights reserved.