Queries flow logs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeFlowLogs |
get |
*FlowLog
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the flow log. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
| FlowLogName |
string |
No |
The name of the flow log. The name must be 1 to 128 characters in length, and cannot start with |
myFlowlog |
| FlowLogId |
string |
No |
The ID of the flow log. |
fl-bp1f6qqhsrc2c12ta**** |
| Description |
string |
No |
The description of the flow log. The description must be 1 to 256 characters in length, and cannot start with |
This is my Flowlog. |
| ResourceType |
string |
No |
The resource type of the traffic to catch. Valid values:
|
NetworkInterface |
| ResourceId |
string |
No |
The ID of the resource whose traffic you want to capture. |
eni-askldfas**** |
| TrafficType |
string |
No |
The traffic type to catch. Valid values:
|
All |
| ProjectName |
string |
No |
The Log Service project that manages the captured traffic. |
FlowLogProject |
| LogStoreName |
string |
No |
The Logstore that stores the captured traffic. |
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 in a paged query. Maximum value: 50. Default value: 20. |
20 |
| VpcId |
string |
No |
The ID of the VPC for which you want to query flow logs. |
vpc-bp1nwd16gvo1wgs**** |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the flow log belongs. |
rg-bp67acfmxazb4ph**** |
| Tags |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The list of tags. |
||
| Key |
string |
No |
The tag key of the resource. You can specify up to 20 tag keys. If you specify this parameter, you cannot specify an empty string. A tag key can be up to 128 characters in length. It cannot start with |
FinanceDept |
| Value |
string |
No |
The tag value of the resource. You can specify up to 20 tag values. If you specify this parameter, you can specify an empty string. A tag value can be up to 128 characters in length. It cannot start with |
FinanceJoshua |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The details of the flow logs. |
||
| PageSize |
string |
The number of entries per page for paging in a paged query. |
20 |
| PageNumber |
string |
The page number. |
1 |
| RequestId |
string |
The request ID. |
F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1 |
| TotalCount |
string |
The total number of flow logs returned. |
1 |
| Success |
string |
Indicates whether the call was successful. Valid values:
|
true |
| FlowLogs |
object |
||
| FlowLog |
array<object> |
The list of flow logs. |
|
|
array<object> |
The list of flow logs. |
||
| Status |
string |
The status of the flow log. Valid values:
|
Active |
| CreationTime |
string |
The time when the flow log was created. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. |
2022-01-21T03:08:50Z |
| FlowLogName |
string |
The name of the flow log. |
myFlowlog |
| TrafficType |
string |
The traffic type that flow logs catch. Valid values:
|
All |
| ResourceType |
string |
The resource type of the traffic that flow logs catch. Valid values:
|
NetworkInterface |
| Description |
string |
The description of the flow log. |
Description |
| ProjectName |
string |
The Log Service project that manages the captured traffic. |
FlowLogProject |
| LogStoreName |
string |
The Logstore that stores the captured traffic. |
FlowLogStore |
| ResourceId |
string |
The ID of the resource whose traffic is captured by the flow log. |
eni-askldfas**** |
| RegionId |
string |
The region ID of the flow log. |
cn-hangzhou |
| FlowLogId |
string |
The ID of the flow log. |
fl-bp1f6qqhsrc2c12ta**** |
| BusinessStatus |
string |
The service status. Valid values:
|
Normal |
| AggregationInterval |
integer |
The sampling interval of the flow log. Unit: minutes. |
10 |
| TrafficPath |
object |
||
| TrafficPathList |
array |
The traffic path to be captured. Valid values:
|
|
|
string |
The traffic path to be captured. Valid values:
Note
The traffic path feature is disabled by default. To use this feature, submit a ticket. |
all |
|
| ServiceType |
string |
The hosting type of the cloud service.
Note
Flow log instances created in the Simple Log Service console are displayed in the VPC list. However, you cannot modify, start, stop, or delete these flow log instances in the VPC console. To perform Related operations on the flow log, you can logon to the Simple Log Service console to modify, start, stop, or delete it. |
sls |
| ResourceGroupId |
string |
The ID of the resource group to which the flow log belongs. |
rg-bp67acfmxazb4ph**** |
| Tags |
object |
||
| Tag |
array<object> |
The list of tags. |
|
|
object |
The list of tags. |
||
| Key |
string |
The tag key. |
FinanceDept |
| Value |
string |
The tag value. |
FinanceJoshua |
| FlowLogDeliverStatus |
string |
The delivery status of the flow log. Valid values:
|
FAILED |
| FlowLogDeliverErrorMessage |
string |
The error message returned when the flow log delivery fails. You can troubleshoot the issue based on the error message. Possible error messages:
|
UnavaliableTarget |
| IpVersion |
string |
The IP address type of the traffic captured by the flow log. |
IPv4 |
| LogFormat |
string |
Examples
Success response
JSON format
{
"PageSize": "20",
"PageNumber": "1",
"RequestId": "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1",
"TotalCount": "1",
"Success": "true",
"FlowLogs": {
"FlowLog": [
{
"Status": "Active",
"CreationTime": "2022-01-21T03:08:50Z",
"FlowLogName": "myFlowlog",
"TrafficType": "All",
"ResourceType": "NetworkInterface",
"Description": "Description",
"ProjectName": "FlowLogProject",
"LogStoreName": "FlowLogStore",
"ResourceId": "eni-askldfas****",
"RegionId": "cn-hangzhou",
"FlowLogId": "fl-bp1f6qqhsrc2c12ta****",
"BusinessStatus": "Normal",
"AggregationInterval": 10,
"TrafficPath": {
"TrafficPathList": [
"all"
]
},
"ServiceType": "sls",
"ResourceGroupId": "rg-bp67acfmxazb4ph****",
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
},
"FlowLogDeliverStatus": "FAILED",
"FlowLogDeliverErrorMessage": "UnavaliableTarget",
"IpVersion": "IPv4",
"LogFormat": ""
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidInstanceId | Instance does not exist. | The error message returned because the specified instance does not exist. |
| 400 | ProjectOrLogstoreNotExist | The specified project or logstore does not exist. | The error message returned because the specified project or Logstore does not exist. |
| 400 | SourceProjectNotExist | The Source Project or logstore does not exist. | The error message returned because the source project or Logstore does not exist. |
| 400 | Unauthorized | This api does not support sub user or role. | The error message returned because you cannot call this operation as a RAM user. |
| 400 | ParameterInvalid | Invalid parameter. | The error message returned because a parameter is invalid. |
| 400 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | The specified RegionId does not exist. Check whether the service is available in the region. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.