All Products
Search
Document Center

Cloud Firewall:DescribeControlPolicy

Last Updated:Mar 29, 2023

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.

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 keyAssociation operation
yundun-cloudfirewall:DescribeControlPolicyRead
  • CloudFirewall
    acs:yundun-cloudfirewall:*:{#accountId}:controlpolicy/{#AclUuid}/{#Direction}
    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.
NoteIf 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.
NoteIf 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.

NoteIf 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
NoteIf 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.
NoteIf 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

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
Policysarray

The details about the access control policy.

object
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 small priority value indicates a high priority.

1
SourceTypestring

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

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

The type of the application that the access control policy supports. 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 timestamp of the DNS resolution result. The value is a UNIX timestamp. Unit: seconds.

1579261141
DnsResultstring

The DNS resolution result.

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

The type of the protocol 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 depends on the value of the DestinationType parameter. 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 timestamp when the access control policy was last hit. The value is a UNIX timestamp. Unit: seconds.

1579261141
DestPortGroupstring

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

my_port_group
AclUuidstring

The unique ID 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: destination CIDR block
  • group: destination address book
  • domain: destination domain name
  • location: destination location
net
DestPortstring

The destination port in the access control policy.

80
IpVersioninteger

The IP version of the address 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

Indicates 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
ApplicationIdstring

The application ID in the access control policy.

10***
DestinationGroupCidrsarray

The CIDR blocks in the destination address book.

string

The CIDR block.

192.0.XX.XX/24
DestPortGroupPortsarray

The ports in the destination port address book.

string

The port.

443/443
SourceGroupCidrsarray

The CIDR blocks in the source address book.

string

The CIDR block.

192.0.XX.XX/24
ApplicationNameListarray

The names of applications.

string

The name of the application.

HTTPS
SpreadCntinteger

The total quota consumed by the returned access control policies, which is the sum of the quota consumed by each policy.

Quota that is consumed by an access control policy = Number of source CIDR blocks × Number of destination CIDR blocks, destination locations, or IP addresses that are resolved from destination domain names × Number of applications × Number of ports.

10,000
CreateTimelong

The time at which the access control policy was created.

1761062400
ModifyTimelong

The time at which the access control policy was modified.

1761062400

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
    }
  ]
}

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.