この操作は、タグルーティングルールを変更するために使用されます。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
mse:ApplyTagPolicies |
update |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| Region |
string |
任意 |
リージョン。 |
cn-hangzhou |
| Namespace |
string |
任意 |
アプリケーションの MSE 名前空間。 |
default |
| AppName |
string |
任意 |
アプリケーション名。 |
example-app |
AppId
deprecated
|
string |
必須 |
アプリケーション ID。 |
h5pohqu3gd@xxx |
| Rules |
object |
任意 |
ルーティングルール。 |
{ "blue": { # Tag key. "rate": 20, # Rate. A value of 20 indicates that 20% of the traffic is routed to the node identified by the tag. "name": "luoye-route-test", # Routing rule name. "carryData": false, # Specifies whether to enable pass-through. This parameter is applicable to end-to-end canary release. "rules": { # Rule information. "dubbo": \[{ # Dubbo rule. The system also supports Spring Cloud and Istio rule. "serviceName": "com.taobao.hsf.common.DemoService", # Service name (operation name). "group": "", # Group name. "version": "", # Service version. "methodName": "sayHello", # Method name. "condition": "AND", # Logical operator used by the following items. Valid values: AND and OR. "argumentItems": \[{ # Array of rule details. "index": 0, # Index field. "expr": "", # Expression. Its details is described below. "operator": "rawvalue", # The comparison mode. A value of rawvalue indicates direct comparison. A value of mode indicates the modulo operation. A value of list indicates using a whitelist. "value": "jim", # Base value. The value obtained by the expression will be compared with this value. If operator is set to list, separate the items specified for this parameter with commas (,). Example: 1,2,3. "cond": "==" # Comparison operator. Valid values: >=, <=, >, <, and ==. }] }] } }, "\_base": { # Another tag key. "rate": 80 # Rate. A value of 20 indicates that 20% of the traffic is routed to the node identified by the tag. } } |
|
object |
任意 |
|||
| Status |
integer |
任意 |
ステータス。 列挙値:
|
0 |
| Rate |
integer |
任意 |
パーセンテージ。 |
10 |
| Enable |
boolean |
任意 |
ルールを有効にするかどうかを指定します。 |
true |
| Tag |
string |
任意 |
ルーティングルールの環境。 |
gray |
| Name |
string |
任意 |
ルーティングルールの名前。 |
gray |
| Id |
integer |
任意 |
ルール ID。 |
1 |
| InstanceNum |
integer |
任意 |
インスタンス数。 |
10 |
| Rules |
object |
任意 |
ルールの詳細。 |
|
| springcloud |
array<object> |
任意 |
Spring Cloud ルール。 |
|
|
array<object> |
任意 |
|||
| condition |
string |
任意 |
項目の論理演算子。有効な値: AND または OR。 |
AND |
| restItems |
array<object> |
任意 |
||
|
object |
任意 |
|||
| datum |
string |
任意 |
`rawvalue` などのオペレーターで比較する値。 |
10 |
| operator |
string |
任意 |
オペレーター。`rawvalue` は直接比較を示します。`mode` は剰余演算を示します。`list` はホワイトリストを示します。 |
rawvalue |
| nameList |
array |
任意 |
`list` オペレーターに必要なフィールド。 |
|
|
string |
任意 |
名前。 |
test1 |
|
| cond |
string |
任意 |
比較演算子。有効な値: >=、<=、>、<、および ==。 |
== |
| divisor |
integer |
任意 |
剰余演算の除数。このパラメーターは、`operator` が `mod` の場合に必要です。 |
30 |
| remainder |
integer |
任意 |
操作のパーセント値。 |
30 |
| rate |
integer |
任意 |
タグ付けされたノードにルーティングするトラフィックのパーセンテージ。たとえば、20 はトラフィックの 20% を意味します。 |
20 |
| type |
string |
任意 |
タイプ。 |
test |
| name |
string |
任意 |
名前。 |
key |
| value |
any |
任意 |
値。 |
test |
| triggerPolicy |
string |
任意 |
ポリシータイプ。 列挙値:
|
CONTENT |
| enable |
boolean |
任意 |
ルールが有効かどうかを指定します。 |
true |
| appId |
string |
任意 |
アプリケーション ID。 |
***@*** |
| priority |
integer |
任意 |
優先度。 |
1 |
| tags |
array |
任意 |
タグのリスト。 |
|
|
string |
任意 |
タグ。 |
gray |
|
| paths |
array |
任意 |
パスのリスト。 |
|
|
string |
任意 |
パス。 |
/hello |
|
| path |
string |
任意 |
パス。 |
/hello |
| dubbo |
array<object> |
任意 |
Dubbo ルール。 |
|
|
array<object> |
任意 |
ルールの内容。 |
||
| appId |
string |
任意 |
アプリケーション ID。 |
***@*** |
| tags |
array |
任意 |
タグのリスト。 |
|
|
string |
任意 |
タグ。 |
gray |
|
| triggerPolicy |
string |
任意 |
ポリシータイプ。 |
CONTENT |
| serviceName |
string |
任意 |
サービス名 (インターフェイス)。 |
HelloService |
| group |
string |
任意 |
Dubbo サービスのグループ。 |
default |
| version |
string |
任意 |
Dubbo サービスのバージョン。 |
1.0.0 |
| methodName |
string |
任意 |
Dubbo サービスのメソッド名。 |
hello |
| paramTypes |
array |
任意 |
パラメータータイプのリスト。 |
|
|
string |
任意 |
パラメータータイプ。 |
int |
|
| condition |
string |
任意 |
項目の論理演算子。有効な値: AND または OR。 |
AND |
| argumentItems |
array<object> |
任意 |
引数のリスト。 |
|
|
object |
任意 |
引数の詳細。 |
||
| operator |
string |
任意 |
オペレーター。`rawvalue` は直接比較を示します。`mode` は剰余演算を示します。`list` はホワイトリストを示します。 |
rawvalue |
| nameList |
array |
任意 |
名前のリスト。 |
|
|
string |
任意 |
名前。 |
demo |
|
| datum |
string |
任意 |
`rawvalue` などのオペレーターで比較する値。 |
30 |
| cond |
string |
任意 |
比較演算子。有効な値: >=、<=、>、<、および ==。 |
== |
| divisor |
integer |
任意 |
剰余演算の除数。このパラメーターは、`operator` が `mod` の場合に必要です。 |
30 |
| remainder |
integer |
任意 |
パーセンテージ操作に必要なパーセント値。 |
30 |
| rate |
integer |
任意 |
タグ付けされたノードにルーティングするトラフィックのパーセンテージ。たとえば、20 はトラフィックの 20% を意味します。 |
10 |
| index |
integer |
任意 |
パラメーターの位置。0 から始まります。 |
0 |
| expr |
string |
任意 |
式。 |
|
| value |
any |
任意 |
比較する値。式の結果がこの値と比較されます。`operator` が `list` の場合、コンマ (,) を使用して複数の値を区切ります。例: 1,2,3。 |
1,2,3 |
| NamespaceId |
string |
任意 |
名前空間の ID。このパラメーターはオプションです。 |
12233**** |
| Enable |
boolean |
任意 |
ルールを有効にするかどうかを指定します。 |
true |
| AcceptLanguage |
string |
任意 |
応答メッセージの言語:
|
zh |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| Message |
string |
応答メッセージ。 |
success |
| RequestId |
string |
リクエスト ID。 |
316F5F64-F73D-42DC-8632-01E308B6**** |
| Data |
array<object> |
返されたデータ。 |
|
|
object |
返されたデータ。 |
||
| Status |
integer |
ステータス。 |
1 |
| InstanceNum |
integer |
インスタンス数。 |
1 |
| Remove |
boolean |
ルールが削除されたかどうかを示します。 |
|
| CarryData |
boolean |
プライマリキーであるかどうかを示します。 |
true |
| Tag |
string |
タグ。 |
gray |
| Name |
string |
ポリシー名。 |
test |
| Rules |
string |
タグルール。 |
{\"_base\": {\"rate\": 100, \"remove\": true}, \"blue\": {\"rate\": 0}} |
| Id |
integer |
プライマリキー ID。 |
12 |
| Rate |
integer |
パーセンテージ。 |
10 |
| Enable |
boolean |
ルールが有効かどうかを示します。
|
true |
| Success |
boolean |
リクエストが成功したかどうかを示します。 |
true |
例
成功レスポンス
JSONJSON
{
"Message": "success",
"RequestId": "316F5F64-F73D-42DC-8632-01E308B6****",
"Data": [
{
"Status": 1,
"InstanceNum": 1,
"Remove": true,
"CarryData": true,
"Tag": "gray",
"Name": "test",
"Rules": "{\\\"_base\\\": {\\\"rate\\\": 100, \\\"remove\\\": true}, \\\"blue\\\": {\\\"rate\\\": 0}}",
"Id": 12,
"Rate": 10,
"Enable": true
}
],
"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 |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。