Queries flow logs.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DescribeFlowLogs | The operation that you want to perform. Set the value to DescribeFlowLogs. |
RegionId | String | Yes | cn-hangzhou | The region ID of the flow log. You can call the DescribeRegions operation to query the most recent region list. |
FlowLogName | String | No | myFlowlog | The name of the flow log. The name must be 1 to 128 characters in length, and cannot start with |
FlowLogId | String | No | fl-bp1f6qqhsrc2c12ta**** | The ID of the flow log. |
Description | String | No | This is my Flowlog. | The description of the flow log. The description must be 1 to 256 characters in length, and cannot start with |
ResourceType | String | No | NetworkInterface | The type of resource from which traffic is captured. Valid values:
|
ResourceId | String | No | eni-askldfas**** | The ID of the resource from which traffic is captured. |
TrafficType | String | No | All | The type of traffic that is captured. Valid values:
|
ProjectName | String | No | FlowLogProject | The project that manages the captured traffic data. |
LogStoreName | String | No | FlowLogStore | The Logstore that stores the captured traffic data. |
Status | String | No | Active | The status of the flow log. Valid values:
|
PageNumber | Integer | No | 1 | The number of the page to return. Default value: 1. |
PageSize | Integer | No | 20 | The number of entries to return on each page. Maximum value: 50. Default value: 20. |
VpcId | String | No | vpc-bp1nwd16gvo1wgs**** | The ID of the VPC to which the flow log belongs. |
ResourceGroupId | String | No | rg-bp67acfmxazb4ph**** | The ID of the resource group to which the flow log belongs. |
Tags.N.Key | String | No | FinanceDept | The key of tag N to add to the resource. You can specify at most 20 tag keys. The tag key cannot be an empty string. The tag key can be at most 128 characters in length. It cannot start with |
Tags.N.Value | String | No | FinanceJoshua | The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with |
Response parameters
Parameter | Type | Example | Description |
PageSize | String | 20 | The number of entries per page. |
PageNumber | String | 1 | The number of the returned page. |
RequestId | String | F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1 | The request ID. |
TotalCount | String | 1 | The number of flow logs that are queried. |
Success | String | true | Indicates whether the operation is successful. Valid values:
|
FlowLogs | Array of FlowLog | The information about the flow logs. |
|
FlowLog | |||
Status | String | Active | The status of the flow log. Valid values:
|
CreationTime | String | 2022-01-21T03:08:50Z | The time when the flow log was created. |
FlowLogName | String | myFlowlog | The name of the flow log. |
TrafficType | String | All | The type of traffic that is captured by the flow log. Valid values:
|
ResourceType | String | NetworkInterface | The type of the resource from which traffic is captured. Valid values:
|
Description | String | Description | The description of the flow log. |
ProjectName | String | FlowLogProject | The project that manages the captured traffic data. |
LogStoreName | String | FlowLogStore | The Logstore that stores the captured traffic data. |
ResourceId | String | eni-askldfas**** | The ID of the resource from which traffic is captured. |
RegionId | String | cn-hangzhou | The region ID of the flow log. |
FlowLogId | String | fl-bp1f6qqhsrc2c12ta**** | The ID of the flow log. |
BusinessStatus | String | Normal | The business status of the flow log. Valid values:
|
AggregationInterval | Integer | 10 | The sampling interval of the flow log. Unit: minutes. |
TrafficPath | Array of String | all | The sampling scope of the traffic that is collected. Valid values:
Note By default, the traffic path feature is unavailable. To use this feature, submit a ticket. |
ServiceType | String | sls | The hosting type of the cloud service.
Note A flow log that is created in the SLS console can be displayed in the VPC list. However, you cannot modify, start, stop, or delete the flow log in the VPC console. If you want to manage the flow log, you can log on to the SLS console and perform required operations. |
ResourceGroupId | String | rg-bp67acfmxazb4ph**** | The ID of the resource group to which the flow log belongs. |
Tags | Array of Tag | The list of tags. |
|
Tag | |||
Key | String | FinanceDept | The key of tag N. |
Value | String | FinanceJoshua | The value of tag N. |
FlowLogDeliverStatus | String | FAILED | Indicates whether the flow log is delivered. Valid values:
|
FlowLogDeliverErrorMessage | String | UnavaliableTarget | If the flow log failed to be delivered, you can troubleshoot based on the following error messages that may be returned:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeFlowLogs
&RegionId=cn-hangzhou
&FlowLogName=myFlowlog
&FlowLogId=fl-bp1f6qqhsrc2c12ta****
&Description=This is my Flowlog.
&ResourceType=NetworkInterface
&ResourceId=eni-askldfas****
&TrafficType=All
&ProjectName=FlowLogProject
&LogStoreName=FlowLogStore
&Status=Active
&PageNumber=1
&PageSize=20
&VpcId=vpc-bp1nwd16gvo1wgs****
&ResourceGroupId=rg-bp67acfmxazb4ph****
&Tags=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeFlowLogsResponse>
<PageSize>20</PageSize>
<PageNumber>1</PageNumber>
<RequestId>F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1</RequestId>
<TotalCount>1</TotalCount>
<Success>true</Success>
<FlowLogs>
<Status>Active</Status>
<CreationTime>2022-01-21T03:08:50Z</CreationTime>
<FlowLogName>myFlowlog</FlowLogName>
<TrafficType>All</TrafficType>
<ResourceType>NetworkInterface</ResourceType>
<Description>Description</Description>
<ProjectName>FlowLogProject</ProjectName>
<LogStoreName>FlowLogStore</LogStoreName>
<ResourceId>eni-askldfas****</ResourceId>
<RegionId>cn-hangzhou</RegionId>
<FlowLogId>fl-bp1f6qqhsrc2c12ta****</FlowLogId>
<BusinessStatus>Normal</BusinessStatus>
<AggregationInterval>10</AggregationInterval>
<TrafficPath>all</TrafficPath>
<ServiceType>sls</ServiceType>
<ResourceGroupId>rg-bp67acfmxazb4ph****</ResourceGroupId>
<Tags>
<Key>FinanceDept</Key>
<Value>FinanceJoshua</Value>
</Tags>
<FlowLogDeliverStatus>FAILED</FlowLogDeliverStatus>
<FlowLogDeliverErrorMessage>UnavaliableTarget</FlowLogDeliverErrorMessage>
</FlowLogs>
</DescribeFlowLogsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageSize" : "20",
"PageNumber" : "1",
"RequestId" : "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1",
"TotalCount" : "1",
"Success" : "true",
"FlowLogs" : [ {
"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" : [ "all" ],
"ServiceType" : "sls",
"ResourceGroupId" : "rg-bp67acfmxazb4ph****",
"Tags" : [ {
"Key" : "FinanceDept",
"Value" : "FinanceJoshua"
} ],
"FlowLogDeliverStatus" : "FAILED",
"FlowLogDeliverErrorMessage" : "UnavaliableTarget"
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
400 | InvalidInstanceId | Instance does not exist. | The error message returned because the 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. |
For a list of error codes, see Service error codes.