Last updated: 2022-01-18 17:05:39

1. API Description

Domain name for API request:

This API is used to query all the flow logs of the current account.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
This document describes the parameters for Signature V1. It's recommended to use the V3 signature, which provides higher security. Note that for Signature V3, the common parameters need to be placed in the HTTP Header. See details.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeFlowLogs.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
VpcId No String ID of the VPC instance
FlowLogId No String The unique ID of the flow log.
FlowLogName No String The name of the flow log instance.
ResourceType No String The resource type of the flow log. Valid values: 'VPC', 'SUBNET', and 'NETWORKINTERFACE'.
ResourceId No String The unique ID of the resource.
TrafficType No String Type of flow logs to be collected. Valid values: 'ACCEPT', 'REJECT' and 'ALL'.
CloudLogId No String The storage ID of the flow log.
CloudLogState No String The storage ID status of the flow log.
OrderField No String Order by field. Valid values: 'flowLogName' and 'createTime'. Default value: 'createTime'.
OrderDirection No String In ascending (asc) or descending (desc) order. Default value: 'desc'.
Offset No Integer The offset. Default value: 0.
Limit No Integer The number of rows per page. Default value: 10.
Filters No Filter Filter condition. FlowLogIds and Filters cannot be specified at the same time.
  • tag-key - String - Required: No - (Filter condition) Filter by tag key.
  • tag:tag-key - String - Required: No - (Filter condition) Filter by tag key-value pair. The tag-key should be replaced with a specified tag key.
  • 3. Output Parameters

    Parameter Name Type Description
    FlowLog Array of FlowLog The instance set of flow logs.
    TotalNum Integer The total number of flow logs.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the list of flow logs

    Input Example
    &<Common request parameters>

    Output Example

      "Response": {
        "FlowLog": [
            "CloudLogId": "219d5186-eab0-4510-905b-84925d8ec35e",
            "CloudLogState": "SUCCESS",
            "CreatedTime": "2019-05-07 18:00:26",
            "FlowLogDescription": "",
            "FlowLogId": "fl-2edhcclz",
            "FlowLogName": "yuemingtest",
            "ResourceId": "eni-78ysaex1",
            "ResourceType": "NETWORKINTERFACE",
            "TrafficType": "ACCEPT",
            "VpcId": "vpc-pq9vxykj"
            "CloudLogId": "dfb8f1a2-8522-47c1-8571-67905167ab3f",
            "CloudLogState": "SUCCESS",
            "CreatedTime": "2019-05-08 10:48:26",
            "FlowLogDescription": "",
            "FlowLogId": "fl-f42uhpkj",
            "FlowLogName": "test",
            "ResourceId": "eni-78ysaex1",
            "ResourceType": "NETWORKINTERFACE",
            "TrafficType": "ACCEPT",
            "VpcId": "vpc-pq9vxykj"
        "TotalNum": 2,
        "RequestId": "404428db-f850-40c2-803d-0aae49aba43a"

    5. Developer Resources


    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidParameterValue.Malformed Invalid input parameter format.
    InvalidParameterValue.Range The parameter value is not in the specified range.
    ResourceNotFound The resource does not exist.