public static final class AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder extends Object
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder dstCidr(String dstCidr)
The destination CIDR block that is used to match packets.
The traffic classification rule matches the packets whose destination IP addresses fall within the specified destination CIDR block. If you do not set this parameter, packets are considered a match regardless of the DSCP value.
You can specify at most 50 traffic classification rules.
example:10.10.10.0/24
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder dstPortRange(List<Integer> dstPortRange)
The destination port range that is used to match packets. Valid values: -1 and 1 to 65535.
The traffic classification rule matches the packets whose destination ports fall within the destination port range. If you do not set this parameter, packets are considered a match regardless of the DSCP value.
You can specify at most two ports. Take note of the following rules:
You can specify at most 50 traffic classification rules.
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder matchDscp(Integer matchDscp)
The differentiated services code point (DSCP) value that is used to match packets. Valid values: 0 to 63.
The traffic classification rule matches the packets that contain the specified DSCP value. If you do not set this parameter, packets are considered a match regardless of the DSCP value.
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 specify at most 50 traffic classification rules.
example:5
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder protocol(String protocol)
The protocol that is used to match packets.
Valid values: HTTP, HTTPS, TCP, UDP, SSH, and Telnet. For more information, log on to the Cloud Enterprise Network (CEN) console.
You can specify at most 50 traffic classification rules.
example:HTTP
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder srcCidr(String srcCidr)
The source CIDR block that is used to match packets.
The traffic classification rule matches the packets whose source IP addresses fall within the specified source CIDR block. If you do not set this parameter, packets are considered a match regardless of the source IP address.
You can specify at most 50 traffic classification rules.
example:192.168.10.0/24
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder srcPortRange(List<Integer> srcPortRange)
The source port range that is used to match packets. Valid values: -1 and 1 to 65535.
The traffic classification rule matches the packets whose source ports fall within the source port range. If you do not set this parameter, packets are considered a match regardless of the source port.
You can specify at most two ports. Take note of the following rules:
You can specify at most 50 traffic classification rules.
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder trafficMatchRuleDescription(String trafficMatchRuleDescription)
The description of the traffic classification rule.
The description must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The description must start with a letter.
You can specify at most 50 traffic classification rules.
example:desctest
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules.Builder trafficMatchRuleName(String trafficMatchRuleName)
The name of the traffic classification rule.
The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.
You can specify at most 50 traffic classification rules.
example:nametest
public AddTraficMatchRuleToTrafficMarkingPolicyRequest.TrafficMatchRules build()
Copyright © 2025. All rights reserved.