Mengaktifkan fitur Pencerminan lalu lintas untuk layanan. Setelah fitur diaktifkan, permintaan yang diterima oleh layanan dapat dicerminkan ke layanan lain.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eas:CreateServiceMirror |
create |
*Service
|
None | None |
Sintaks permintaan
POST /api/v2/services/{ClusterId}/{ServiceName}/mirror HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
ID wilayah tempat layanan diterapkan. |
cn-shanghai |
| ServiceName |
string |
Yes |
Nama layanan. Untuk informasi selengkapnya tentang cara mengkueri nama layanan, lihat ListServices. |
foo |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Badan permintaan. |
|
| Ratio |
integer |
No |
The percentage of the traffic that is mirrored to the destination service. Valid values: 0 to 100. |
30 |
| Target |
array |
No |
The instances. |
|
|
string |
No |
The name of the destination instance. |
echo |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
40325405-579C-4D82*** |
| Message |
string |
The returned message. |
Traffic mirroring is ON for service [foo] in region [cn-shanghai], ratio [70%] |
Contoh
Respons sukses
JSONformat
{
"RequestId": "40325405-579C-4D82***",
"Message": "Traffic mirroring is ON for service [foo] in region [cn-shanghai], ratio [70%]"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.