根据规则ID查询灰度规则详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
sae:DescribeGreyTagRoute |
get |
*全部资源
|
无 | 无 |
请求语法
GET /pop/v1/sam/tagroute/greyTagRoute HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| GreyTagRouteId |
integer |
是 |
规则 ID。 |
1 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回数据。 |
||
| RequestId |
string |
请求 ID。 |
9D29CBD0-45D3-410B-9826-52F86F90**** |
| Message |
string |
调用结果的附加信息。 |
success |
| TraceId |
string |
调用链 ID,用于精确查询调用信息。 |
0a98a02315955564772843261e**** |
| Data |
object |
灰度规则信息。 |
|
| GreyTagRouteId |
integer |
灰度规则 ID,全局唯一。 |
16 |
| Name |
string |
规则名称。 |
rule-name |
| Description |
string |
规则描述。 |
test |
| ScRules |
array<object> |
Spring Cloud 应用的灰度规则。 |
|
|
array<object> |
灰度规则数据。 |
||
| path |
string |
Spring Cloud 应用灰度规则对应的路径。 |
/path |
| condition |
string |
灰度规则的条件模式,取值说明如下:
|
OR |
| items |
array<object> |
条件列表。 |
|
|
object |
条件列表数据。 |
||
| type |
string |
比较类型。取值说明如下:
|
cookie |
| name |
string |
参数名。 |
test |
| operator |
string |
运算符。取值说明如下:
|
rawvalue |
| value |
string |
参数取值,根据 type 和 name 得到的值跟这个值进行比较。 |
test |
| cond |
string |
比较操作符。可取值:>、<、>=、<=、==以及!=。 |
== |
| index |
integer |
Spring Cloud 应用不涉及。 |
N/A |
| expr |
string |
Spring Cloud 应用不涉及。 |
N/A |
| AlbRules |
array<object> |
||
|
array<object> |
|||
| serviceId |
string |
路由服务 ID。 |
22 |
| ingressId |
string |
网关路由 ID。 |
23 |
| condition |
string |
灰度规则的条件模式,当前只支持 AND:表示同时满足条件列表中的所有条件。 |
AND |
| items |
array<object> |
||
|
object |
|||
| type |
string |
比较类型。取值说明如下:
|
cookie |
| name |
string |
参数名。 |
example |
| operator |
string |
运算符。取值说明如下:目前只支持 rawvalue:直接比较。 |
rawvalue |
| value |
string |
参数取值,根据 type 和 name 得到的值跟这个值进行比较。 |
test |
| cond |
string |
暂支持==。 |
== |
| index |
integer |
Alb 应用无需填写。 |
N/A |
| expr |
string |
Alb 应用无需填写。 |
N/A |
| DubboRules |
array<object> |
Dubbo 服务的灰度规则。 |
|
|
array<object> |
灰度规则数据。 |
||
| serviceName |
string |
Dubbo 服务名称。 |
com.alibaba.edas.boot.EchoService |
| group |
string |
灰度规则对应的 Dubbo 服务的分组。 |
DUBBO |
| version |
string |
Dubbo 服务版本。 |
1.0.0 |
| methodName |
string |
Dubbo 服务的方法名。 |
echo |
| condition |
string |
灰度规则的条件模式,取值说明如下:
|
OR |
| items |
array<object> |
条件列表。 |
|
|
object |
条件列表数据。 |
||
| index |
integer |
参数编号,0 表示第一个参数。 |
0 |
| expr |
string |
参数值获取表达式。取值说明如下:
|
.name |
| operator |
string |
运算符。取值说明如下:
|
rawvalue |
| value |
string |
参数取值,根据 expr 和 index 得到的值跟这个值进行比较。 |
test |
| cond |
string |
比较操作符。可取值:>、<、>=、<=、==以及!=。 |
== |
| type |
string |
Dubbo 服务不涉及。 |
N/A |
| name |
string |
Dubbo 服务不涉及。 |
N/A |
| CreateTime |
integer |
规则被创建的时间戳。单位:毫秒。 |
1619007592013 |
| UpdateTime |
integer |
规则被更新的时间戳。单位:毫秒。 |
1609434061000 |
| AppId |
string |
应用 ID。 |
3faaf993-7aed-4bcd-b189-625e6a5a**** |
| ErrorCode |
string |
错误码。取值说明如下:
|
|
| Code |
string |
接口状态或 POP 错误码。取值说明如下:
|
200 |
| Success |
boolean |
查询变更单信息是否成功。取值说明如下:
|
true |
示例
正常返回示例
JSON格式
{
"RequestId": "9D29CBD0-45D3-410B-9826-52F86F90****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": {
"GreyTagRouteId": 16,
"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": [
{
"serviceId": "22",
"ingressId": "23",
"condition": "AND",
"items": [
{
"type": "cookie",
"name": "example",
"operator": "rawvalue",
"value": "test",
"cond": "==",
"index": 0,
"expr": "N/A"
}
]
}
],
"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,
"AppId": "3faaf993-7aed-4bcd-b189-625e6a5a****"
},
"ErrorCode": "",
"Code": "200",
"Success": true
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | 不合法的参数:%s不能为空。 |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | 不合法的参数{%s}。 |
| 400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | 不合法的参数{%s}:%s。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。