Queries flow logs.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 ID of the region where the flow log is deployed.

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 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.

FlowLogId String No fl-bp1f6qqhsrc2c12ta****

The ID of the flow log.

Description String No test flowlog

The description of the flow log.

ResourceType String No NetworkInterface

The type of resource from which traffic is captured. Valid values:

  • NetworkInterface: an elastic network interface (ENI).
  • VSwitch: all ENIs in a vSwitch.
  • VPC: all ENIs in a virtual private cloud (VPC).
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:

  • All: all traffic.
  • Allow: traffic that is allowed by access control.
  • Drop: traffic that is denied by access control.
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:

  • Active: enabled
  • Inactive: disabled
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.

Response parameters

Parameter Type Example Description
PageSize String 20

The number of entries returned per page.

PageNumber String 1

The number of the returned page.

RequestId String F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1

The ID of the request.

TotalCount String 1

The number of flow logs that are queried.

Success String true

Indicates whether the call was successful. Valid values:

  • true: yes
  • false: no
FlowLogs Array of FlowLog

The information about the flow logs.

FlowLog
Status String Active

The status of the flow log. Valid values:

  • Active: enabled
  • Inactive: disabled
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:

  • All: all traffic.
  • Allow: traffic that is allowed by access control.
  • Drop: traffic that is denied by access control.
ResourceType String NetworkInterface

The type of resource from which traffic is captured. Valid values:

  • NetworkInterface: an ENI
  • VSwitch: all ENIs in a vSwitch
  • VPC: all ENIs in a VPC
Description String test flowlog

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 ID of the region where the flow log is deployed.

FlowLogId String fl-bp1f6qqhsrc2c12ta****

The ID of the flow log.

BusinessStatus String Normal

The business status of the flow log.

AggregationInterval Integer 10

The sampling interval of the flow log. Unit: seconds.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeFlowLogs
&RegionId=cn-hangzhou
&FlowLogName=myFlowlog
&FlowLogId=fl-bp1f6qqhsrc2c12ta****
&Description=test flowlog
&ResourceType=NetworkInterface
&ResourceId=eni-askldfas****
&TrafficType=All
&ProjectName=FlowLogProject
&LogStoreName=FlowLogStore
&Status=Active
&PageNumber=1
&PageSize=20
&VpcId=vpc-bp1nwd16gvo1wgs****
&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>test flowlog</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>
    </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" : "test flowlog",
    "ProjectName" : "FlowLogProject",
    "LogStoreName" : "FlowLogStore",
    "ResourceId" : "eni-askldfas****",
    "RegionId" : "cn-hangzhou",
    "FlowLogId" : "fl-bp1f6qqhsrc2c12ta****",
    "BusinessStatus" : "Normal",
    "AggregationInterval" : 10
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.