public static final class AddControlPolicyRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
AddControlPolicyRequest.Builder |
aclAction(String aclAction)
The action that Cloud Firewall performs on the traffic.
|
AddControlPolicyRequest.Builder |
applicationName(String applicationName)
The application type supported by the access control policy.
|
AddControlPolicyRequest.Builder |
applicationNameList(List<String> applicationNameList)
The application types supported by the access control policy.
|
AddControlPolicyRequest |
build() |
AddControlPolicyRequest.Builder |
description(String description)
The description of the access control policy.
|
AddControlPolicyRequest.Builder |
destination(String destination)
The destination address in the access control policy.
|
AddControlPolicyRequest.Builder |
destinationType(String destinationType)
The type of the destination address in the access control policy.
|
AddControlPolicyRequest.Builder |
destPort(String destPort)
The destination port in the access control policy.
|
AddControlPolicyRequest.Builder |
destPortGroup(String destPortGroup)
The name of the destination port address book in the access control policy.
|
AddControlPolicyRequest.Builder |
destPortType(String destPortType)
The type of the destination port in the access control policy.
|
AddControlPolicyRequest.Builder |
direction(String direction)
The direction of the traffic to which the access control policy applies.
|
AddControlPolicyRequest.Builder |
domainResolveType(String domainResolveType)
The domain name resolution method of the access control policy.
|
AddControlPolicyRequest.Builder |
endTime(Long endTime)
The time when the access control policy stops taking effect.
|
AddControlPolicyRequest.Builder |
ipVersion(String ipVersion)
The IP version supported by the access control policy.
|
AddControlPolicyRequest.Builder |
lang(String lang)
The language of the content within the request and response.
|
AddControlPolicyRequest.Builder |
newOrder(String newOrder)
The priority of the access control policy.
|
AddControlPolicyRequest.Builder |
proto(String proto)
The protocol type supported by the access control policy.
|
AddControlPolicyRequest.Builder |
release(String release)
Specifies whether to enable the access control policy.
|
AddControlPolicyRequest.Builder |
repeatDays(List<Long> repeatDays)
The days of a week or of a month on which the access control policy takes effect.
|
AddControlPolicyRequest.Builder |
repeatEndTime(String repeatEndTime)
The point in time when the recurrence ends.
|
AddControlPolicyRequest.Builder |
repeatStartTime(String repeatStartTime)
The point in time when the recurrence starts.
|
AddControlPolicyRequest.Builder |
repeatType(String repeatType)
The recurrence type for the access control policy to take effect.
|
AddControlPolicyRequest.Builder |
source(String source)
The source address in the access control policy.
|
AddControlPolicyRequest.Builder |
sourceIp(String sourceIp)
The source IP address of the request.
|
AddControlPolicyRequest.Builder |
sourceType(String sourceType)
The type of the source address in the access control policy.
|
AddControlPolicyRequest.Builder |
startTime(Long startTime)
The time when the access control policy starts to take effect.
|
public AddControlPolicyRequest.Builder aclAction(String aclAction)
The action that Cloud Firewall performs on the traffic. Valid values:
This parameter is required.
example:accept
public AddControlPolicyRequest.Builder applicationName(String applicationName)
The application type supported by the access control policy. Valid values:
example:The value of this parameter is based on the value of Proto. If Proto is set to TCP, you can set ApplicationName to any valid value. If Proto is set to UDP, ICMP, or ANY, you can set ApplicationName only to ANY. You must specify at least one of the ApplicationNameList and ApplicationName parameters.
ANY
public AddControlPolicyRequest.Builder applicationNameList(List<String> applicationNameList)
The application types supported by the access control policy.
public AddControlPolicyRequest.Builder description(String description)
The description of the access control policy.
This parameter is required.
example:Allows traffic
public AddControlPolicyRequest.Builder destPort(String destPort)
The destination port in the access control policy. Valid values:
If Proto is set to ICMP, access control does not take effect on the destination port.
If DestPortType is set to group, you do not need to specify the destination port number. All ports on which the access control policy takes effect are included in the destination port address book.
80
public AddControlPolicyRequest.Builder destPortGroup(String destPortGroup)
The name of the destination port address book in the access control policy.
example:If DestPortType is set to group, you must specify the name of the destination port address book.
my_port_group
public AddControlPolicyRequest.Builder destPortType(String destPortType)
The type of the destination port in the access control policy.
Valid values:
port
public AddControlPolicyRequest.Builder destination(String destination)
The destination address in the access control policy.
Valid values:
If DestinationType is set to net, the value of this parameter is a CIDR block.
Example: 1.2.XX.XX/24
If DestinationType is set to group, the value of this parameter is an address book name.
Example: db_group
If DestinationType is set to domain, the value of this parameter is a domain name.
Example: *.aliyuncs.com
If DestinationType is set to location, the value of this parameter is a location.
Example: ["BJ11", "ZB"]
This parameter is required.
example:192.0.XX.XX/24
public AddControlPolicyRequest.Builder destinationType(String destinationType)
The type of the destination address in the access control policy. Valid values:
This parameter is required.
example:net
public AddControlPolicyRequest.Builder direction(String direction)
The direction of the traffic to which the access control policy applies. Valid values:
This parameter is required.
example:in
public AddControlPolicyRequest.Builder domainResolveType(String domainResolveType)
The domain name resolution method of the access control policy. Valid values:
FQDN
public AddControlPolicyRequest.Builder endTime(Long endTime)
The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
example:If you set RepeatType to Permanent, leave this parameter empty. If you set RepeatType to None, Daily, Weekly, or Monthly, you must specify this parameter.
1694764800
public AddControlPolicyRequest.Builder ipVersion(String ipVersion)
The IP version supported by the access control policy.
Valid values:
6
public AddControlPolicyRequest.Builder lang(String lang)
The language of the content within the request and response. Valid values:
zh
public AddControlPolicyRequest.Builder newOrder(String newOrder)
The priority of the access control policy. The priority value starts from 1. A smaller priority value indicates a higher priority.
This parameter is required.
example:1
public AddControlPolicyRequest.Builder proto(String proto)
The protocol type supported by the access control policy. Valid values:
This parameter is required.
example:ANY
public AddControlPolicyRequest.Builder release(String release)
Specifies whether to enable the access control policy. By default, an access control policy is enabled after the policy is created. Valid values:
true
public AddControlPolicyRequest.Builder repeatDays(List<Long> repeatDays)
The days of a week or of a month on which the access control policy takes effect.
Permanent, None, or Daily, leave this parameter empty. Example: [].If you set RepeatType to Weekly, the fields in the value of this parameter cannot be repeated.
Monthly, you must specify this parameter. Example: [1, 31].If you set RepeatType to Monthly, the fields in the value of this parameter cannot be repeated.
public AddControlPolicyRequest.Builder repeatEndTime(String repeatEndTime)
The point in time when the recurrence ends. Example: 23:30. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.
example:If you set RepeatType to Permanent or None, leave this parameter empty. If you set RepeatType to Daily, Weekly, or Monthly, you must specify this parameter.
23:30
public AddControlPolicyRequest.Builder repeatStartTime(String repeatStartTime)
The point in time when the recurrence starts. Example: 08:00. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
example:If you set RepeatType to Permanent or None, leave this parameter empty. If you set RepeatType to Daily, Weekly, or Monthly, you must specify this parameter.
08:00
public AddControlPolicyRequest.Builder repeatType(String repeatType)
The recurrence type for the access control policy to take effect. Valid values:
Permanent
public AddControlPolicyRequest.Builder source(String source)
The source address in the access control policy. Valid values:
If SourceType is set to net, the value of this parameter is a CIDR block.
Example: 1.1.XX.XX/24
If SourceType is set to group, the value of this parameter is an address book name.
Example: db_group
If SourceType is set to location, the value of this parameter is a location.
Example: ["BJ11", "ZB"]
This parameter is required.
example:192.0.XX.XX/24
public AddControlPolicyRequest.Builder sourceIp(String sourceIp)
The source IP address of the request.
example:192.0.XX.XX
public AddControlPolicyRequest.Builder sourceType(String sourceType)
The type of the source address in the access control policy. Valid values:
This parameter is required.
example:net
public AddControlPolicyRequest.Builder startTime(Long startTime)
The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
example:If you set RepeatType to Permanent, leave this parameter empty. If you set RepeatType to None, Daily, Weekly, or Monthly, you must specify this parameter.
1694761200
public AddControlPolicyRequest build()
Copyright © 2026. All rights reserved.