Queries flow logs in a specified region.

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-shanghai

The ID of the region that the flow logs are stored.

FlowLogId String No fl-7a56mar1kfw9vj****

The ID of a flow log.

FlowLogName String No DDE

The name of the flow log.

Description String No desc

The description of the flow log.

Status String No Active

The status of the flow log. Valid values:

  • Active: The flow log is enabled.
  • Inactive: The flow log is disabled.
OutputType String No all

The location where the flow log is stored. Valid values:

  • sls: The flow log is stored in Log Service.
  • netflow: The flow log is stored on a NetFlow collector.
  • all: The flow log is stored both in Log Service and on a NetFlow collector.
PageSize Integer No 10

The number of entries to return on each page. Default value: 10.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

Response parameters

Parameter Type Example Description
TotalCount Integer 5

The total number of flow logs.

FlowLogs Array of FlowLogSetType

The list of flow logs.

FlowLogSetType
Status String Active

The status of the flow log. Valid values:

  • Active: The flow log is enabled.
  • Inactive: The flow log is disabled.
TotalSagNum Integer 2

The number of Smart Access gateway (SAG) instances with which the flow log is associated.

NetflowServerIp String 192.168.0.1

The address of the NetFlow collector where the flow log is stored.

ProjectName String sag-flowlog-shanghai

The name of the Log Service project.

SlsRegionId String cn-shanghai

The ID of the region that the Log Service is deployed.

ActiveAging Integer 300

The output interval under active connections. Unit: seconds.

OutputType String sls

The location where the flow log is stored. Valid values:

  • sls: The flow log is stored in Log Service.
  • netflow: The flow log is stored on a NetFlow collector.
  • all: The flow log is stored both in Log Service and on a NetFlow collector.
Description String aaa

The description of the flow log.

NetflowVersion String V9

The protocol version number of the NetFlow collector that stores the flow log. Default value: V9.

InactiveAging Integer 15

The output interval under inactive connections. Unit: seconds.

NetflowServerPort String 9995

The port number of the NetFlow collector that stores the flow log. Default value: 9995.

Name String DDE

The name of the flow log.

FlowLogId String fl-7a56mar1kfw9vj****

The ID of the flow log.

LogstoreName String config-operation-log

The name of the Logstore in Log Service.

ResourceGroupId String rg-acfm2iu4fnc****

The ID of the resource group to which the flow log belongs.

PageSize Integer 10

The number of entries returned per page.

RequestId String 44F4E2D0-77F7-4DEC-969B-061688946143

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeFlowLogs
&RegionId=cn-shanghai
&FlowLogId=fl-7a56mar1kfw9vj****
&FlowLogName=DDE
&Description=desc
&Status=Active
&OutputType=all
&ResourceGroupId=rg-acfm2iu4fnc****
&PageSize=10
&PageNumber=1
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeFlowLogsResponse>
    <TotalCount>1</TotalCount>
    <FlowLogs>
        <FlowLogSetType>
            <Status>Active</Status>
            <NetflowServerPort>9995</NetflowServerPort>
            <LogstoreName>
sag-shanghai</LogstoreName>
            <ActiveAging>300</ActiveAging>
            <ResourceGroupId>rg-acfm2iu4fnc****</ResourceGroupId>
            <ProjectName>sag-flowlog-shanghai</ProjectName>
            <NetflowVersion>V9</NetflowVersion>
            <InactiveAging>15</InactiveAging>
            <FlowLogId>fl-49u97c08z42n3f****</FlowLogId>
            <Name>zxtest</Name>
            <TotalSagNum>0</TotalSagNum>
            <SlsRegionId>cn-shanghai</SlsRegionId>
            <OutputType>sls</OutputType>
        </FlowLogSetType>
    </FlowLogs>
    <PageSize>10</PageSize>
    <RequestId>67D7003F-9D67-4935-9C47-10C5B3074028</RequestId>
    <PageNumber>1</PageNumber>
</DescribeFlowLogsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 1,
  "FlowLogs" : {
    "FlowLogSetType" : [ {
      "Status" : "Active",
      "NetflowServerPort" : 9995,
      "LogstoreName" : "\r\nsag-shanghai",
      "ActiveAging" : 300,
      "ResourceGroupId" : "rg-acfm2iu4fnc****",
      "ProjectName" : "sag-flowlog-shanghai",
      "NetflowVersion" : "V9",
      "InactiveAging" : 15,
      "FlowLogId" : "fl-49u97c08z42n3f****",
      "Name" : "zxtest",
      "TotalSagNum" : 0,
      "SlsRegionId" : "cn-shanghai",
      "OutputType" : "sls"
    } ]
  },
  "PageSize" : 10,
  "RequestId" : "67D7003F-9D67-4935-9C47-10C5B3074028",
  "PageNumber" : 1
}

Error codes

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