DescribeControlPolicy
Queries all access control policy information.
Operation description
This operation is generally used for paging and paged query of access control policy information.
QPS limits
The QPS limit per user is 10 calls per second. If you invoke the API and exceed the limit, API calls are throttled, which may affect your business. Invoke the operation at a reasonable frequency.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-cloudfirewall:DescribeControlPolicy |
get |
*ControlPolicyOrder
*ControlPolicy
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Lang |
string |
No |
The language of the response message. Valid values:
|
zh |
| Direction |
string |
No |
The traffic direction controlled by the access control policy. Valid values: in (inbound) and out (outbound). You must specify at least one of Direction and AclUuid. If AclUuid is not specified, you must specify a non-empty Direction. Otherwise, ErrorParametersDirection is returned. Valid values:
|
in |
| CurrentPage |
string |
Yes |
The page number of the current page returned for a paged query during paging. Default value: 1. |
1 |
| PageSize |
string |
Yes |
The maximum number of entries to return on each page for a paged query during paging. |
10 |
| Source |
string |
No |
The source address in the access control policy. Fuzzy match is supported. The value of Source varies based on the value of SourceType.
Note
If you do not specify this parameter, all types of access sources are queried. |
192.0.XX.XX |
| Destination |
string |
No |
The destination address in the access control policy. Fuzzy match is supported. The value of Destination varies based on the destination type (DestinationType).
Note
If you do not specify this parameter in the Settings, all types of destination addresses are queried. |
192.0.XX.XX |
| Description |
string |
No |
The description of the access control policy. Fuzzy match is supported. Note
If you do not specify this parameter, the descriptions of all policies are queried. |
Allow access to the office CIDR block |
| Proto |
string |
No |
The protocol type of the traffic in the access control policy. Valid values:
Note
If you do not specify this parameter, all protocol types are queried. |
TCP |
| AclAction |
string |
No |
The action that Cloud Firewall performs on the traffic that matches the access control policy. Valid values:
Note
If you do not specify this parameter, all action types are queried. |
accept |
| Release |
string |
No |
Specifies whether the access control policy is enabled. Valid values:
|
true |
| AclUuid |
string |
No |
The unique ID of the access control policy. You must specify at least one of AclUuid and Direction. If you specify AclUuid, you can query the policy by its ID. |
00281255-d220-4db1-8f4f-c4df221a**** |
| IpVersion |
string |
No |
The IP address version. Valid values:
Valid values:
|
6 |
| RepeatType |
string |
No |
The recurrence type of the Policy Validity Period for the access control policy. Valid values:
Valid values:
|
Permanent |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageNo |
string |
The page number of the current page returned for a paged query during paging. |
1 |
| PageSize |
string |
The maximum number of entries to return on each page for a paged query during paging. |
10 |
| RequestId |
string |
The ID of the request. |
CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2**** |
| TotalCount |
string |
The total number of access control policy entries. |
100 |
| Policys |
array<object> |
The information about each access control policy. |
|
|
object |
The details of the access control policy. |
||
| Direction |
string |
The traffic direction of the access control policy. Valid values:
|
in |
| Order |
integer |
The priority of the access control policy. The priority value starts from 1 and increments. A smaller value indicates a higher priority. |
1 |
| SourceType |
string |
The type of the source address in the access control policy. Valid values:
|
net |
| ApplicationName |
string |
The application type supported by the access control policy. ApplicationNameList is recommended. Valid values:
|
HTTP |
| HitTimes |
integer |
The number of times the access control policy is hit. |
100 |
| Description |
string |
The description of the access control policy. |
Allow access to the office CIDR block |
| SourceGroupType |
string |
The type of the source address book in the access control policy. Valid values:
|
ip |
| DnsResultTime |
integer |
The timestamp of the DNS resolution. The value is a UNIX timestamp in seconds. |
1579261141 |
DnsResult
deprecated
|
string |
The DNS resolution result. |
192.0.XX.XX,192.0.XX.XX |
| Proto |
string |
The protocol type of the traffic in the access control policy. Valid values:
|
TCP |
| DestinationGroupType |
string |
The type of the destination address book in the access control policy. Valid values:
|
ip |
| Destination |
string |
The destination address in the access control policy. The value of Destination varies based on the destination type (DestinationType). Valid values:
|
192.0.XX.XX/24 |
| HitLastTime |
integer |
The latest time of hits. The value is in the UNIX timestamp format in seconds. |
1579261141 |
| DestPortGroup |
string |
The name of the destination port address book in the access control policy. |
my_port_group |
| AclUuid |
string |
The unique ID of the access control policy. |
00281255-d220-4db1-8f4f-c4df221a**** |
| DestPortType |
string |
The type of the destination port in the access control policy. Valid values:
|
port |
| Source |
string |
The source address in the access control policy. Valid values:
|
192.0.XX.XX/24 |
| DestinationType |
string |
The type of the destination address in the access control policy. Valid values:
|
net |
| DestPort |
string |
The destination port of the traffic in the access control policy. |
80 |
| IpVersion |
integer |
The IP address version. Valid values:
|
6 |
| AclAction |
string |
The action that Cloud Firewall performs on the traffic that matches the access control policy. Valid values:
|
accept |
| Release |
string |
Specifies whether the access control policy is enabled. By default, a policy is enabled after it is created. Valid values:
|
true |
| ApplicationId |
string |
The ID of the application for the traffic in the access control policy. |
10*** |
| DestinationGroupCidrs |
array |
The CIDR blocks in the destination address book of the access control policy. |
|
|
string |
The CIDR block in the destination address book of the access control policy. |
192.0.XX.XX/24 |
|
| DestPortGroupPorts |
array |
The ports in the destination port address book. |
|
|
string |
The port in the destination port address book. |
80/80 |
|
| SourceGroupCidrs |
array |
The CIDR blocks in the source address book of the access control policy. |
|
|
string |
The CIDR block in the source address book of the access control policy. |
192.0.XX.XX/24 |
|
| ApplicationNameList |
array |
The list of application names. |
|
|
string |
The application types supported by the access control policy. Valid values:
|
HTTP |
|
| SpreadCnt |
integer |
The quota consumed by the access control policy, which is the sum of the quota consumed by each policy. Quota consumed by a single policy = Number of source addresses (number of CIDR blocks or area) * Number of destination addresses (number of CIDR blocks, area, or domain names) * Number of port ranges * Number of applications. |
10000 |
| CreateTime |
integer |
The time when the policy was created. The value is a UNIX timestamp in seconds, which indicates the number of seconds that have elapsed since January 1, 1970 (UTC). |
1761062400 |
| ModifyTime |
integer |
The time when the policy was modified. The value is a UNIX timestamp in seconds, which indicates the number of seconds that have elapsed since January 1, 1970 (UTC). |
1761062400 |
| RepeatType |
string |
The recurrence type of the Policy Validity Period for the access control policy. Valid values:
Valid values:
|
Permanent |
| RepeatDays |
array |
The recurrence days of the Policy Validity Period for the access control policy.
Note
When the Settings specify Weekly for RepeatType, the values in RepeatDays must be unique.
Note
When the Settings specify Monthly for RepeatType, the values in RepeatDays must be unique. |
|
|
integer |
The recurrence day of the Policy Validity Period for the access control policy. Note
When the Settings specify Weekly for RepeatType, valid values are 0 to 6. A week starts on Sunday. When the Settings specify Monthly for RepeatType, valid values are 1 to 31. |
1 |
|
| RepeatStartTime |
string |
The recurrence start time of the Policy Validity Period for the access control policy. Example: 08:00. The time must be on the hour or half-hour, and must be at least 30 minutes earlier than the recurrence end time. Note
If RepeatType is Permanent or None, RepeatStartTime is empty. If RepeatType is Daily, Weekly, or Monthly, RepeatStartTime is required, and you must configure the Settings for the recurrence start time. The time is in the HH:mm format (24-hour clock). Example: 08:00 or 23:30. |
08:00 |
| RepeatEndTime |
string |
The recurrence end time of the Policy Validity Period for the access control policy. Example: 23:30. The time must be on the hour or half-hour, and must be at least 30 minutes later than the recurrence start time. Note
If RepeatType is Permanent or None, RepeatEndTime is empty. If RepeatType is Daily, Weekly, or Monthly, RepeatEndTime is required, and you must configure the Settings for the recurrence end time. The time is in the HH:mm format (24-hour clock). Example: 08:00 or 23:30. |
23:30 |
| StartTime |
integer |
The start time of the Policy Validity Period for the access control policy. The value is in the UNIX timestamp format 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
If RepeatType is Permanent, StartTime is empty. If RepeatType is None, Daily, Weekly, or Monthly, StartTime is required, and you must configure the Settings for the start time. |
1694761200 |
| EndTime |
integer |
The end time of the Policy Validity Period for the access control policy. The value is in the UNIX timestamp format 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
If RepeatType is Permanent, EndTime is empty. If RepeatType is None, Daily, Weekly, or Monthly, EndTime is required, and you must configure the Settings for the end time. |
1694764800 |
| DomainResolveType |
string |
The domain name resolution mode of the access control policy. Valid values:
|
FQDN |
Examples
Success response
JSON format
{
"PageNo": "1",
"PageSize": "10",
"RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2****",
"TotalCount": "100",
"Policys": [
{
"Direction": "in",
"Order": 1,
"SourceType": "net",
"ApplicationName": "HTTP",
"HitTimes": 100,
"Description": "Allow access to office network segment",
"SourceGroupType": "ip",
"DnsResultTime": 1579261141,
"DnsResult": "192.0.XX.XX,192.0.XX.XX",
"Proto": "TCP",
"DestinationGroupType": "ip",
"Destination": "192.0.XX.XX/24",
"HitLastTime": 1579261141,
"DestPortGroup": "my_port_group",
"AclUuid": "00281255-d220-4db1-8f4f-c4df221a****",
"DestPortType": "port",
"Source": "192.0.XX.XX/24",
"DestinationType": "net",
"DestPort": "80",
"IpVersion": 6,
"AclAction": "accept",
"Release": "true",
"ApplicationId": "10***",
"DestinationGroupCidrs": [
"192.0.XX.XX/24"
],
"DestPortGroupPorts": [
"80/80"
],
"SourceGroupCidrs": [
"192.0.XX.XX/24"
],
"ApplicationNameList": [
"HTTP"
],
"SpreadCnt": 10000,
"CreateTime": 1761062400,
"ModifyTime": 1761062400,
"RepeatType": "Permanent",
"RepeatDays": [
1
],
"RepeatStartTime": "08:00",
"RepeatEndTime": "23:30",
"StartTime": 1694761200,
"EndTime": 1694764800,
"DomainResolveType": "FQDN"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ErrorParametersUid | The aliUid parameter is invalid. | The aliUid parameter is invalid. |
| 400 | ErrorParametersPageSizeOrNo | Either pageSize or pageNo is invalid. | Either pageSize or pageNo is invalid. |
| 400 | ErrorParameterIpVersion | The IP version is invalid. | The IP version 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 | ErrorUnmarshalJSON | An error occurred while parsing JSON. | An error occurred while decoding JSON. |
| 400 | ErrorUUIDNew | The UUID is invalid. | The UUID is invalid. |
| 400 | ErrorParametersAppId | The AppId parameter is incorrect. | The AppId parameter is invalid. |
| 400 | ErrorParametersSource | The source is invalid. | The source is invalid. |
| 400 | ErrorDomainResolve | An error occurred while resolving the domain. | An error occurred while resolving the domain. |
| 400 | ErrorParametersDestination | The Destination parameter is invalid. | The Destination parameter is invalid. |
| 400 | ErrorParametersProto | The protocol is invalid. | The protocol is invalid. |
| 400 | ErrorParametersDestPort | The dst_port is invalid. | The dst_port is invalid. |
| 400 | ErrorParametersAction | The action is invalid. | The action is invalid. |
| 400 | ErrorParameters | Parameters error. | Parameter error. |
| 400 | ErrorMarshalJSON | An error occurred while encoding JSON. | An error occurred while encoding JSON. |
| 400 | ErrorParametersAclUuid | Specified parameter AclUuid is not valid. | Specified parameter AclUuid is not valid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.