All Products
Search
Document Center

Virtual Private Cloud:DescribeFlowLogs

Last Updated:Jun 12, 2026

Mengkueri log aliran dengan memanggil operasi DescribeFlowLogs.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

vpc:DescribeFlowLogs

get

*FlowLog

acs:vpc:{#regionId}:{#accountId}: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 http:// atau https://.

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 http:// atau https://.

This is my Flowlog.

ResourceType

string

No

Tipe sumber daya trafik yang akan ditangkap. Nilai valid:

  • NetworkInterface: pengontrol antarmuka jaringan (NIC).

  • VSwitch: semua pengontrol antarmuka jaringan (NIC) di vSwitch.

  • VPC: semua pengontrol antarmuka jaringan (NIC) di virtual private cloud (VPC).

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: semua trafik.

  • Allow: trafik yang diizinkan oleh kontrol akses.

  • Drop: trafik yang ditolak oleh kontrol akses.

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: Log aliran aktif.

  • Activating: Log aliran sedang dibuat.

  • Inactive: Log aliran tidak aktif.

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 aliyun atau acs: dan tidak boleh mengandung http:// atau https://.

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 aliyun atau acs: dan tidak boleh mengandung http:// atau https://.

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: Pemanggilan berhasil.

  • false: Pemanggilan gagal.

true

FlowLogs

object

FlowLog

array<object>

Daftar log aliran.

array<object>

Daftar log aliran.

Status

string

The status of the flow log. Values:

  • Active: The flow log is in an active state.

  • Activating: The flow log is being created.

  • Inactive: The flow log is in an inactive state.

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: All traffic.

  • Allow: Traffic allowed by access control.

  • Drop: Traffic denied by access control.

All

ResourceType

string

The resource type of the traffic captured by the flow log:

  • NetworkInterface: Elastic network interface.

  • VSwitch: All elastic network interfaces within a VSwitch.

  • VPC: All elastic network interfaces within a VPC.

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: Normal status.

  • FinancialLocked: Locked due to unpaid bills.

Normal

AggregationInterval

integer

The sampling interval of the flow log. Unit: minutes.

10

TrafficPath

object

TrafficPathList

array

The path of the captured traffic. Values:

  • all: Indicates full collection.

  • internetGateway: Indicates public network traffic collection.

string

The path of the collected traffic. Values:

  • all (default): indicates full collection.

  • internetGateway: indicates public network traffic collection.

all

ServiceType

string

The hosting type of the cloud service.

  • It can be empty, indicating that the flow log was created by the user.

  • When not empty, the only supported value is: sls, indicating that the flow log was created through the Log Service console.

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:

  • SUCCESS: Delivery succeeded.

  • FAILED: Delivery failed.

FAILED

FlowLogDeliverErrorMessage

string

When log delivery fails, you can troubleshoot based on the error messages. Possible error messages include:

  • UnavaliableTarget: The Logstore of the Log Service SLS is unavailable and cannot receive logs. It is recommended to check if the corresponding Logstore actually exists and is accessible.

  • ProjectNotExist: The Project of the Log Service SLS does not exist. It is suggested to delete the original flow log and create a new one pointing to an existing Project.

  • UnknownError: An internal error has occurred. Please try again later.

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.