速度制限ルールを作成します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
mse:CreateFlowRule |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| Namespace |
string |
必須 |
名前空間。 |
default |
| AppName |
string |
必須 |
アプリケーション名。 |
spring-cloud-a |
| Threshold |
integer |
必須 |
速度制限のしきい値。 |
20 |
| Enable |
boolean |
必須 |
ルールを有効にするかどうかを指定します。 列挙値:
|
false |
| Resource |
string |
必須 |
インターフェイスリソース名。 |
/b |
| AppId |
string |
任意 |
アプリケーション ID。 |
ib09eblv6p@c3df23522****** |
| ControlBehavior |
integer |
任意 |
速度制限の効果。 列挙値:
|
0 |
| MaxQueueingTimeMs |
integer |
任意 |
タイムアウト期間。単位: ミリ秒。ControlBehavior パラメーターが 2 に設定されている場合、このパラメーターは必須です。 |
10 |
| RegionId |
string |
任意 |
クラスターが存在するリージョン。 |
cn-hangzhou |
| ResourceType |
integer |
任意 |
インターフェイスリソースタイプ。 |
1 |
| LimitApp |
string |
任意 |
リクエストのソースアプリケーション。 |
spring-cloud-a |
| AcceptLanguage |
string |
任意 |
応答の言語。有効な値:
|
zh |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| Message |
string |
The returned message. |
|
| RequestId |
string |
The request ID. |
69AD2AA7-DB47-449B-941B-B14409DF**** |
| Code |
string |
The response code. |
200 |
| Data |
object |
The data returned. |
|
| Namespace |
string |
The namespace. |
default |
| Id |
integer |
The ID. |
12 |
| AppName |
string |
The name of the application. |
spring-cloud-a |
| Resource |
string |
The interface resource name. |
app |
| ControlBehavior |
integer |
The throttling effect. 列挙値:
|
0 |
| MaxQueueingTimeMs |
integer |
The timeout period for queuing when the ControlBehavior parameter is set to 2. Unit: milliseconds. |
500 |
| Threshold |
number |
The throttling threshold. |
200 |
| Enable |
boolean |
Indicates whether the rule is enabled. 列挙値:
|
true |
| AppId |
string |
The application ID. |
hkhon1po62@54e1f42f3****** |
| RegionId |
string |
The region of the gateway. |
cn-hangzhou |
| LimitApp |
string |
The source application of the request. |
spring-cloud-a |
| Success |
boolean |
The result of the request. 列挙値:
|
true |
例
成功レスポンス
JSONJSON
{
"Message": "",
"RequestId": "69AD2AA7-DB47-449B-941B-B14409DF****",
"Code": "200",
"Data": {
"Namespace": "default",
"Id": 12,
"AppName": "spring-cloud-a",
"Resource": "app",
"ControlBehavior": 0,
"MaxQueueingTimeMs": 500,
"Threshold": 200,
"Enable": true,
"AppId": "hkhon1po62@54e1f42f3******",
"RegionId": "cn-hangzhou",
"LimitApp": ""
},
"Success": true
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | |
| 400 | InvalidParameter | Parameter error:%s | |
| 500 | InternalError | Console error. Try again later:%s | |
| 403 | NoPermission | You are not authorized to perform this operation:%s | |
| 404 | NotFound | Not found:%s |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。