Mengkueri log aliran dengan memanggil operasi DescribeFlowLogs.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeFlowLogs |
get |
*FlowLog
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah log aliran. Anda dapat memanggil operasi DescribeRegions untuk mengkueri ID wilayah. |
cn-hangzhou |
| FlowLogName |
string |
No |
Nama log aliran. Panjang nama harus 1 hingga 128 karakter dan tidak boleh diawali dengan |
myFlowlog |
| FlowLogId |
string |
No |
ID log aliran. |
fl-bp1f6qqhsrc2c12ta**** |
| Description |
string |
No |
Deskripsi log aliran. Panjang deskripsi harus 1 hingga 256 karakter dan tidak boleh diawali dengan |
This is my Flowlog. |
| ResourceType |
string |
No |
Tipe sumber daya trafik yang akan ditangkap. Nilai valid:
|
NetworkInterface |
| ResourceId |
string |
No |
ID sumber daya yang trafiknya ingin Anda tangkap. |
eni-askldfas**** |
| TrafficType |
string |
No |
Tipe trafik yang akan dikumpulkan. Nilai valid:
|
All |
| ProjectName |
string |
No |
Nama proyek yang mengelola trafik yang ditangkap. |
FlowLogProject |
| LogStoreName |
string |
No |
Nama penyimpanan log yang menyimpan trafik yang ditangkap. |
FlowLogStore |
| Status |
string |
No |
Status log aliran. Nilai valid:
|
Active |
| PageNumber |
integer |
No |
Nomor halaman. Nilai default: 1. |
1 |
| PageSize |
integer |
No |
Jumlah entri per halaman dalam kueri penomoran halaman. Nilai maksimum: 50. Nilai default: 20. |
20 |
| VpcId |
string |
No |
ID VPC tempat log aliran berada. |
vpc-bp1nwd16gvo1wgs**** |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya tempat log aliran berada. |
rg-bp67acfmxazb4ph**** |
| Tags |
array<object> |
No |
Daftar tag. |
|
|
object |
No |
Daftar tag. |
||
| Key |
string |
No |
Kunci tag sumber daya. Anda dapat menentukan hingga 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Panjang kunci tag dapat mencapai 128 karakter. Tidak boleh diawali dengan |
FinanceDept |
| Value |
string |
No |
Nilai tag sumber daya. Anda dapat menentukan hingga 20 nilai tag. Nilai tag dapat berupa string kosong. Panjang nilai tag dapat mencapai 128 karakter. Tidak boleh diawali dengan |
FinanceJoshua |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Informasi detail tentang log aliran. |
||
| PageSize |
string |
Jumlah entri per halaman dalam kueri penomoran halaman. |
20 |
| PageNumber |
string |
Nomor halaman. |
1 |
| RequestId |
string |
ID permintaan. |
F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1 |
| TotalCount |
string |
Jumlah total entri yang dikembalikan. |
1 |
| Success |
string |
Apakah pemanggilan berhasil. Nilai valid:
|
true |
| FlowLogs |
object |
||
| FlowLog |
array<object> |
Daftar log aliran. |
|
|
array<object> |
Daftar log aliran. |
||
| Status |
string |
The status of the flow log. Values:
|
Active |
| CreationTime |
string |
The creation time of the flow log. |
2022-01-21T03:08:50Z |
| FlowLogName |
string |
The name of the flow log. |
myFlowlog |
| TrafficType |
string |
The type of traffic captured by the flow log. Values:
|
All |
| ResourceType |
string |
The resource type of the traffic captured by the flow log:
|
NetworkInterface |
| Description |
string |
The description of the flow log. |
Description |
| ProjectName |
string |
The Project that manages the captured traffic. |
FlowLogProject |
| LogStoreName |
string |
The Logstore where the captured traffic is stored. |
FlowLogStore |
| ResourceId |
string |
The resource ID of the traffic captured by the flow log. |
eni-askldfas**** |
| RegionId |
string |
The region ID to which the flow log belongs. |
cn-hangzhou |
| FlowLogId |
string |
The ID of the flow log. |
fl-bp1f6qqhsrc2c12ta**** |
| BusinessStatus |
string |
The business status. Values:
|
Normal |
| AggregationInterval |
integer |
The sampling interval of the flow log. Unit: minutes. |
10 |
| TrafficPath |
object |
||
| TrafficPathList |
array |
The path of the captured traffic. Values:
|
|
|
string |
The path of the collected traffic. Values:
|
all |
|
| ServiceType |
string |
The hosting type of the cloud service.
Catatan
Flow log instances created through the Log Service console can be displayed in the VPC list, but they cannot be modified, started, stopped, or deleted within the VPC. If you need to perform these operations on the flow log, you can log in to the Log Service console to modify, start, stop, or delete it. |
sls |
| ResourceGroupId |
string |
The ID of the resource group to which the flow log belongs. |
rg-bp67acfmxazb4ph**** |
| Tags |
object |
||
| Tag |
array<object> |
List of tags |
|
|
object |
List of tags |
||
| Key |
string |
Tag key. |
FinanceDept |
| Value |
string |
Tag value. |
FinanceJoshua |
| FlowLogDeliverStatus |
string |
The delivery status of the flow log, with values:
|
FAILED |
| FlowLogDeliverErrorMessage |
string |
When log delivery fails, you can troubleshoot based on the error messages. Possible error messages include:
|
UnavaliableTarget |
| IpVersion |
string |
The type of IP address for collecting flow log traffic. |
IPv4 |
Contoh
Respons sukses
JSONformat
{
"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",
"IpVersion": "IPv4"
}
]
}
}
Kode kesalahan
|
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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.