public static final class UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.Builder extends Object
public UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.Builder addressFamily(String addressFamily)
The address family. Valid values: You can set the value to IPv4 or IPv6, or leave the value empty.
example:IPv4
public UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.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:172.30.0.0/24
public UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.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 specified destination port range are considered a match. If you do not specify a destination port range, packets are considered a match regardless of the destination port.
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 UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.Builder matchDscp(Integer matchDscp)
The Differentiated Service Code Point (DSCP) value that is used to match packets. Valid values: 0 to 63.
Requests 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.
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:1
public UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.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:UDP
public UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.Builder srcCidr(String srcCidr)
The source CIDR block of packets. IPv4 and IPv6 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:10.128.32.0/19
public UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.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 specify this parameter, packets are considered a match regardless of the source port.
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 UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.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:test1
public UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules.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:Guangzhou Testing
public UpdateTrafficMarkingPolicyAttributeRequest.AddTrafficMatchRules build()
Copyright © 2025. All rights reserved.