All Products
Search
Document Center

Cloud Firewall:DescribeControlPolicy

Last Updated:Apr 24, 2024

Queries the details about all access control policies.

Operation description

You can call the DescribeControlPolicy operation to query the details about access control policies by page.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-cloudfirewall:DescribeControlPolicyRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language of the content within the response. Valid values:

  • zh: Chinese (default)
  • en: English
zh
DirectionstringYes

The direction of the traffic to which the access control policy applies. Valid values:

  • in: inbound traffic
  • out: outbound traffic
in
CurrentPagestringYes

The number of the page to return.

Default value: 1.

1
PageSizestringYes

The number of entries to return on each page.

10
SourcestringNo

The source address in the access control policy. Fuzzy match is supported. The value of this parameter depends on the value of the SourceType parameter.

  • If SourceType is set to net, the value of Source must be a CIDR block. Example: 192.0.XX.XX/24.
  • If SourceType is set to group, the value of Source must be the name of an address book. Example: db_group. If the db_group address book does not contain addresses, all source addresses are queried.
  • If SourceType is set to location, the value of Source must be a location. Example: beijing.
Note If you do not specify this parameter, access control policies of all source address types are queried.
192.0.XX.XX
DestinationstringNo

The destination address in the access control policy. Fuzzy match is supported. The value of this parameter depends on the value of the DestinationType parameter.

  • If DestinationType is set to net, the value of Destination must be a CIDR block. Example: 10.0.3.0/24.
  • If DestinationType is set to domain, the value of Destination must be a domain name. Example: aliyun.
  • If DestinationType is set to group, the value of Destination must be the name of an address book. Example: db_group.
  • If DestinationType is set to location, the value of Destination must be a location. Example: beijing.
Note If you do not specify this parameter, access control policies of all destination address types are queried.
192.0.XX.XX
DescriptionstringNo

The description of the access control policy. Fuzzy match is supported.

Note If you do not specify this parameter, access control policies that have descriptions are queried.
test
ProtostringNo

The type of the protocol in the access control policy. Valid values:

  • TCP
  • UDP
  • ICMP
  • ANY: all types of protocols
Note If you do not specify this parameter, access control policies of all protocol types are queried.
TCP
AclActionstringNo

The action that Cloud Firewall performs on the traffic. Valid values:

  • accept: allows the traffic.
  • drop: denies the traffic.
  • log: monitors the traffic.
Note If you do not specify this parameter, access control policies of all action types are queried.
accept
ReleasestringNo

Specifies whether the access control policy is enabled. By default, an access control policy is enabled after it is created. Valid values:

  • true: The access control policy is enabled.
  • false: The access control policy is disabled.
true
AclUuidstringNo

The unique ID of the access control policy.

00281255-d220-4db1-8f4f-c4df221a****
IpVersionstringNo

The IP version of the address in the access control policy. Valid values:

  • 4: IPv4 (default)
  • 6: IPv6
6
RepeatTypestringNo

The recurrence type for the access control policy to take effect. Valid values:

  • Permanent (default): The policy always takes effect.
  • None: The policy takes effect for only once.
  • Daily: The policy takes effect on a daily basis.
  • Weekly: The policy takes effect on a weekly basis.
  • Monthly: The policy takes effect on a monthly basis.
Permanent

Response parameters

ParameterTypeDescriptionExample
object
PageNostring

The page number of the returned page.

1
PageSizestring

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2****
TotalCountstring

The total number of the returned access control policies.

100
Policysobject []

The information about the access control policies.

Directionstring

The direction of the traffic to which the access control policy applies. Valid values:

  • in: inbound traffic
  • out: outbound traffic
in
Orderinteger

The priority of the access control policy.

The priority value starts from 1. A smaller priority value indicates a higher priority.

1
SourceTypestring

The type of the source address in the access control policy. Valid values:

  • net: CIDR block
  • group: address book
  • location: location
net
ApplicationNamestring

The application type supported by the access control policy. We recommend that you specify ApplicationNameList. Valid values:

  • FTP
  • HTTP
  • HTTPS
  • Memcache
  • MongoDB
  • MQTT
  • MySQL
  • RDP
  • Redis
  • SMTP
  • SMTPS
  • SSH
  • SSL
  • VNC
  • ANY: all types of applications
HTTP
HitTimeslong

