Queries one or more flow logs.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
FlowLogId String Yes fl-7a56mar1kfw9vj****

The instance ID of the flow log to be queried.

RegionId String Yes cn-hangzhou

The ID of the region to which the flow log belongs.

Action String No DescribeFlowLogs

The name of this action.

Value: DescribeFlowLogs

Description String No flow log 1

The description of the flow log.

FlowLogName String No DDE

The name of the flow log.

OutputType String No sls

The type of the flow log:

  • sls: The flow log is stored in Alibaba Cloud Log Service.
  • netflow: The flow log is stored in a specified NetFlow server.
  • all: The flow log is stored in Log Service and NetFlow server.
PageNumber Integer No 1

The page number of the flow log list. Minimum value: 1. Default value: 1

PageSize Integer No 10

The number of entries per page in the case of a paged query result. Maximum value: 50. Default value: 10

Status String No Active

The status of the flow log.

  • Active: The flow log is started.
  • Inactive: The flow log is not started.

Response parameters

Parameter Type Example value Description
FlowLogs

The list of flow logs.

FlowLogSetType

The details of a flow log.

ActiveAging Integer 300

The time interval between two flow log records for persistent network connections. Default value: 300. Unit: seconds

Description String flow log 2

The description of the flow log.

FlowLogId String fl-7a56mar1kfw9vj****

The ID of the flow log.

InactiveAging Integer 15

The time interval between two flow log records for non-persistent network connections. Default value: 15. Unit: seconds

LogstoreName String ssfghgh

The Logstore where the flow log is stored. This parameter is returned when the value of the OutputType parameter is sls or all.

Name String DDE

The name of the flow log.

NetflowServerIp String 192.168.0.2

The IP address of the NetFlow server where the flow log is stored. This parameter is returned when the value of the OutputType parameter is netflow or all.

NetflowServerPort String 9995

The NetFlow server port to which the flow log is published. Default value: 9995. This parameter is returned when the value of the OutputType parameter is netflow or all.

NetflowVersion String V9

The NetFlow protocol used when the flow log is published. Valid values: V5 | V9 | V10. Default value: V9. This parameter is returned when the value of the OutputType parameter is netflow or all.

OutputType String sls

The type of the flow log:

  • sls: The flow log is stored in Alibaba Cloud Log Service.
  • netflow: The flow log is stored in a specified NetFlow server.
  • all: The flow log is stored in Log Service and NetFlow server.
ProjectName String ddrrgt

The Project where the flow log is stored. This parameter is returned when the value of the OutputType parameter is sls or all.

SlsRegionId String cn-shanghai

The region ID of the Log Service. This parameter is returned when the value of the OutputType parameter is sls or all.

Status String Active

The status of the flow log:

  • Active: The flow log is started.
  • Inactive: The flow log is not started.
TotalSagNum Integer 2

The number of SAG instances associated with the flow log.

PageNumber Integer 1

The page number of the flow log list. Minimum value: 1. Default value: 1

PageSize Integer 10

The number of entries per page in the case of a paged query result. Maximum value: 50. Default value: 10

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

The ID of the request.

TotalCount Integer 5

The total number of entries.

Examples

Request example


http(s)://[Endpoint]/? Action=DescribeFlowLogs
&FlowLogId=fl-7a56mar1kfw9vj****
&RegionId=cn-hangzhou
&<CommonParameters>

Response example

XML format

<DescribeFlowLogsResponse>
	  <PageNumber>1</PageNumber>
	  <FlowLogs>
		    <FlowLogSetType>
			      <Name>test111</Name>
			      <InactiveAging>15</InactiveAging>
			      <Status>Active</Status>
			      <NetflowVersion>V9</NetflowVersion>
			      <ProjectName>sag-flowlog-shanghai</ProjectName>
			      <SlsRegionId>cn-shanghai</SlsRegionId>
			      <ActiveAging>300</ActiveAging>
			      <FlowLogId>fl-l934tsa5504yuc****</FlowLogId>
			      <OutputType>sls</OutputType>
			      <TotalSagNum>35</TotalSagNum>
			      <NetflowServerPort>9995</NetflowServerPort>
			      <LogstoreName>sag-shanghai</LogstoreName>
		    </FlowLogSetType>
	  </FlowLogs>
	  <TotalCount>1</TotalCount>
	  <PageSize>20</PageSize>
	  <RequestId>44F4E2D0-77F7-4DEC-969B-061688946143</RequestId>
	</DescribeFlowLogsResponse>

JSON format

{
	"FlowLogs":{
		"FlowLogSetType":[
			{
				"InactiveAging":15,
				"Name":"test111",
				"Status":"Active",
				"ProjectName":"sag-flowlog-shanghai",
				"NetflowVersion":"V9",
				"ActiveAging":300,
				"SlsRegionId":"cn-shanghai",
				"FlowLogId":"fl-l934tsa5504yuc****",
				"OutputType":"sls",
				"TotalSagNum":35,
				"NetflowServerPort":9995,
				"LogstoreName":"sag-shanghai"
			}
		]
	},
	"PageNumber":1,
	"TotalCount":1,
	"PageSize":20,
	"RequestId":"44F4E2D0-77F7-4DEC-969B-061688946143"
}

Errors

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