Queries flow logs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:DescribeFlowlogs |
get |
*Flowlog
*Flowlog
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The ClientToken value can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId value as the ClientToken value. The RequestId value may be different for each API request. |
123e4567-e89b-12d3-a456-42665544**** |
| RegionId |
string |
No |
The region ID of the flow log. You can call the DescribeChildInstanceRegions operation to query the region ID. |
cn-hangzhou |
| FlowLogName |
string |
No |
The name of the flow log. The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://. |
myFlowlog |
| FlowLogId |
string |
No |
The flow log ID. |
flowlog-m5evbtbpt**** |
| Description |
string |
No |
The description of the flow log. The description can be empty or 1 to 256 characters in length, and cannot start with http:// or https://. |
myFlowlog |
| CenId |
string |
No |
The Cloud Enterprise Network (CEN) instance ID. |
cen-7qthudw0ll6jmc**** |
| ProjectName |
string |
No |
The name of the project that stores the captured traffic. The project name must be 3 to 63 characters in length, and must start and end with a lowercase letter or digit. It can contain only lowercase letters, digits, and hyphens (-). |
FlowLogProject |
| LogStoreName |
string |
No |
The name of the Logstore that stores the captured traffic. The Logstore name must be 3 to 63 characters in length, and must start and end with a lowercase letter or digit. It can contain only lowercase letters, digits, hyphens (-), and underscores (_). |
FlowLogStore |
| Status |
string |
No |
The status of the flow log. Valid values:
|
Active |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page for paging queries. Minimum value: 1. Default value: 20. |
20 |
| Tag |
array<object> |
No |
The tag information. You can specify up to 20 tags at a time. |
|
|
object |
No |
|||
| Key |
string |
No |
The tag key of the resource. The tag key cannot be an empty string. The tag key can be up to 64 characters in length, and cannot start with You can specify up to 20 tag keys at a time. |
TagKey |
| Value |
string |
No |
The tag value of the resource. The tag value can be an empty string or up to 128 characters in length. It cannot start with Each tag key corresponds to one tag value. You can specify up to 20 tag values at a time. |
TagValue |
| TransitRouterAttachmentId |
string |
No |
The network instance connection ID. |
tr-attach-qieks13jnt1cchy*** |
| TransitRouterId |
string |
No |
The transit router instance ID. |
tr-uf654ttymmljlvh2x**** |
| Interval |
integer |
No |
The capture window duration of the flow log. Unit: seconds. Valid values: 60 or 600. Default value: 600. |
600 |
| FlowLogVersion |
string |
No |
The version of the flow log. When a flow log is created, the latest version supported by the system is automatically used. The current version is 3. |
3 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
string |
The number of entries per page for paging queries. |
20 |
| PageNumber |
string |
The page number. |
1 |
| RequestId |
string |
The request ID. |
F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1 |
| TotalCount |
string |
The total number of entries returned. |
1 |
| Success |
string |
Indicates whether the current API call is successful.
|
true |
| FlowLogs |
object |
||
| FlowLog |
array<object> |
The list of flow logs. |
|
|
array<object> |
The flow log information. |
||
| Status |
string |
The status of the flow log. Valid values:
|
Active |
| CreationTime |
string |
The time when the flow log was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC. |
2021-07-24T13:00:52Z |
| FlowLogName |
string |
The name of the flow log. |
myFlowlog |
| Description |
string |
The description of the flow log. |
myFlowlog |
| ProjectName |
string |
The name of the project that stores the captured traffic data. |
FlowLogProject |
| CenId |
string |
The ID of the Cloud Enterprise Network (CEN) instance. |
cen-7qthudw0ll6jmc**** |
| LogStoreName |
string |
The Logstore that stores the captured traffic data. |
FlowLogStore |
| RegionId |
string |
The region ID of the flow log. |
cn-hangzhou |
| FlowLogId |
string |
The ID of the flow log. |
flowlog-m5evbtbpt**** |
| TransitRouterAttachmentId |
string |
The ID of the network instance connection |
tr-attach-5x4o4ynzuqbv6g**** |
| TransitRouterId |
string |
The ID of the transit router. |
tr-bp1g9313sx675zr1lajmj |
| LogFormatString |
string |
The string that defines the format of the flow log. Format:
|
${srcaddr}${dstaddr}${bytes} |
| FlowLogVersion |
string |
The flow log version. Flow logs are automatically created in the latest version, which is 3. |
3 |
| Interval |
integer |
The time window for collecting log data. Unit: seconds. Valid values: 60 or 600 Default value: 600. |
60 |
| Tags |
object |
||
| Tag |
array<object> |
The tags. |
|
|
object |
Tag N to add to the instance. |
||
| Key |
string |
The tag key. |
TagKey |
| Value |
string |
The tag value. |
TagValue |
Examples
Success response
JSON format
{
"PageSize": "20",
"PageNumber": "1",
"RequestId": "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1",
"TotalCount": "1",
"Success": "true",
"FlowLogs": {
"FlowLog": [
{
"Status": "Active",
"CreationTime": "2021-07-24T13:00:52Z",
"FlowLogName": "myFlowlog",
"Description": "myFlowlog",
"ProjectName": "FlowLogProject",
"CenId": "cen-7qthudw0ll6jmc****",
"LogStoreName": "FlowLogStore",
"RegionId": "cn-hangzhou",
"FlowLogId": "flowlog-m5evbtbpt****",
"TransitRouterAttachmentId": "tr-attach-5x4o4ynzuqbv6g****",
"TransitRouterId": "tr-bp1g9313sx675zr1lajmj",
"LogFormatString": "${srcaddr}${dstaddr}${bytes}",
"FlowLogVersion": "3",
"Interval": 60,
"Tags": {
"Tag": [
{
"Key": "TagKey",
"Value": "TagValue"
}
]
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationUnsupported.action | This action is not support. | The error message returned because this operation is not supported in the specified region. |
| 400 | InvalidFlowlogId.NotFound | The specified flowlog id does not exist or does not match the cen Id. | The error message returned because the specified flow log does not exist. |
| 400 | IllegalParam.TagValue | The tag values are not valid. | The error message returned because the specified tag value is invalid. |
| 400 | IllegalParam.TagKey | The tag keys are not valid. | The error message returned because the specified tag key is invalid. |
| 400 | InvalidDescription | Description is invalid. | The error message returned because the description is invalid. |
| 400 | InvalidName | Name is invalid. | The error message returned because the specified name is invalid. |
| 400 | InvalidParameter.Interval | Interval is invalid. | The specified interval is invalid. |
| 400 | InvalidParameter.FlowLogVersion | Flowlog version is invalid. | The specified flowlog version is invalid. |
| 400 | InvalidParameter | Invalid parameter. | The error message returned because the parameter is set to an invalid value. |
| 400 | Unauthorized | The AccessKeyId is unauthorized. | The error message returned because you do not have the permissions to perform this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.