The number of hits for the access control policy.

100
Descriptionstring

The description of the access control policy.

test
SourceGroupTypestring

The type of the source address book in the access control policy. Valid values:

  • ip: an address book that includes one or more IP addresses
  • tag: an Elastic Compute Service (ECS) tag-based address book that includes the IP addresses of the ECS instances with one or more specific tags
  • domain: an address book that includes one or more domain names
  • threat: an address book that includes one or more malicious IP addresses or domain names
  • backsrc: an address book that includes one or more back-to-origin addresses of Anti-DDoS Pro or Anti-DDoS Premium instances or Web Application Firewall (WAF) instances
ip
DnsResultTimelong

The time when the Domain Name System (DNS) resolution was performed. The value is a timestamp. Unit: seconds.

1579261141
DnsResultstring

The DNS resolution result.

192.0.XX.XX,192.0.XX.XX
Protostring

The protocol type in the access control policy. Valid values:

  • ANY
  • TCP
  • UDP
  • ICMP
TCP
DestinationGroupTypestring

The type of the destination address book in the access control policy. Valid values:

  • ip: an address book that includes one or more IP addresses
  • tag: an ECS tag-based address book that includes the IP addresses of the ECS instances with one or more specific tags
  • domain: an address book that includes one or more domain names
  • threat: an address book that includes one or more malicious IP addresses or domain names
  • backsrc: an address book that includes one or more back-to-origin addresses of Anti-DDoS Pro or Anti-DDoS Premium instances or WAF instances
ip
Destinationstring

The destination address in the access control policy. The value of this parameter varies based on the value of DestinationType. Valid values:

  • If DestinationType is set to net, the value of Destination is a CIDR block. Example: 192.0.XX.XX/24.
  • If DestinationType is set to domain, the value of Destination is a domain name. Example: aliyuncs.com.
  • If DestinationType is set to group, the value of Destination is the name of an address book. Example: db_group.
  • If DestinationType is set to location, the value of Destination is a location. For more information about location codes, see AddControlPolicy . Example: ["BJ11", "ZB"].
192.0.XX.XX/24
HitLastTimelong

The time when the access control policy was last hit. The value is a timestamp. Unit: seconds.

1579261141
DestPortGroupstring

The name of the destination port address book in the access control policy.

my_port_group
AclUuidstring

The UUID of the access control policy.

00281255-d220-4db1-8f4f-c4df221a****
DestPortTypestring

The type of the destination port in the access control policy. Valid values:

  • port: port
  • group: port address book
port
Sourcestring

The source address in the access control policy. Valid values:

  • If SourceType is set to net, the value of Source is a CIDR block. Example: 192.0.XX.XX/24.
  • If SourceType is set to group, the value of Source is the name of an address book. Example: db_group.
  • If SourceType is set to location, the value of Source is a location. For more information about location codes, see AddControlPolicy . Example: ["BJ11", "ZB"].
192.0.XX.XX/24
DestinationTypestring

The type of the destination address in the access control policy. Valid values:

  • net: CIDR block
  • group: address book
  • domain: domain name
  • location: location
net
DestPortstring

The destination port in the access control policy.

80
IpVersioninteger

The IP version used in the access control policy. Valid values:

  • 4: IPv4
  • 6: IPv6
6
AclActionstring

The action that Cloud Firewall performs on the traffic. Valid values:

  • accept: allows the traffic.
  • drop: denies the traffic.
  • log: monitors the traffic.
accept
Releasestring

The status of the access control policy. By default, an access control policy is enabled after it is created. Valid values:

  • true: enabled
  • false: disabled
true
ApplicationIdstring

The application ID in the access control policy.

10***
DestinationGroupCidrsarray

The CIDR blocks in the destination address book.

string

The CIDR block in the destination address book.

192.0.XX.XX/24
DestPortGroupPortsarray

The ports in the destination port address book.

string

The port in the destination port address book.

443/443
SourceGroupCidrsarray

The CIDR blocks in the source address book.

string

The CIDR block in the source address book.

192.0.XX.XX/24
ApplicationNameListarray

The application names.

string

The application type used in the access control policy. Valid values:

  • FTP
  • HTTP
  • HTTPS
  • Memcache
  • MongoDB
  • MQTT
  • MySQL
  • RDP
  • Redis
  • SMTP
  • SMTPS
  • SSH
  • SSL
  • VNC
  • ANY: all types of applications
