Queries flow logs.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cen:DescribeFlowlogs | get | *Flowlog acs:cbn:{#regionId}:{#accountId}:flowlog/* *Flowlog acs:cbn:{#regionId}:{#accountId}:flowlog/{#FlowLogId} |
| 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 |
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<object> | 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 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 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
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-14 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-05-22 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-12-13 | The Error code has changed | View Change Details |
2023-01-09 | The Error code has changed. The response structure of the API has changed | View Change Details |
2022-12-02 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2022-09-14 | The Error code has changed | View Change Details |
2022-09-14 | The Error code has changed | View Change Details |