Queries the details of a grayscale rule based on an application ID.
Operation description
You can configure only one grayscale rule for each application.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:ListGreyTagRoute |
get |
*All Resource
|
None | None |
Request syntax
GET /pop/v1/sam/tagroute/greyTagRouteList HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The application ID. |
7171a6ca-d1cd-4928-8642-7d5cfe69**** |
ScRule parameter
| Parameter | Type | Example | Description |
| condition | String | OR | The conditional pattern of the grayscale rule. Valid values: - AND: All conditions in the list must be met. - OR: Any condition in the list can be met. |
| path | String | /path | The path that corresponds to the grayscale rule for a Spring Cloud application. |
| items | Array of items | The list of conditions. |
Item parameter
| Parameter | Type | Example | Description |
| name | String | test | The parameter name. |
| cond | String | == | The comparison operator. Valid values: >, <, >=, <=, ==, and != |
| type | String | cookie | The comparison type. Valid values: - param: Parameter. - cookie: Cookie. - header: Header. |
| value | String | test | The parameter value. The value obtained based on type and name is compared with this value. |
| operator | String | rawvalue | The operator. Valid values: - rawvalue: Direct comparison. - list: Whitelist. - mod: Modulo 100 operation. - deterministic_proportional_steaming_division: Percentage. |
DubboRule parameter
| Parameter | Type | Example | Description |
| condition | String | OR | The conditional pattern of the grayscale rule. Valid values: - AND: All conditions in the list must be met. - OR: Any condition in the list can be met. |
| methodName | String | echo | The method name of the Dubbo service. |
| serviceName | String | com.alibaba.edas.boot.EchoService | The name of the Dubbo service. |
| version | String | 1.0.0 | The version of the Dubbo service. |
| items | Array of items | The list of conditions. | |
| group | String | DUBBO | The group of the Dubbo service that corresponds to the grayscale rule. |
Item parameter
| Parameter | Type | Example | Description |
| index | Integer | 0 | The parameter number. 0 indicates the first parameter. |
| expr | String | .name | The expression that is used to obtain the parameter value. The syntax follows the Spring Expression Language (SpEL). Valid values: - Leave it empty: Obtains the value of the current parameter. - .name: Obtains the name property of the parameter. This is equivalent to args0.getName(). - .isEnabled(): Obtains the enabled property of the parameter. This is equivalent to args0.isEnabled(). - [0]: Obtains the first value of the array. This is equivalent to args0[0]. Note that the expression does not start with a period (.). - **.get(0) **: Obtains the first value of the list. This is equivalent to args0.get(0). - .get("key"): Obtains the value that corresponds to the specified key from the map. This is equivalent to args0.get("key"). |
| cond | String | == | The comparison operator. Valid values: >, <, >=, <=, ==, and != |
| value | String | test | The parameter value. The value obtained based on expr and index is compared with this value. |
| operator | String | rawvalue | The operator. Valid values: - rawvalue: Direct comparison. - list: Whitelist. - mod: Modulo 100 operation. - deterministic_proportional_steaming_division: Percentage. |
Response elements
|
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 grayscale rules were queried successfully. Valid values:
|
true |
Examples
Success response
JSON format
{
"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
}
Error codes
|
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 |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.