HTTPS
SpreadCntinteger

The total quota consumed by the returned access control policies, which is the sum of the quota consumed by each policy. The quota that is consumed by an access control policy is calculated by using the following formula: Quota that is consumed by an access control policy = Number of source addresses (number of CIDR blocks or regions) × Number of destination addresses (number of CIDR blocks, regions, or domain names) × Number of port ranges × Number of applications.

10,000
CreateTimelong

The time when the access control policy was created.

1761062400
ModifyTimelong

The time when the access control policy was modified.

1761062400
RepeatTypestring

The recurrence type based on which the access control policy takes effect. Valid values:

  • Permanent (default): The policy always takes effect.
  • None: The policy takes effect for only once.
  • Daily: The policy takes effect on a daily basis.
  • Weekly: The policy takes effect on a weekly basis.
  • Monthly: The policy takes effect on a monthly basis.
Permanent
RepeatDaysarray

The days of a week or of a month on which the access control policy takes effect.

  • If RepeatType is set to Permanent, None, or Daily, this parameter is left empty. Example: [].
  • If RepeatType is set to Weekly, this parameter must be specified. Example: [0, 6].
Note If RepeatType is set to Weekly, the fields in the value of RepeatDays cannot be repeated.
  • If RepeatType is set to Monthly, this parameter must be specified. Example: [1, 31].
Note If RepeatType is set to Monthly, the fields in the value of RepeatDays cannot be repeated.
long

The day of a week or of a month on which the access control policy takes effect.

Note If RepeatType is set to Weekly, valid values of this parameter are 0 to 6. Each week starts from Sunday. If RepeatType is set to Monthly, valid values of this parameter are 1 to 31.
1
RepeatStartTimestring

The point in time when the recurrence starts. Example: 08:00. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.

Note If RepeatType is set to Permanent or None, this parameter is left empty. If RepeatType is set to Daily, Weekly, or Monthly, this parameter must be specified.
08:00
RepeatEndTimestring

The point in time when the recurrence ends. Example: 23:30. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.

Note If RepeatType is set to Permanent or None, this parameter is left empty. If RepeatType is set to Daily, Weekly, or Monthly, this parameter must be specified.
23:30
StartTimelong

The time when the access control policy starts to take effect. The value is a timestamp. Unit: seconds. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.

Note If RepeatType is set to Permanent, this parameter is left empty. If RepeatType is set to None, Daily, Weekly, or Monthly, this parameter must be specified.
1694761200
EndTimelong

The time when the access control policy stops taking effect. The value is a timestamp. Unit: seconds. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.

Note If RepeatType is set to Permanent, this parameter is left empty. If RepeatType is set to None, Daily, Weekly, or Monthly, this parameter must be specified.
1694764800

Examples

Sample success responses

JSONformat

{
  "PageNo": "1",
  "PageSize": "10",
  "RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2****",
  "TotalCount": "100",
  "Policys": [
    {
      "Direction": "in",
      "Order": 1,
      "SourceType": "net",
      "ApplicationName": "HTTP",
      "HitTimes": 100,
      "Description": "test",
      "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": [
        "443/443"
      ],
      "SourceGroupCidrs": [
        "192.0.XX.XX/24"
      ],
      "ApplicationNameList": [
        "HTTPS"
      ],
      "SpreadCnt": 0,
      "CreateTime": 1761062400,
      "ModifyTime": 1761062400,
      "RepeatType": "Permanent",
      "RepeatDays": [
        1
      ],
      "RepeatStartTime": "08:00",
      "RepeatEndTime": "23:30",
      "StartTime": 1694761200,
      "EndTime": 1694764800
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400ErrorParametersUidThe aliUid parameter is invalid.The aliUid parameter is invalid.
400ErrorParametersPageSizeOrNoEither pageSize or pageNo is invalid.Either pageSize or pageNo is invalid.
400ErrorParameterIpVersionThe IP version is invalid.The IP version is invalid.
400ErrorParametersDirectionThe direction is invalid.The direction is invalid.
400ErrorDBSelectAn error occurred while querying database.An error occurred while querying database.
400ErrorUnmarshalJSONAn error occurred while parsing JSON.An error occurred while decoding JSON.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-12The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: RepeatType
Output ParametersThe response structure of the API has changed.