Querying Flow Logs
Function
This API is used to query the flow log list.
Constraints
There are some constraints:
-
Filtering query is supported. The supported filtering criteria include resource_type, resource_id, and enterprise_project_id. You can query multiple resources at a time or use combined criteria to query resources.
-
Pagination query is supported. You can use limit and marker together for query.
-
Only sorting by a single field (id, name, or state) is supported.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/enterprise-router/{er_id}/flow-logs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
er_id |
Yes |
String |
Enterprise router ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource_type |
No |
String |
Resource type |
resource_id |
No |
Array of strings |
Attachment resource IDs |
limit |
No |
Integer |
Number of records on each page. Value range: 0 to 2000 Minimum: 0 Maximum: 2000 |
marker |
No |
String |
ID of the last enterprise router on the previous page. If this parameter is left blank, the first page is queried. This parameter must be used together with limit. Minimum: 1 Maximum: 128 |
sort_key |
No |
Array of strings |
Keyword for sorting. The keyword can be id, name, or state. By default, id is used. |
sort_dir |
No |
Array of strings |
Sorting order. There are two value options: asc (ascending order) and desc (descending order). The default value is asc. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
flow_logs |
Array of FlowLog objects |
Flow log details |
request_id |
String |
Request ID |
total_count |
Long |
Total count |
page_info |
PageInfo object |
Pagination query information |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Flow log ID |
name |
String |
Flow log name |
description |
String |
Flow log description |
project_id |
String |
Project ID of the flow log task creator |
resource_type |
String |
Resource type. The value is attachment. |
resource_id |
String |
Resource ID |
log_group_id |
String |
Log group ID |
log_stream_id |
String |
Log stream ID |
log_store_type |
String |
Flow log storage type. LTS is used for log storage. |
log_aggregation_interval |
Integer |
Log aggregation time, in seconds. The value ranges from 60 to 600. |
created_at |
String |
Creation time in the format of YYYY-MM-DDTHH:mm:ss.sssZ |
updated_at |
String |
Update time in the format of YYYY-MM-DDTHH:mm:ss.sssZ |
state |
String |
Flow log status. Value options: pending, available, modifying, deleting, deleted, and failed |
enabled |
Boolean |
Whether to enable flow logs. The value can be true or false. |
Example Requests
Querying flow logs
GET https://{erouter_endpoint}/v3/0605767a9980d5762fbcc00b3537e757/enterprise-router/a43c55e9-4911-4030-90e1-5c2bf6ae6fe2/flow-logs
Example Responses
Status code: 200
OK
{ "flow_logs" : [ { "id" : "b216bc1d-5963-41a7-89f9-779a5128c5ac", "name" : "flow_log", "project_id" : "0605767a9980d5762fbcc00b3537e757", "resource_type" : "attachment", "resource_id" : "6f83b848-8331-4271-ac0c-ef94b7686402", "log_group_id" : "0139393c-eeb2-49f0-bbd4-c5faec6b1497", "log_stream_id" : "d22c3b44-2f71-470f-83f3-96a8af6956ad", "log_store_type" : "LTS", "log_aggregation_interval" : 600, "created_at" : "2020-03-11T15:13:31Z", "updated_at" : "2022-03-11T15:13:31Z", "state" : "available", "enabled" : true, "description" : "Flow Logs" } ], "page_info" : { "next_marker" : "1", "current_count" : 1 }, "request_id" : "915a14a6-867b-4af7-83d1-70efceb146f9" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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