Queries the information about 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 |
---|---|---|---|---|
vpc:DescribeFlowLogs | get | *FlowLog acs:vpc:{#regionId}:{#accountId}:flowlog/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the flow log. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
FlowLogName | string | No | The name of the flow log. The name must be 1 to 128 characters in length, and cannot start with | myFlowlog |
FlowLogId | string | No | The ID of the flow log. | fl-bp1f6qqhsrc2c12ta**** |
Description | string | No | The description of the flow log. The description must be 1 to 256 characters in length, and cannot start with | This is my Flowlog. |
ResourceType | string | No | The type of resource from which traffic is captured. Valid values:
| NetworkInterface |
ResourceId | string | No | The ID of the resource from which traffic is captured. | eni-askldfas**** |
TrafficType | string | No | The type of traffic that is captured. Valid values:
| All |
ProjectName | string | No | The project that manages the captured traffic data. | FlowLogProject |
LogStoreName | string | No | The Logstore that stores the captured traffic data. | FlowLogStore |
Status | string | No | The status of the flow log. Valid values:
| Active |
PageNumber | integer | No | The number of the page to return. Default value: 1. | 1 |
PageSize | integer | No | The number of entries to return on each page. Maximum value: 50. Default value: 20. | 20 |
VpcId | string | No | The ID of the VPC to which the flow log belongs. | vpc-bp1nwd16gvo1wgs**** |
ResourceGroupId | string | No | The ID of the resource group to which the flow log belongs. | rg-bp67acfmxazb4ph**** |
Tags | array<object> | No | The list of tags. | |
object | No | |||
Key | string | No | The key of tag N to add to the resource. You can specify at most 20 tag keys. The tag key cannot be an empty string. The tag key can be at most 128 characters in length. It cannot start with | FinanceDept |
Value | string | No | The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with | FinanceJoshua |
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": "2022-01-21T03:08:50Z",
"FlowLogName": "myFlowlog",
"TrafficType": "All",
"ResourceType": "NetworkInterface",
"Description": "Description",
"ProjectName": "FlowLogProject",
"LogStoreName": "FlowLogStore",
"ResourceId": "eni-askldfas****",
"RegionId": "cn-hangzhou",
"FlowLogId": "fl-bp1f6qqhsrc2c12ta****",
"BusinessStatus": "Normal",
"AggregationInterval": 10,
"TrafficPath": {
"TrafficPathList": [
"all"
]
},
"ServiceType": "sls",
"ResourceGroupId": "rg-bp67acfmxazb4ph****",
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
},
"FlowLogDeliverStatus": "FAILED",
"FlowLogDeliverErrorMessage": "UnavaliableTarget"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidInstanceId | Instance does not exist. | The error message returned because the specified instance does not exist. |
400 | ProjectOrLogstoreNotExist | The specified project or logstore does not exist. | The error message returned because the specified project or Logstore does not exist. |
400 | SourceProjectNotExist | The Source Project or logstore does not exist. | The error message returned because the source project or Logstore does not exist. |
400 | Unauthorized | This api does not support sub user or role. | The error message returned because you cannot call this operation as a RAM user. |
400 | ParameterInvalid | Invalid parameter. | The error message returned because a parameter is invalid. |
400 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | The RegionId parameter is set to an invalid value. Specify a valid value and try again. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-25 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-07-06 | The Error code has changed. The response structure of the API has changed | View Change Details |
2022-03-14 | The Error code has changed. The response structure of the API has changed | View Change Details |