All Products
Search
Document Center

Cloud Enterprise Network:DescribeFlowlogs

Last Updated:Oct 22, 2024

Queries flow logs.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cen:DescribeFlowlogsget
  • Flowlog
    acs:cbn:{#regionId}:{#accountId}:flowlog/*
  • Flowlog
    acs:cbn:{#regionId}:{#accountId}:flowlog/{#FlowLogId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

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****
RegionIdstringNo

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
FlowLogNamestringNo

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
FlowLogIdstringNo

The ID of the flow log.

flowlog-m5evbtbpt****
DescriptionstringNo

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
CenIdstringNo

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

cen-7qthudw0ll6jmc****
ProjectNamestringNo

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
LogStoreNamestringNo

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
StatusstringNo

The status of the flow log. Valid values:

  • Active: The flow log is enabled.
  • Inactive: The flow log is disabled.
Active
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

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

20
Tagarray<object>No

The information about the tags.

You can specify at most 20 tags in each call.

objectNo
KeystringNo

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
ValuestringNo

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
TransitRouterAttachmentIdstringNo

The ID of the network instance connection.

tr-attach-qieks13jnt1cchy****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

PageSizestring

The number of entries returned per page.

20
PageNumberstring

The page number of the returned page.

1
RequestIdstring

The ID of the request.

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

The total number of entries returned.

1
Successstring

Indicates whether the call is successful. Valid values:

  • true: yes
  • false: no
true
FlowLogsarray<object>

The information about the flow log.

FlowLogobject

The information about the flow log.

Statusstring

The status of the flow log. Valid values:

  • Active: The flow log is enabled.
  • Inactive: The flow log is disabled.
Active
CreationTimestring

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
FlowLogNamestring

The name of the flow log.

myFlowlog
Descriptionstring

The description of the flow log.

myFlowlog
ProjectNamestring

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

FlowLogProject
CenIdstring

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

cen-7qthudw0ll6jmc****
LogStoreNamestring

The Logstore that stores the captured traffic data.

FlowLogStore
RegionIdstring

The region ID of the flow log.

cn-hangzhou
FlowLogIdstring

The ID of the flow log.

flowlog-m5evbtbpt****
TransitRouterAttachmentIdstring

The ID of the network instance connection

tr-attach-5x4o4ynzuqbv6g****
Intervallong

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

60
Tagsarray<object>

A list of tags.

Tagobject
Keystring

The tag key.

TagKey
Valuestring

The tag value.

TagValue

Examples

Sample success responses

JSONformat

{
  "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": "",
        "LogFormatString": "",
        "FlowLogVersion": "",
        "Interval": 60,
        "Tags": {
          "Tag": [
            {
              "Key": "TagKey",
              "Value": "TagValue"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400OperationUnsupported.actionThis action is not support.The error message returned because this operation is not supported in the specified region.
400InvalidFlowlogId.NotFoundThe 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.
400IllegalParam.TagValueThe tag values are not valid.The error message returned because the specified tag value is invalid.
400IllegalParam.TagKeyThe tag keys are not valid.The error message returned because the specified tag key is invalid.
400InvalidDescriptionDescription is invalid.The error message returned because the description is invalid.
400InvalidNameName is invalid.The error message returned because the specified name is invalid.
400InvalidParameter.IntervalInterval is invalid.The specified interval is invalid.
400InvalidParameter.FlowLogVersionFlowlog version is invalid.The specified flowlog version is invalid.
400InvalidParameterInvalid parameter.The error message returned because the parameter is set to an invalid value.
400UnauthorizedThe AccessKeyId is unauthorized.The error message returned because you do not have the permissions to perform this operation.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-05-22The Error code has changed. The response structure of the API has changedView Change Details
2023-12-13The Error code has changedView Change Details
2023-01-09The Error code has changed. The response structure of the API has changedView Change Details
2022-12-02The Error code has changed. The request parameters of the API has changedView Change Details
2022-09-14The Error code has changedView Change Details
2022-09-14The Error code has changedView Change Details