Querying the Number of Network ACLs Using Tags
Function
This API is used to query the number of network ACLs using tags.
Debugging
You can debug this API through automatic authentication in API Explorer.
URI
POST /v3/{project_id}/firewalls/resource-instances/count
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
matches |
No |
Array of Match objects |
The key-value pair to be matched in the query. The key is a fixed dictionary value and must be a unique and supported key. The key can only be resource_name. |
tags |
No |
Array of ListTag objects |
The resources to be queried contain all tags listed in tags. A maximum of 50 tags can be specified. Each tag key can have a maximum of 10 tag values. Each tag value can be an empty array but the structure cannot be missing. Each tag key must be unique, and each tag value of a tag must also be unique. Resources with all tags listed in tags will be returned. Keys in this list are in an AND relationship while values in each key-value structure are in an OR relationship. If tags is not specified, all resources will be returned. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Request ID |
total_count |
Integer |
Resource quantity |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Request ID. |
error_msg |
String |
Error message. |
error_code |
String |
Error code. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Request ID. |
error_msg |
String |
Error message. |
error_code |
String |
Error code. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Request ID. |
error_msg |
String |
Error message. |
error_code |
String |
Error code. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Request ID. |
error_msg |
String |
Error message. |
error_code |
String |
Error code. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Request ID. |
error_msg |
String |
Error message. |
error_code |
String |
Error code. |
Example Requests
Query network ACLs using tags and matches.
POST https://{{Endpoint}}/v3/{project_id}/firewalls/resource-instances/count { "tags" : [ { "key" : "key1", "values" : [ "value1" ] } ], "matches" : [ { "key" : "resource_name", "value" : "network_aclv3_test" } ] }
Example Responses
Status code: 200
Normal request response
{ "request_id" : "239df34e-a651-4631-aaa1-d5fef231933a", "total_count" : 2 }
Status Codes
Status Code |
Description |
---|---|
200 |
Normal request response |
400 |
Invalid parameter |
401 |
Authentication failure |
403 |
Insufficient permissions |
404 |
Not found |
500 |
System exception |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot