DescribeFlowLogs

Last updated: 2020-07-10 10:34:14

1. API Description

Domain name for API request: vpc.tencentcloudapi.com.

This API is used to query and obtain the flow log set.

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

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: vpc.ap-shanghai-fsi.tencentcloudapi.com

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.

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 The VPC ID or the unified ID. We recommend you use the unified ID.
FlowLogId No String The unique ID of the flow log.
FlowLogName No String The name of the flow log instance.
ResourceType No String The type of resource to which the flow log belongs. Valid values: 'VPC', 'SUBNET', and 'NETWORKINTERFACE'.
ResourceId No String The unique ID of the resource.
TrafficType No String The collection type of the flow log. 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 vaue: 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 flow log set

    Input Example

    https://vpc.tencentcloudapi.com/?Action=DescribeFlowLogs
    &Offset=0&Limit=10
    &<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

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    SDK

    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.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help