ModifyControlPolicy
Modifies the configurations of an access control policy.
Operation description
This operation is generally used to modify the configurations of an access control policy that allows, denies, or monitors traffic passing through Cloud Firewall.
QPS limit
The queries per second (QPS) limit for a single user is 10. If the limit is exceeded, API calls are throttled, which may affect your services. Call this operation at a reasonable frequency.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-cloudfirewall:ModifyControlPolicy |
update |
*ControlPolicy
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The idempotency token. |
ddadxefexxxx |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. |
|
Lang
deprecated
|
string |
No |
The language of the request and response. Valid values:
|
zh |
| AclAction |
string |
No |
The action that Cloud Firewall performs on traffic in the access control policy. Valid values:
|
accept |
ApplicationName
deprecated
|
string |
No |
The application type supported by the access control policy. Valid values:
Note
ANY indicates that the policy applies to all application types. Note
You must specify either ApplicationNameList or ApplicationName. They cannot be both empty. If both are specified, ApplicationNameList takes precedence. |
HTTP |
| Description |
string |
No |
The description of the access control policy. |
test |
| DestPort |
string |
No |
The destination port for traffic in the access control policy. |
80 |
| Destination |
string |
No |
The destination address in the access control policy.
|
192.0.XX.XX/24 |
| DestinationType |
string |
No |
The type of the destination address in the access control policy. Valid values:
|
net |
| Direction |
string |
No |
The traffic direction of the access control policy. Valid values:
|
in |
| Proto |
string |
No |
The protocol type of traffic in the access control policy. Valid values:
Note
ANY indicates that the policy applies to all protocol types. Note
If the traffic direction is outbound and the destination address is a threat intelligence address book or cloud service address book of the domain name type, you can set this parameter to TCP or ANY. If you select TCP, you can set the application to HTTP, HTTPS, SMTP, SMTPS, or SSL. If you select ANY, you can set the application to ANY. |
TCP |
| Source |
string |
No |
The source address in the access control policy.
|
192.0.XX.XX/24 |
| AclUuid |
string |
Yes |
The UUID of the access control policy. Note
To modify an access control policy, you must provide its UUID. You can call the DescribeControlPolicy operation to obtain the UUID. |
00281255-d220-4db1-8f4f-c4df221ad84c |
| SourceType |
string |
No |
The type of the source address in the access control policy. Valid values:
|
net |
| DestPortType |
string |
No |
The type of the destination port for traffic in the access control policy. Valid values:
|
port |
| DestPortGroup |
string |
No |
The name of the destination port address book for traffic in the access control policy. |
my_port_group |
| Release |
string |
No |
The status of the access control policy. Valid values:
|
true |
| ApplicationNameList |
array |
No |
The list of application names. Note
You must specify either ApplicationNameList or ApplicationName. They cannot be both empty. If both are specified, ApplicationNameList takes precedence. |
|
|
string |
No |
The application name. |
HTTP |
|
| RepeatType |
string |
No |
The recurrence type of the Policy Validity Period for the access control policy. Valid values:
Valid values:
|
Permanent |
| RepeatDays |
array |
No |
The collection of recurrence days for the Policy Validity Period of the access control policy.
Note
When the RepeatType Settings is Weekly, the values in RepeatDays cannot be duplicate.
Note
When the RepeatType Settings is Monthly, the values in RepeatDays cannot be duplicate. |
|
|
integer |
No |
The recurrence day for the Policy Validity Period of the access control policy. Note
When the RepeatType Settings is Weekly, valid values are 0 to 6. A week starts on Sunday. When the RepeatType Settings is Monthly, valid values are 1 to 31. |
1 |
|
| RepeatStartTime |
string |
No |
The recurrence start time when the policy takes effect. Use the 24-hour time format HH:mm, such as 08:00. Note
If RepeatType is set to Permanent or None, RepeatStartTime is empty. If RepeatType is set to Daily, Weekly, or Monthly, RepeatStartTime must be specified. |
08:00 |
| RepeatEndTime |
string |
No |
The recurrence end time when the policy takes effect. Use the 24-hour time format HH:mm, such as 23:00. Note
If RepeatType is set to Permanent or None, RepeatEndTime is empty. If RepeatType is set to Daily, Weekly, or Monthly, RepeatEndTime must be specified. |
23:30 |
| StartTime |
integer |
No |
The start time of the Policy Validity Period for the access control policy. The value is expressed in the format of a UNIX timestamp in seconds. The time must be on the hour or half-hour, and must be at least 30 minutes earlier than the end time. Note
When RepeatType is Permanent, StartTime is empty. When RepeatType is None, Daily, Weekly, or Monthly, StartTime must have a value, and you need to configure the start time Settings. |
1694761200 |
| EndTime |
integer |
No |
The end time of the Policy Validity Period for the access control policy. The value is expressed in the format of a UNIX timestamp in seconds. The time must be on the hour or half-hour, and must be at least 30 minutes later than the start time. Note
When RepeatType is Permanent, EndTime is empty. When RepeatType is None, Daily, Weekly, or Monthly, EndTime must have a value, and you need to configure the end time Settings. |
1694764800 |
| DomainResolveType |
string |
No |
The domain name resolution mode of the access control policy. Valid values:
|
FQDN |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D |
| DryRun |
boolean |
Indicates whether the dry run is successful. A value of true indicates that only the dry run is performed and no actual modifications are made. |
Examples
Success response
JSON format
{
"RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D",
"DryRun": false
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ErrorParametersUid | The aliUid parameter is invalid. | The aliUid parameter is invalid. |
| 400 | ErrorParametersDirection | The direction is invalid. | The direction is invalid. |
| 400 | ErrorDBSelect | An error occurred while querying database. | An error occurred while querying database. |
| 400 | ErrorRecordLog | An error occurred while updating the operation log. | An error occurred while updating the operation log. |
| 400 | ErrorParameters | Error Parameters | The parameter is invalid. |
| 400 | ErrorParametersSource | The source is invalid. | The source is invalid. |
| 400 | ErrorParametersDestination | The Destination parameter is invalid. | The Destination parameter is invalid. |
| 400 | ErrorParametersFtpNotSupport | domain destination not support ftp. | FTP application is not supported when the policy destination is a domain name |
| 400 | ErrorAclDomainAnyCountExceed | The number of resolved domain names cannot exceed 200. ACL configuration can be continued for HTTP, HTTPS, SMTP, SMTPS, and SSL applications. | The domain name is resolved to more than 200 IP addresses. We recommend that you set Application in your access control policy to HTTPS, HTTPS, SMTP, SMTPS, or SSL. |
| 400 | ErrorAclNotExist | The ACL does not exist. | The ACL does not exist. |
| 400 | ErrorAclEffectiveTimeNonPermanent | ACL rule is not allowed to update status when effective is not permanent. | ACL rule is not allowed to update status when effective is not permanent. |
| 400 | ErrorAclExtendedCountExceed | ACL or extended ACL rules are not matched. | ACL or extended ACL rules are not matched. |
| 400 | ErrorDBUpdate | internal error: sql updat. | An error occurred while updating the database. |
| 400 | ErrorDBInsert | An error occurred while performing an insert operation in the database. | An error occurred while performing an insert operation in the database. |
| 400 | ErrorMarshalJSON | An error occurred while encoding JSON. | An error occurred while encoding JSON. |
| 400 | ErrorParametersDestinationCount | Exceeding the number of countries in a single ACL. | Exceeds the number of selected areas for one ACL. It is recommended to split it into multiple ACLs. |
| 400 | ErrorEmptyDomainResolveType | Empty DomainResolveType only support HTTP/HTTPS/SSL/SMTP/SMTPS apps. | Empty domain name resolution mode is not supported. |
| 400 | ErrorParametersApplicationName | Specified parameter ApplicationName is not valid. | Specified parameter ApplicationName is not valid. |
| 400 | ErrorParametersApplicationNameList | Specified parameter ApplicationNameList is not valid. | Specified parameter ApplicationNameList is not valid. |
| 400 | ErrorParametersAclUuid | Specified parameter AclUuid is not valid. | Specified parameter AclUuid is not valid. |
| 400 | ErrorAddressGroupNotExist | The address group does not exist. | The address group does not exist. |
| 400 | ErrorParametersProtoAppsMismatch | The protocol and applicationName mismatch. | The protocol and applicationName mismatch. |
| 400 | ErrorApplicationTemplateNotFound | Application template not found. | Application template does not exist |
| 400 | ErrorWebFilterTemplateNotFound | Web filter template not found. | Web filtering template does not exist |
| 400 | InvalidClientToken | ClientToken format invalid. Only ASCII letters, digits, hyphens and underscores are allowed, max 64 characters. | |
| 400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. | This request uses the same client token as the previous request, but not the same. Do not reuse client tokens in different requests unless the request is the same. |
| 400 | ErrorStartTimeOrEndTime | The start time or end time is invalid. The time must be the hour or half hour, and the start time must be 30 minutes earlier than the end time. | The start time or end time is invalid. The time must be an hour or half an hour, and the start time must be 30 minutes earlier than the end time. |
| 409 | IdempotentToken.Processing | A previous request with the same ClientToken is still being processed. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.