public static final class AddTrafficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder extends Object
public AddTrafficMatchRuleToTrafficMarkingPolicyRequest.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 AddTrafficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder dstCidr(String dstCidr)
The destination CIDR block that is used to match packets.
Packets whose destination IP addresses fall into the specified destination CIDR block are considered a match. If you do not specify a destination CIDR block, packets are considered a match regardless of the destination IP address.
example:10.10.10.0/24
public AddTrafficMatchRuleToTrafficMarkingPolicyRequest.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 into the specified destination port range are considered a match. If you do not specify destination port range, packets are considered a match regardless of the destination port.
You can specify at most two port numbers for this parameter. Take note of the following rules:
public AddTrafficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder matchDscp(Integer matchDscp)
The Differentiated Services Code Point (DSCP) value that is used to match packets. Valid values: 0 to 63.
Packets that carry the specified DSCP value are considered a match. If you do not specify a DSCP value, packets are considered a match regardless of the DSCP value.
example: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.
5
public AddTrafficMatchRuleToTrafficMarkingPolicyRequest.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 Cloud Enterprise Network (CEN) console.
Some protocols use a specific port. Click to view protocols and ports.
HTTP
public AddTrafficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder srcCidr(String srcCidr)
The source CIDR block that is used to match packets.
Packets whose source IP addresses fall into the specified source CIDR block are considered a match. If you do not specify a source CIDR block, packets are considered a match regardless of the source IP address.
example:192.168.10.0/24
public AddTrafficMatchRuleToTrafficMarkingPolicyRequest.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 into the specified source port range are considered a match. If you do not specify a source port range, packets are considered a match regardless of the source port.
You can enter at most two port numbers. Take note of the following rules:
public AddTrafficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder trafficMatchRuleDescription(String trafficMatchRuleDescription)
The description of the 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 AddTrafficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder trafficMatchRuleName(String trafficMatchRuleName)
The name of the traffic classification rule.
The name is optional. If you enter a name, it must be 1 to 128 characters in length, and cannot start with http:// or https://.
example:nametest
public AddTrafficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules build()
Copyright © 2025. All rights reserved.