Membuat sesi traffic mirror dengan memanggil operasi CreateTrafficMirrorSession.
Deskripsi operasi
CreateTrafficMirrorSession adalah operasi asinkron. Setelah permintaan dikirim, sistem mengembalikan ID instans dan menjalankan tugas di latar belakang. Sesi traffic mirror mungkin belum dibuat pada saat ini. Anda dapat memanggil operasi ListTrafficMirrorSessions untuk mengkueri status dari sesi traffic mirror.
Jika sesi traffic mirror berada dalam status Creating, sesi sedang dibuat.
Jika sesi traffic mirror berada dalam status Created, sesi telah dibuat.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| TrafficMirrorSessionDescription |
string |
No |
Deskripsi dari sesi mirror lalu lintas. Deskripsi harus memiliki panjang 1 hingga 256 karakter dan tidak boleh diawali dengan |
This is a trafficmirrorsession. |
| TrafficMirrorSessionName |
string |
No |
Nama dari sesi mirror lalu lintas. Nama harus memiliki panjang 1 hingga 128 karakter dan tidak boleh diawali dengan |
test |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilai, tetapi Anda harus memastikan bahwa nilai tersebut unik di antara permintaan yang berbeda. Token hanya boleh berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan API sebagai nilai ClientToken. RequestId dari setiap permintaan API berbeda. |
0c593ea1-3bea-11e9-b96b-88e9fe63**** |
| DryRun |
boolean |
No |
Menentukan apakah akan melakukan dry run. Nilai yang valid:
|
false |
| TrafficMirrorTargetId |
string |
Yes |
ID dari tujuan mirror. Anda dapat menentukan antarmuka jaringan elastis (ENI) atau instans Server Load Balancer (SLB) yang menghadap internal sebagai tujuan mirror. |
eni-j6c8znm5l1yt4sox**** |
| TrafficMirrorTargetType |
string |
Yes |
Tipe dari tujuan mirror. Nilai yang valid:
|
NetworkInterface |
| TrafficMirrorFilterId |
string |
Yes |
ID dari filter. |
tmf-j6cmls82xnc86vtpe**** |
| VirtualNetworkId |
integer |
No |
Pengenal jaringan VXLAN (VNI). Nilai yang valid: 0 hingga 16777215. VNI digunakan untuk mengidentifikasi lalu lintas yang di-mirror dari sesi yang berbeda pada tujuan mirror. Anda dapat menentukan VNI khusus atau menggunakan VNI yang dialokasikan secara acak oleh sistem. Jika Anda ingin sistem mengalokasikan VNI secara acak, jangan tentukan parameter ini. |
1 |
| Priority |
integer |
Yes |
Prioritas dari sesi mirror lalu lintas. Nilai yang valid: 1 hingga 32766. Nilai yang lebih kecil menunjukkan prioritas yang lebih tinggi. Anda tidak dapat menentukan prioritas yang sama untuk sesi mirror lalu lintas yang dibuat di wilayah yang sama menggunakan akun Alibaba Cloud yang sama. |
1 |
| Enabled |
boolean |
No |
Menentukan apakah akan mengaktifkan sesi mirror lalu lintas. Nilai yang valid:
|
false |
| PacketLength |
integer |
No |
Unit transmisi maksimum (MTU). Nilai yang valid: 64 hingga 8500. Nilai default: 1500. Satuan: byte.
|
1500 |
| TrafficMirrorSourceIds |
array |
Yes |
ID dari sumber mirror. Anda hanya dapat menentukan ENI sebagai sumber mirror. Nilai default dari N adalah 1, yang menentukan bahwa Anda hanya dapat menambahkan satu sumber mirror ke sesi mirror lalu lintas. |
eni-j6c2fp57q8rr47rp**** |
|
string |
No |
ID dari sumber mirror. Anda hanya dapat menentukan ENI sebagai sumber mirror. Nilai default dari N adalah 1, yang menentukan bahwa Anda hanya dapat menambahkan satu sumber mirror ke sesi mirror lalu lintas. |
eni-j6c2fp57q8rr47rp**** |
|
| RegionId |
string |
Yes |
ID dari wilayah tempat sesi mirror lalu lintas berada. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru. Untuk informasi lebih lanjut tentang wilayah yang mendukung mirror lalu lintas, lihat Overview of traffic mirroring. |
cn-hongkong |
| ResourceGroupId |
string |
No |
ID dari grup sumber daya tempat lalu lintas yang di-mirror berada. |
rg-bp67acfmxazb4ph**** |
| Tag |
array<object> |
No |
Tag dari sumber daya. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag. Anda dapat menentukan paling banyak 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Kunci tag dapat memiliki panjang hingga 128 karakter dan tidak boleh diawali dengan |
FinanceDept |
| Value |
string |
No |
Nilai tag. Anda dapat menentukan paling banyak 20 nilai tag. Nilai tag dapat berupa string kosong. Nilai tag dapat memiliki panjang hingga 128 karakter dan tidak boleh diawali dengan |
FinanceJoshua |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
ID instans dari sesi mirror lalu lintas. |
||
| TrafficMirrorSessionId |
string |
ID instans dari sesi mirror lalu lintas. |
tms-j6ce5di4w7nvigfjz**** |
| RequestId |
string |
ID permintaan. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
| ResourceGroupId |
string |
ID dari grup sumber daya tempat lalu lintas yang di-mirror berada. |
rg-bp67acfmxazb4ph**** |
Contoh
Respons sukses
JSONformat
{
"TrafficMirrorSessionId": "tms-j6ce5di4w7nvigfjz****",
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
"ResourceGroupId": "rg-bp67acfmxazb4ph****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IncorrectBusinessStatus.TrafficMirror | The business status of traffic mirror is incorrect. | |
| 400 | OptInRequired.TrafficMirror | You need to subscribe to the traffic mirror service first. | |
| 400 | DuplicatedParam.SourceInstanceIds | The parameter of source instance IDs contains duplicate values. | |
| 400 | OperationDenied.DuplicateRole | The network interface must not be the source and the target of traffic mirror sessions at the same time. | |
| 400 | ResourceNotFound.NetworkInterface | The specified resource of %s is not found. | |
| 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 | ResourceNotFound.TrafficMirrorFilter | The specified resource of traffic mirror filter is not found. | |
| 400 | IncorrectStatus.TrafficMirrorFilter | The status of traffic mirror filter is incorrect. | |
| 400 | OperationDenied.EcsNotSupportTrafficMirror | The ECS instance does not support traffic mirroring. | |
| 400 | QuotaExceeded.SessionNum | The quota of the number of traffic mirror sessions is exceeded. | |
| 400 | QuotaExceeded.FilterRelatedSession | The quota of the number of traffic mirror sessions related to one filter is exceeded. | |
| 400 | QuotaExceeded.SourceNumPerSession | The quota of the number of traffic mirror sources per session is exceeded. | |
| 400 | QuotaExceeded.NetworkInterfaceRelatedSession | The quota of the number of traffic mirror sessions related to one network interface is exceeded. | |
| 400 | QuotaExceeded.SlbRelatedSession | The quota of the number of traffic mirror sessions related to one SLB is exceeded. | |
| 400 | UnsupportedRegion | The feature is not supported in current region. | |
| 400 | InvalidLoadBalancerId.NotFound | The specified resource of load balancer is not found. | |
| 400 | OperationDenied.FreeNetworkInterface | The network interface is not attached to any ECS instance. | |
| 400 | OperationDenied.ClassicSLB | The operation is not allowed because of ClassicSLB. | |
| 400 | ResourceNotFound.TargetInstance | The specified target instance for traffic mirroring is not found. | |
| 400 | QuotaExceeded.SourceNumPerTarget | The maximum number of traffic mirror sources for a target is exceeded. | |
| 400 | IncorrectStatus.NetworkInterface | The status of network interface is incorrect. | |
| 400 | OperationFailed.NotSupportBizType | The specified instance type does not support the operation. | |
| 400 | IllegalParam.Priority | The specified Priority is illegal or the same as other mirroring sessions. | |
| 400 | OperationDenied.UnsupportedTargetType | Traffic mirror target must be SLB if traffic mirror sources contain nat gateway network interface. | |
| 400 | OperationDenied.TargetTypeNotSupportGatewayLoadBalancerEndpoint | Operation denied because of target type can not be GatewayLoadBalancerEndpoint. | |
| 400 | OperationDenied.TargetTypeNotSupportBondEni | Operation denied because of target type can not be Bond Network Interface. | |
| 400 | OperationDenied.InvalidTargetBondEniType | The traffic mirroring target does not support the entered bond ENI type. | |
| 400 | OperationDenied.InvalidSourceBondEniType | The traffic mirroring source 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. | |
| 400 | OperationDenied.TrafficMirrorSessionSourceFullPacketNotSupport | The traffic mirror session does not support the feature of mirroring source full packet. | |
| 400 | QuotaExceeded.SessionNumPerTarget | The quota of the number of traffic mirror sessions per target is exceeded. | |
| 400 | OperationDenied.NotSupportBondEniAsTrafficMirrorSource | The operation is not allowed because bond eni cannot be the source of traffic mirror. | |
| 400 | IncorrectStatus.TrafficMirrorSessionTarget | The status of the target of the traffic mirror session is incorrect. | |
| 404 | ResourceNotFound.GatewayLoadBalancerEndpoint | GatewayLoadBalancerEndpoint instance not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.