All Products
Search
Document Center

Virtual Private Cloud:UpdateTrafficMirrorSessionAttribute

Last Updated:Jun 12, 2026

Mengubah konfigurasi sesi pencerminan Trafik.

Deskripsi operasi

  • UpdateTrafficMirrorSessionAttribute adalah operasi asinkron. Setelah Anda mengirim permintaan, sistem akan mengembalikan ID permintaan. Namun, konfigurasi sesi pencerminan Trafik belum diubah karena tugas modifikasi masih berjalan di latar belakang. Anda dapat memanggil ListTrafficMirrorSessions untuk mengkueri status modifikasi konfigurasi sesi pencerminan Trafik:
    • Jika konfigurasi sesi pencerminan Trafik berada dalam status Modifying, konfigurasi sedang dimodifikasi.

    • Jika konfigurasi sesi pencerminan Trafik berada dalam status Created, konfigurasi telah dimodifikasi.

  • UpdateTrafficMirrorSessionAttribute tidak mendukung modifikasi konkuren pada sesi pencerminan Trafik yang sama.

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:UpdateTrafficMirrorSessionAttribute

update

*TrafficMirrorSession

acs:vpc:{#regionId}:{#accountId}:trafficmirrorsession/{#TrafficMirrorSessionId}

TrafficMirrorFilter

acs:vpc:{#regionId}:{#accountId}:trafficmirrorfilter/{#TrafficMirrorFilterId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

TrafficMirrorSessionDescription

string

No

Deskripsi baru untuk sesi pencerminan Trafik.

Panjang deskripsi harus 1 hingga 256 karakter dan tidak boleh diawali dengan http:// atau https://.

This is a new session.

TrafficMirrorSessionName

string

No

Nama baru untuk sesi pencerminan Trafik.

Panjang nama harus 1 hingga 128 karakter dan tidak boleh diawali dengan http:// atau https://.

abc

ClientToken

string

No

Token klien yang digunakan untuk memastikan idempotensi permintaan.

Anda dapat menggunakan klien untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. Nilai ClientToken hanya dapat berisi karakter ASCII.

Catatan

Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan API sebagai ClientToken. RequestId dapat berbeda untuk setiap permintaan API.

0c593ea1-3bea-11e9-b96b-88e9fe63****

DryRun

boolean

No

Apakah akan menjalankan dry run. Nilai valid:

  • true: menjalankan dry run. Sistem memeriksa parameter wajib, sintaks permintaan, dan batasan bisnis. Jika permintaan gagal dalam dry run, Paket error akan dikembalikan. Jika permintaan berhasil dalam dry run, kode kesalahan DryRunOperation akan dikembalikan.

  • false (default): menjalankan dry run dan mengirim permintaan. Jika permintaan berhasil dalam dry run, kode status HTTP 2xx akan dikembalikan dan konfigurasi sesi pencerminan Trafik akan dimodifikasi.

false

TrafficMirrorSessionId

string

Yes

ID Instans sesi pencerminan Trafik yang akan dimodifikasi.

tms-j6cla50buc44ap8tu****

TrafficMirrorTargetId

string

No

ID Instans tujuan pencerminan Trafik yang baru.

eni-j6c2fp57q8rr47rp*****

TrafficMirrorTargetType

string

No

Jenis tujuan pencerminan Trafik yang baru. Nilai valid:

  • NetworkInterface: antarmuka jaringan elastis (ENI).

  • SLB: Instance SLB internal.

NetworkInterface

TrafficMirrorFilterId

string

No

ID Instans filter pencerminan Trafik yang baru.

tmf-j6cmls82xnc86vtpe****

VirtualNetworkId

integer

No

Pengenal jaringan VXLAN (VNI) baru yang digunakan untuk membedakan data yang dicerminkan. Nilai valid: 0 hingga 16777215. Anda dapat menggunakan VNI untuk mengidentifikasi data yang dicerminkan dari sesi yang berbeda pada tujuan pencerminan Trafik. Anda dapat menentukan VNI kustom atau membiarkan sistem mengalokasikan secara acak. Jika Anda ingin sistem mengalokasikan nilai acak, kosongkan parameter ini.

10

Priority

integer

No

Prioritas baru untuk sesi pencerminan Trafik. Nilai valid: 1 hingga 32766. Nilai yang lebih kecil menunjukkan prioritas yang lebih tinggi. Prioritas sesi pencerminan Trafik yang dibuat oleh akun yang sama di wilayah yang sama harus unik.

2

PacketLength

integer

No

Panjang maksimum paket asli yang akan dicerminkan, tidak termasuk Header VXLAN. Nilai default: 1500. Nilai valid: 64 hingga 8500. Unit: bytes.

  • Parameter ini memengaruhi panjang paket yang diterima pada tujuan pencerminan Trafik. Untuk informasi selengkapnya, lihat batas panjang paket yang dicerminkan dan MTU di Ikhtisar Pencerminan Trafik.

  • Parameter ini hanya tersedia di wilayah tertentu. Untuk informasi selengkapnya, lihat deskripsi parameter panjang paket yang dicerminkan di Membuat dan mengelola sesi pencerminan Trafik.

1500

Enabled

boolean

No

Apakah akan mengaktifkan sesi pencerminan Trafik. Nilai valid:

  • false (default): tidak mengaktifkan sesi pencerminan Trafik.

  • true: mengaktifkan sesi pencerminan Trafik.

false

RegionId

string

Yes

ID wilayah sesi pencerminan Trafik. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. Untuk informasi mengenai wilayah yang mendukung Pencerminan lalu lintas, lihat Ikhtisar Pencerminan lalu lintas.

cn-hongkong

Elemen respons

Element

Type

Description

Example

object

ID permintaan.

RequestId

string

ID permintaan.

64DCAF03-E2C7-479A-ACEA-38B79876B006

Contoh

Respons sukses

JSONformat

{
  "RequestId": "64DCAF03-E2C7-479A-ACEA-38B79876B006"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IncorrectBusinessStatus.TrafficMirror The business status of traffic mirror is incorrect. Traffic mirroring is in an invalid state.
400 OptInRequired.TrafficMirror You need to subscribe to the traffic mirror service first. Traffic mirroring is disabled.
400 DuplicatedParam.Priority The specified priority conflicts with the existing priority. The specified priority is the same as an existing one.
400 ResourceNotFound.TrafficMirrorSession The specified resource of traffic mirror session is not found.
400 IncorrectStatus.TrafficMirrorSession The status of traffic mirror session is incorrect.
400 ResourceNotFound.TrafficMirrorFilter The specified resource of traffic mirror filter is not found. The specified filter does not exist.
400 IncorrectStatus.TrafficMirrorFilter The status of traffic mirror filter is incorrect. The filter is in an invalid state.
400 QuotaExceeded.FilterRelatedSession The quota of the number of traffic mirror sessions related to one filter is exceeded. The number of traffic mirror sessions associated with the filter has reached the upper limit.
400 ResourceNotFound.NetworkInterface The specified resource of network interface is not found. The specified ENI does not exist.
400 ResourceNotFound.EcsInstance The specified resource of ECS instance is not found.
400 ResourceNotFound.Slb The specified resource of SLB is not found.
400 OperationDenied.SlbNotInVpc The specified SLB is not in any VPC.
400 QuotaExceeded.NetworkInterfaceRelatedSession The quota of the number of traffic mirror sessions related to one network interface is exceeded. The number of traffic mirror sessions associated with an ENI has reached the upper limit.
400 QuotaExceeded.SlbRelatedSession The quota of the number of traffic mirror sessions related to one SLB is exceeded. The number of traffic mirror sessions associated with an SLB instance has reached the upper limit.
400 OperationDenied.EcsNotSupportTrafficMirror The ECS instance does not support traffic mirroring.
400 OperationDenied.DuplicateRole The network interface must not be the source and the target of traffic mirror sessions at the same time.
400 InvalidLoadBalancerId.NotFound The specified resource of load balancer is not found. The SLB instance does not exist.
400 OperationDenied.FreeNetworkInterface The network interface is not attached to any ECS instance. The ENI is not associated with an ECS instance.
400 OperationDenied.ClassicSLB The operation is not allowed because of ClassicSLB. The error message returned because you cannot perform the operation on a CLB instance.
400 QuotaExceeded.SourceNumPerTarget The maximum number of traffic mirror sources for a target is exceeded. The number of traffic mirror sources associated with the image exceeds the upper limit.
400 OperationFailed.NotSupportBizType The specified instance type does not support the operation. The specified instance type does not support the operation.
400 OperationDenied.UnsupportedTargetType Traffic mirror target must be SLB if traffic mirror sources contain nat gateway network interface. When a NAT gateway NIC exists in the traffic mirroring source, the traffic mirroring purpose must be SLB type.
400 OperationDenied.TargetTypeNotSupportBondEni Operation denied because of target type can not be Bond Network Interface. Operation denied because of target type can not be Bond Network Interface.
400 OperationDenied.TargetTypeNotSupportGatewayLoadBalancerEndpoint Operation denied because of target type can not be GatewayLoadBalancerEndpoint. Gateway-based load balancing endpoints are not supported as traffic mirrors mu d
400 OperationDenied.InvalidTargetBondEniType The traffic mirroring target does not support the entered bond ENI type. The traffic mirroring target does not support the entered bond ENI type.
400 OperationDenied.TargetTypeNotSupportTrafficMirrorFullPacket The traffic mirror session target type does not support the feature of mirroring source full packet. The traffic mirror session target type does not support the feature of mirroring source full packet
400 OperationDenied.TrafficMirrorSessionSourceFullPacketNotSupport The traffic mirror session does not support the feature of mirroring source full packet. Traffic mirror currently does not support source full packet mirroring. TrafficMirrorSourceTruncateMode can only be set to 0, which is the default mode.
500 OperationFailed.GetEniInfo The back-end service failed to query the NIC information. The back-end service failed to query the NIC information.
404 ResourceNotFound.GatewayLoadBalancerEndpoint GatewayLoadBalancerEndpoint instance not found. GatewayLoadBalancerEndpoint instance not found.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.