Membuat aturan pemutusan sirkuit gerbang.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:CreateGatewayCircuitBreakerRule |
create |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| GatewayId |
integer |
No |
ID gerbang. |
14407 |
| GatewayUniqueId |
string |
Yes |
ID unik gerbang. |
gw-c9bc5afd61014165bd58f621b491***** |
| RouteId |
integer |
Yes |
ID entri rute. |
645 |
| RouteName |
string |
Yes |
Nama entri rute. |
routeName |
| Strategy |
integer |
Yes |
Tipe ambang batas. Nilai valid:
|
0 |
| TriggerRatio |
integer |
Yes |
Persentase permintaan yang memicu pemutusan sirkuit. |
10 |
| StatDurationSec |
integer |
Yes |
Durasi statistik untuk memicu pemutusan sirkuit. |
11 |
| RecoveryTimeoutSec |
integer |
Yes |
Periode waktu habis Pemutusan sirkuit. |
12 |
| MinRequestAmount |
integer |
Yes |
Jumlah minimum permintaan yang diperlukan untuk memicu pemutusan sirkuit. |
10 |
| MaxAllowedMs |
integer |
No |
Ambang batas dalam mode proporsi panggilan lambat. |
10 |
| BehaviorType |
integer |
Yes |
Tipe perilaku fallback web. Nilai valid:
|
0 |
| BodyEncoding |
integer |
No |
Tipe enkoding. Nilai valid:
|
0 |
| ResponseStatusCode |
integer |
No |
Kode status HTTP. |
429 |
| ResponseContentBody |
string |
No |
Teks HTTP yang dikembalikan. |
text |
| ResponseRedirectUrl |
string |
No |
URL Pengalihan. |
www.******.com |
| Enable |
integer |
Yes |
Apakah akan mengaktifkan aturan. Nilai valid:
|
0 |
| AcceptLanguage |
string |
No |
Bahasa untuk menampilkan hasil. Nilai valid:
|
zh |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
RestResult |
||
| RequestId |
string |
The request ID. |
DC34E4A3-5F1C-4E40-86EA-02EDF967**** |
| Data |
integer |
The ID of the circuit breaking rule that you create. |
28 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "DC34E4A3-5F1C-4E40-86EA-02EDF967****",
"Data": 28
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.