Mengubah aturan routing tag.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:ApplyTagPolicies |
update |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Region |
string |
No |
Wilayah. |
cn-hangzhou |
| Namespace |
string |
No |
Namespace MSE aplikasi. |
default |
| AppName |
string |
No |
Nama aplikasi. |
example-app |
AppId
deprecated
|
string |
Yes |
ID aplikasi. |
h5pohqu3gd@xxx |
| Rules |
object |
No |
Aturan routing. |
|
|
object |
No |
|||
| Status |
integer |
No |
The status. Valid values:
|
0 |
| Rate |
integer |
No |
The percentage. |
10 |
| Enable |
boolean |
No |
Specifies whether to enable the rule. |
true |
| Tag |
string |
No |
The environment for the routing rule. |
gray |
| Name |
string |
No |
The name of the routing rule. |
gray |
| Id |
integer |
No |
The rule ID. |
1 |
| InstanceNum |
integer |
No |
The number of instances. |
10 |
| Rules |
object |
No |
The rule details. |
|
| springcloud |
array<object> |
No |
The Spring Cloud rules. |
|
|
array<object> |
No |
|||
| condition |
string |
No |
The logical operator for the items. Valid values: AND or OR. |
AND |
| restItems |
array<object> |
No |
||
|
object |
No |
|||
| datum |
string |
No |
The value to compare for operators such as `rawvalue`. |
10 |
| operator |
string |
No |
The operator. `rawvalue` indicates a direct comparison. `mode` indicates a modulo operation. `list` indicates a whitelist. |
rawvalue |
| nameList |
array |
No |
The field required for the `list` operator. |
|
|
string |
No |
The name. |
test1 |
|
| cond |
string |
No |
The comparison operator. Valid values: >=, <=, >, <, and ==. |
== |
| divisor |
integer |
No |
The divisor for the modulo operation. This parameter is required if `operator` is `mod`. |
30 |
| remainder |
integer |
No |
The percentage value for the operation. |
30 |
| rate |
integer |
No |
The percentage of traffic to route to the tagged nodes. For example, 20 means 20% of the traffic. |
20 |
| type |
string |
No |
The type. |
test |
| name |
string |
No |
The name. |
key |
| value |
any |
No |
The value. |
test |
| triggerPolicy |
string |
No |
The policy type. Valid values:
|
CONTENT |
| enable |
boolean |
No |
Specifies whether the rule is enabled. |
true |
| appId |
string |
No |
The application ID. |
***@*** |
| priority |
integer |
No |
The priority. |
1 |
| tags |
array |
No |
The list of tags. |
|
|
string |
No |
A tag. |
gray |
|
| paths |
array |
No |
The list of paths. |
|
|
string |
No |
A path. |
/hello |
|
| path |
string |
No |
The path. |
/hello |
| dubbo |
array<object> |
No |
The Dubbo rules. |
|
|
array<object> |
No |
The rule content. |
||
| appId |
string |
No |
The application ID. |
***@*** |
| tags |
array |
No |
The list of tags. |
|
|
string |
No |
A tag. |
gray |
|
| triggerPolicy |
string |
No |
The policy type. |
CONTENT |
| serviceName |
string |
No |
The service name (interface). |
HelloService |
| group |
string |
No |
The group of the Dubbo service. |
default |
| version |
string |
No |
The version of the Dubbo service. |
1.0.0 |
| methodName |
string |
No |
The method name of the Dubbo service. |
hello |
| paramTypes |
array |
No |
The list of parameter types. |
|
|
string |
No |
The parameter type. |
int |
|
| condition |
string |
No |
The logical operator for the items. Valid values: AND or OR. |
AND |
| argumentItems |
array<object> |
No |
The list of arguments. |
|
|
object |
No |
The argument details. |
||
| operator |
string |
No |
The operator. `rawvalue` indicates a direct comparison. `mode` indicates a modulo operation. `list` indicates a whitelist. |
rawvalue |
| nameList |
array |
No |
The list of names. |
|
|
string |
No |
A name. |
demo |
|
| datum |
string |
No |
The value to compare for operators such as `rawvalue`. |
30 |
| cond |
string |
No |
The comparison operator. Valid values: >=, <=, >, <, and ==. |
== |
| divisor |
integer |
No |
The divisor for the modulo operation. This parameter is required if `operator` is `mod`. |
30 |
| remainder |
integer |
No |
The required percentage value for the percentage operation. |
30 |
| rate |
integer |
No |
The percentage of traffic to route to the tagged nodes. For example, 20 means 20% of the traffic. |
10 |
| index |
integer |
No |
The position of the parameter, starting from 0. |
0 |
| expr |
string |
No |
The expression. |
|
| value |
any |
No |
The value to compare. The result of the expression is compared with this value. If `operator` is `list`, use a comma (,) to separate multiple values. Example: 1,2,3. |
1,2,3 |
| NamespaceId |
string |
No |
ID namespace. Parameter ini opsional. |
12233**** |
| Enable |
boolean |
No |
Apakah akan mengaktifkan aturan. |
true |
| AcceptLanguage |
string |
No |
Bahasa Paket tanggapan:
|
zh |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The response message. |
success |
| RequestId |
string |
The request ID. |
316F5F64-F73D-42DC-8632-01E308B6**** |
| Data |
array<object> |
The returned data. |
|
|
object |
The returned data. |
||
| Status |
integer |
The status. |
1 |
| InstanceNum |
integer |
The number of instances. |
1 |
| Remove |
boolean |
Indicates whether the rule was deleted. |
|
| CarryData |
boolean |
Indicates whether it is a primary key. |
true |
| Tag |
string |
The tag. |
gray |
| Name |
string |
The policy name. |
test |
| Rules |
string |
The tag rule. |
{\"_base\": {\"rate\": 100, \"remove\": true}, \"blue\": {\"rate\": 0}} |
| Id |
integer |
The primary key ID. |
12 |
| Rate |
integer |
The percentage. |
10 |
| Enable |
boolean |
Indicates whether the rule is enabled.
|
true |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Contoh
Respons sukses
JSONformat
{
"Message": "success",
"RequestId": "316F5F64-F73D-42DC-8632-01E308B6****",
"Data": [
{
"Status": 1,
"InstanceNum": 1,
"Remove": false,
"CarryData": true,
"Tag": "gray",
"Name": "test",
"Rules": "{\\\"_base\\\": {\\\"rate\\\": 100, \\\"remove\\\": true}, \\\"blue\\\": {\\\"rate\\\": 0}}",
"Id": 12,
"Rate": 10,
"Enable": true
}
],
"Success": true
}
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.