Mengkueri detail aturan grayscale berdasarkan ID aplikasi.
Deskripsi operasi
You can configure only one grayscale rule for each application.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:ListGreyTagRoute |
get |
*全部资源
|
None | None |
Sintaks permintaan
GET /pop/v1/sam/tagroute/greyTagRouteList HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
ID aplikasi. |
7171a6ca-d1cd-4928-8642-7d5cfe69**** |
Parameter ScRule.
| Parameter | Tipe | Contoh | Deskripsi |
| condition | String | OR | Pola kondisional aturan grayscale. Nilai valid: - AND: Semua kondisi dalam daftar harus terpenuhi. - OR: Salah satu kondisi dalam daftar dapat terpenuhi. |
| path | String | /path | Path yang sesuai dengan aturan grayscale untuk aplikasi Spring Cloud. |
| items | Array item | Daftar kondisi. |
Parameter Item.
| Parameter | Tipe | Contoh | Deskripsi |
| name | String | test | Nama parameter. |
| cond | String | == | Operator perbandingan. Nilai valid: >, <, >=, <=, ==, dan != |
| type | String | cookie | Tipe perbandingan. Nilai valid: - param: Parameter. - cookie: Cookie. - header: Header. |
| value | String | test | Nilai parameter. Nilai yang diperoleh berdasarkan type dan name dibandingkan dengan nilai ini. |
| operator | String | rawvalue | Operator. Nilai valid: - rawvalue: Perbandingan langsung. - list: Daftar putih. - mod: Operasi modulo 100. - deterministic_proportional_steaming_division: Persentase. |
Parameter DubboRule.
| Parameter | Tipe | Contoh | Deskripsi |
| condition | String | OR | Pola kondisional aturan grayscale. Nilai valid: - AND: Semua kondisi dalam daftar harus terpenuhi. - OR: Salah satu kondisi dalam daftar dapat terpenuhi. |
| methodName | String | echo | Nama metode layanan Dubbo. |
| serviceName | String | com.alibaba.edas.boot.EchoService | Nama layanan Dubbo. |
| version | String | 1.0.0 | Versi layanan Dubbo. |
| items | Array item | Daftar kondisi. | |
| group | String | DUBBO | Kelompok layanan Dubbo yang sesuai dengan aturan grayscale. |
Parameter Item.
| Parameter | Tipe | Contoh | Deskripsi |
| index | Integer | 0 | Indeks parameter. 0 menunjukkan parameter pertama. |
| expr | String | .name | Ekspresi yang digunakan untuk mendapatkan nilai parameter. Sintaks mengikuti Spring Expression Language (SpEL). Nilai valid: - Kosongkan: Mendapatkan nilai parameter saat ini. - .name: Mendapatkan properti name parameter. Ini setara dengan args0.getName(). - .isEnabled(): Mendapatkan properti enabled parameter. Ini setara dengan args0.isEnabled(). - [0]: Mendapatkan nilai pertama array. Ini setara dengan args0[0]. Perhatikan bahwa ekspresi tidak diawali dengan titik (.). - **.get(0) **: Mendapatkan nilai pertama daftar. Ini setara dengan args0.get(0). - .get("key"): Mendapatkan nilai yang sesuai dengan kunci tertentu dari map. Ini setara dengan args0.get("key"). |
| cond | String | == | Operator perbandingan. Nilai valid: >, <, >=, <=, ==, dan != |
| value | String | test | Nilai parameter. Nilai yang diperoleh berdasarkan expr dan index dibandingkan dengan nilai ini. |
| operator | String | rawvalue | Operator. Nilai valid: - rawvalue: Perbandingan langsung. - list: Daftar putih. - mod: Operasi modulo 100. - deterministic_proportional_steaming_division: Persentase. |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| RequestId |
string |
The request ID. |
9D29CBD0-45D3-410B-9826-52F86F90**** |
| Message |
string |
Additional information. Valid values:
|
success |
| TraceId |
string |
The trace ID, which is used to query the details of a call. |
0a98a02315955564772843261e**** |
| Data |
object |
The information about the grayscale rule. |
|
| CurrentPage |
integer |
The current page number. |
1 |
| PageSize |
integer |
The number of entries per page in a paged query. The value can only be 1. |
1 |
| TotalSize |
integer |
The total number of entries. The value can only be 1. |
1 |
| Result |
array<object> |
The returned result. |
|
|
array<object> |
The returned data. |
||
| GreyTagRouteId |
integer |
The rule ID. |
1 |
| Name |
string |
The rule name. |
rule-name |
| Description |
string |
The description of the rule. |
test |
| ScRules |
array<object> |
The grayscale rules for Spring Cloud. |
|
|
array<object> |
The details of the rules. |
||
| path |
string |
The path that corresponds to the grayscale rule for the Spring Cloud application. |
/path |
| condition |
string |
The conditional pattern of the grayscale rule. Valid values:
|
OR |
| items |
array<object> |
The list of conditions. |
|
|
object |
The data in the list of conditions. |
||
| type |
string |
The comparison type. Valid values:
|
cookie |
| name |
string |
The parameter name. |
test |
| operator |
string |
The operator. Valid values:
|
rawvalue |
| value |
string |
The parameter value. The value obtained based on type and name is compared with this value. |
test |
| cond |
string |
The comparison operator. Valid values: >, <, >=, <=, ==, and !=. |
== |
| index |
integer |
This parameter is not applicable to Spring Cloud applications. |
N/A |
| expr |
string |
This parameter is not applicable to Spring Cloud applications. |
N/A |
| AlbRules |
array<object> |
The grayscale rules created for an application for which an Application Load Balancer (ALB) Ingress is configured. |
|
|
array<object> |
The details of the grayscale rules. |
||
| ingressId |
string |
The Ingress ID. |
23 |
| condition |
string |
The conditional pattern of the grayscale rule. Only AND is supported, which indicates that all conditions in the list must be met. |
AND |
| items |
array<object> |
The list of conditions. |
|
|
object |
The details of the list of conditions. |
||
| type |
string |
The comparison type. Valid values:
|
cookie |
| name |
string |
The parameter name. |
example |
| operator |
string |
The operator. Valid values: Only rawvalue is supported, which indicates a direct comparison. |
rawvalue |
| value |
string |
The parameter value. The value obtained based on type and name is compared with this value. |
test |
| cond |
string |
Only == is supported. |
== |
| index |
integer |
This parameter is not applicable to ALB applications. |
N/A |
| expr |
string |
This parameter is not applicable to ALB applications. |
N/A |
| serviceName |
string |
The service name. |
s-6366-e3****-99** |
| DubboRules |
array<object> |
The grayscale rules for Dubbo services. |
|
|
array<object> |
The information about the grayscale rules. |
||
| serviceName |
string |
The name of the Dubbo service. |
com.alibaba.edas.boot.EchoService |
| group |
string |
The group of the Dubbo service that corresponds to the grayscale rule. |
DUBBO |
| version |
string |
The version of the Dubbo service. |
1.0.0 |
| methodName |
string |
The method name of the Dubbo service. |
echo |
| condition |
string |
The conditional pattern of the grayscale rule. Valid values:
|
OR |
| items |
array<object> |
The list of conditions. |
|
|
object |
The details of the conditions. |
||
| index |
integer |
The parameter number. 0 indicates the first parameter. |
0 |
| expr |
string |
The expression that is used to obtain the parameter value. The syntax follows the Spring Expression Language (SpEL). Valid values:
|
.name |
| operator |
string |
The operator. Valid values:
|
rawvalue |
| value |
string |
The parameter value. The value obtained based on expr and index is compared with this value. |
test |
| cond |
string |
The comparison operator. Valid values: >, <, >=, <=, ==, and !=. |
== |
| type |
string |
This parameter is not applicable to Dubbo services. |
N/A |
| name |
string |
This parameter is not applicable to Dubbo services. |
N/A |
| CreateTime |
integer |
The timestamp when the rule was created. Unit: milliseconds. |
1619007592013 |
| UpdateTime |
integer |
The timestamp when the rule was updated. Unit: milliseconds. |
1609434061000 |
| ErrorCode |
string |
The error code. Valid values:
|
|
| Code |
string |
The status of the interface or the POP error code. Valid values:
|
200 |
| Success |
boolean |
Indicates whether the query succeeded.
|
true |
Contoh
Respons sukses
JSONformat
{
"RequestId": "9D29CBD0-45D3-410B-9826-52F86F90****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": {
"CurrentPage": 1,
"PageSize": 1,
"TotalSize": 1,
"Result": [
{
"GreyTagRouteId": 1,
"Name": "rule-name",
"Description": "test",
"ScRules": [
{
"path": "/path",
"condition": "OR",
"items": [
{
"type": "cookie",
"name": "test",
"operator": "rawvalue",
"value": "test",
"cond": "==",
"index": 0,
"expr": "N/A"
}
]
}
],
"AlbRules": [
{
"ingressId": "23",
"condition": "AND",
"items": [
{
"type": "cookie",
"name": "example",
"operator": "rawvalue",
"value": "test",
"cond": "==",
"index": 0,
"expr": "N/A"
}
],
"serviceName": "s-6366-e3****-99**"
}
],
"DubboRules": [
{
"serviceName": "com.alibaba.edas.boot.EchoService",
"group": "DUBBO",
"version": "1.0.0",
"methodName": "echo",
"condition": "OR",
"items": [
{
"index": 0,
"expr": ".name",
"operator": "rawvalue",
"value": "test",
"cond": "==",
"type": "N/A",
"name": "N/A"
}
]
}
],
"CreateTime": 1619007592013,
"UpdateTime": 1609434061000
}
]
},
"ErrorCode": "",
"Code": "200",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | |
| 400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.