All Products
Search
Document Center

Cloud Enterprise Network:DescribeFlowlogs

Last Updated:Jun 06, 2025

Queries flow logs.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a RAM policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding ARN in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services. For more information, see Common condition keys.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cen:DescribeFlowlogs

get

*Flowlog

acs:cbn:{#regionId}:{#accountId}:flowlog/*

*Flowlog

acs:cbn:{#regionId}:{#accountId}:flowlog/{#FlowLogId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ClientToken

string

No

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among all requests. The token can contain only ASCII characters.

Note

If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different.

123e4567-e89b-12d3-a456-42665544****

RegionId

string

No

The ID of the region where the flow log is deployed.

You can call the DescribeChildInstanceRegions operation to query the most recent region list.

cn-hangzhou

FlowLogName

string

No

The name of the flow log.

The name is optional. If you enter a name, it must be 1 to 128 characters in length, and cannot start with http:// or https://.

myFlowlog

FlowLogId

string

No

The ID of the flow log.

flowlog-m5evbtbpt****

Description

string

No

The description of the flow log.

The description is optional. If you enter a description, it must be 1 to 256 characters in length, and cannot start with http:// or https://.

myFlowlog

CenId

string

No

The ID of the Cloud Enterprise Network (CEN) instance.

cen-7qthudw0ll6jmc****

ProjectName

string

No

The name of the project where the flow log is stored.

The name must be 3 to 63 characters in length, and can contain lowercase letters, digits, and hyphens (-). It must start or end with a lowercase letter or a digit.

FlowLogProject

LogStoreName

string

No

The name of the Logstore where the flow log is stored.

The name must be 3 to 63 characters in length, and can contain lowercase letters, digits, underscores (_), and hyphens (-). It must start or end with a lowercase letter or a digit.

FlowLogStore

Status

string

No

The status of the flow log. Valid values:

  • Active: The flow log is enabled.

  • Inactive: The flow log is disabled.

Active

PageNumber

integer

No

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

1

PageSize

integer

No

The number of entries per page. Minimum value: 1. Default value: 20.

20

Tag

array

No

The information about the tags.

You can specify at most 20 tags in each call.

object

No

Key

string

No

The tag key.

The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

You can specify at most 20 tag keys.

TagKey

Value

string

No

The tag value.

The tag value can be 0 to 128 characters in length, and cannot start with aliyun or acs:. It cannot contain http:// or https://.

Each tag key must have a unique tag value. You can specify at most 20 tag values in each call.

TagValue

TransitRouterAttachmentId

string

No

The ID of the network instance connection.

tr-attach-qieks13jnt1cchy****

TransitRouterId

string

No

The ID of the transit router.

tr-uf654ttymmljlvh2x****

Interval

integer

No

The time window for collecting log data. Unit: seconds Valid values: 60 or 600 Default value: 600.

600

FlowLogVersion

string

No

The flow log version.

Flow logs are automatically created in the latest version, which is 3.

3

Response parameters

Parameter

Type

Description

Example

object

The response parameters.

PageSize

string

The number of entries returned per page.

20

PageNumber

string

The page number of the returned page.

1

RequestId

string

The ID of the request.

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

TotalCount

string

The total number of entries returned.

1

Success

string

Indicates whether the call is successful. Valid values:

  • true: yes

  • false: no

true

FlowLogs

object

FlowLog

array

The information about the flow log.

object

The information about the flow log.

Status

string

The status of the flow log. Valid values:

  • Active: The flow log is enabled.

  • Inactive: The flow log is disabled.

Active

CreationTime

string

The time when the flow log was created.

The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

2021-07-24T13:00:52Z

FlowLogName

string

The name of the flow log.

myFlowlog

Description

string

The description of the flow log.

myFlowlog

ProjectName

string

The name of the project that stores the captured traffic data.

FlowLogProject

CenId

string

The ID of the Cloud Enterprise Network (CEN) instance.

cen-7qthudw0ll6jmc****

LogStoreName

string

The Logstore that stores the captured traffic data.

FlowLogStore

RegionId

string

The region ID of the flow log.

cn-hangzhou

FlowLogId

string

The ID of the flow log.

flowlog-m5evbtbpt****

TransitRouterAttachmentId

string

The ID of the network instance connection

tr-attach-5x4o4ynzuqbv6g****

TransitRouterId

string

The ID of the transit router.

tr-bp1g9313sx675zr1lajmj

LogFormatString

string

The string that defines the format of the flow log. Format:

${Field 1}${Field 2}${Field 3}

${srcaddr}${dstaddr}${bytes}

FlowLogVersion

string

The flow log version.

Flow logs are automatically created in the latest version, which is 3.

3

Interval

integer

The time window for collecting log data. Unit: seconds. Valid values: 60 or 600 Default value: 600.

60

Tags

object

Tag

array

The tags.

object

Tag N to add to the instance.

Key

string

The tag key.

TagKey

Value

string

The tag value.

TagValue

Examples

Success response

JSON format

{
  "PageSize": "20",
  "PageNumber": "1",
  "RequestId": "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1",
  "TotalCount": "1",
  "Success": "true",
  "FlowLogs": {
    "FlowLog": [
      {
        "Status": "Active",
        "CreationTime": "2021-07-24T13:00:52Z",
        "FlowLogName": "myFlowlog",
        "Description": "myFlowlog",
        "ProjectName": "FlowLogProject",
        "CenId": "cen-7qthudw0ll6jmc****",
        "LogStoreName": "FlowLogStore",
        "RegionId": "cn-hangzhou",
        "FlowLogId": "flowlog-m5evbtbpt****",
        "TransitRouterAttachmentId": "tr-attach-5x4o4ynzuqbv6g****",
        "TransitRouterId": "tr-bp1g9313sx675zr1lajmj",
        "LogFormatString": "${srcaddr}${dstaddr}${bytes}",
        "FlowLogVersion": "3",
        "Interval": 60,
        "Tags": {
          "Tag": [
            {
              "Key": "TagKey",
              "Value": "TagValue"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 OperationUnsupported.action This action is not support. The error message returned because this operation is not supported in the specified region.
400 InvalidFlowlogId.NotFound The specified flowlog id does not exist or does not match the cen Id. The error message returned because the specified flow log does not exist.
400 IllegalParam.TagValue The tag values are not valid. The error message returned because the specified tag value is invalid.
400 IllegalParam.TagKey The tag keys are not valid. The error message returned because the specified tag key is invalid.
400 InvalidDescription Description is invalid. The error message returned because the description is invalid.
400 InvalidName Name is invalid. The error message returned because the specified name is invalid.
400 InvalidParameter.Interval Interval is invalid. The specified interval is invalid.
400 InvalidParameter.FlowLogVersion Flowlog version is invalid. The specified flowlog version is invalid.
400 InvalidParameter Invalid parameter. The error message returned because the parameter is set to an invalid value.
400 Unauthorized The AccessKeyId is unauthorized. The error message returned because you do not have the permissions to perform this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.