Menambahkan sumber pencerminan Trafik ke sesi pencerminan Trafik dengan memanggil operasi AddSourcesToTrafficMirrorSession.
Deskripsi operasi
- AddSourcesToTrafficMirrorSession adalah operasi asinkron. Setelah permintaan dikirim, sistem mengembalikan ID permintaan. Namun, sumber pencerminan Trafik belum ditambahkan, dan tugas penambahan masih berjalan di latar belakang. Anda dapat memanggil ListTrafficMirrorSessions untuk mengkueri status penambahan sumber pencerminan Trafik:
Jika sesi pencerminan Trafik berada dalam status Modifying, sumber pencerminan Trafik sedang ditambahkan.
Jika sesi pencerminan Trafik berada dalam status Created, sumber pencerminan Trafik telah ditambahkan.
AddSourcesToTrafficMirrorSession tidak mendukung permintaan bersamaan untuk menambahkan sumber pencerminan Trafik ke sesi pencerminan Trafik yang sama.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:AddSourcesToTrafficMirrorSession |
update |
*TrafficMirrorSession
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| 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 nilai RequestId sebagai nilai ClientToken. Nilai RequestId mungkin berbeda untuk setiap permintaan API. |
0c593ea1-3bea-11e9-b96b-88e9fe63**** |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run. Nilai valid:
|
false |
| TrafficMirrorSessionId |
string |
Yes |
ID instans sesi pencerminan Trafik tempat Anda ingin menambahkan sumber pencerminan Trafik. |
tms-j6cla50buc44ap8tu**** |
| TrafficMirrorSourceIds |
array |
Yes |
ID instans sumber pencerminan Trafik yang akan ditambahkan. Saat ini, hanya elastic network interfaces (ENI) yang didukung sebagai sumber pencerminan Trafik. Nilai default N adalah 1, yang menunjukkan bahwa Anda hanya dapat menambahkan satu sumber pencerminan Trafik ke sesi pencerminan Trafik. |
eni-j6ccmrl8z3xkvxgw**** |
|
string |
No |
ID instans sumber pencerminan Trafik yang akan ditambahkan. Saat ini, hanya elastic network interfaces (ENI) yang didukung sebagai sumber pencerminan Trafik. Nilai default N adalah 1, yang menunjukkan bahwa Anda hanya dapat menambahkan satu sumber pencerminan Trafik ke sesi pencerminan Trafik. |
eni-j6c8znm5l1yt4sox**** |
|
| RegionId |
string |
Yes |
ID wilayah sesi pencerminan Trafik. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru. Untuk informasi selengkapnya tentang wilayah yang mendukung Pencerminan lalu lintas, lihat Ikhtisar Pencerminan lalu lintas. |
cn-hongkong |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
87F70089-5B38-41A8-BAD8-0B55E2F8DC57 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "87F70089-5B38-41A8-BAD8-0B55E2F8DC57"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IncorrectBusinessStatus.TrafficMirror | The business status of traffic mirror is incorrect. | The business status of the traffic mirror is incorrect. |
| 400 | OptInRequired.TrafficMirror | You need to subscribe to the traffic mirror service first. | The traffic mirror service is not activated. |
| 400 | DuplicatedParam.SourceInstanceIds | The parameter of source instance IDs contains duplicate values. | The traffic mirror source instance ID parameter contains duplicate values. |
| 400 | ResourceNotFound.TrafficMirrorSession | The specified resource of traffic mirror session is not found. | The specified traffic mirror session does not exist. |
| 400 | IncorrectStatus.TrafficMirrorSession | The status of traffic mirror session is incorrect. | The status of the traffic mirror session is incorrect. |
| 400 | ResourceAlreadyAssociated.TrafficMirrorSource | The specified traffic mirror source and session are already associated. | The specified traffic mirror source and session are already associated. |
| 400 | ResourceNotFound.NetworkInterface | The specified resource of %s is not found. | The specified NetworkInterface %s does not exist. |
| 400 | ResourceNotFound.EcsInstance | The specified resource of ECS instance is not found. | The specified ECS instance does not exist. |
| 400 | OperationDenied.EcsNotSupportTrafficMirror | The ECS instance does not support traffic mirroring. | 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. | A network interface cannot be the source and the target of a traffic mirror session at the same time. |
| 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 that can be associated with a single network interface has exceeded the quota. |
| 400 | OperationDenied.FreeNetworkInterface | The network interface is not attached to any ECS instance. | The specified network interface is not attached to any ECS instance. |
| 400 | QuotaExceeded.SourceNumPerSession | The quota of the number of traffic mirror sources per session is exceeded. | The number of sources that can be associated with each traffic mirror session has exceeded the quota. |
| 400 | QuotaExceeded.SourceNumPerTarget | The maximum number of traffic mirror sources for a target is exceeded. | The number of traffic mirror sources associated with the traffic mirror target has exceeded the limit. |
| 400 | OperationUnsupported.BondingNetworkInterface | The specified traffic mirror source is bonding eni without slave. | The current operation does not support a bonding network interface without a slave. |
| 400 | OperationDenied.UnsupportedTargetType | Traffic mirror target must be SLB if traffic mirror sources contain nat gateway network interface. | If the traffic mirror source contains a NAT gateway network interface, the traffic mirror target must be of SLB type. |
| 400 | OperationDenied.InvalidSourceBondEniType | The traffic mirroring source does not support the entered bond ENI type. | The traffic mirror source does not support the specified managed elastic network interface type. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.