调用DescribeIstioGatewayRouteDetail查看网关路由详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
servicemesh:DescribeIstioGatewayRouteDetail |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ServiceMeshId |
string |
是 |
服务网格实例 ID。 |
c08ba3fd1e6484b0f8cc1ad8fe10d**** |
| IstioGatewayName |
string |
否 |
ASM 网关名称。 |
ingressgateway |
| RouteName |
string |
否 |
路由名称。 |
demo-route |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
响应内容。 |
||
| RouteDetail |
object |
路由详情 |
|
| RouteName |
string |
路由名称。 |
demo-route |
| RouteType |
string |
路由类型,取值 |
HTTP |
| MatchRequest |
object |
路由匹配规则。 |
|
| URI |
object |
URI 匹配规则 。 |
|
| MatchingMode |
string |
路由规则匹配模式,取值:
|
prefix |
| MatchingContent |
string |
用于匹配的内容。 |
/ratings/v2/ |
| Headers |
array<object> |
用于判断是否匹配的请求头部列表。 |
|
|
object |
用于判断是否匹配的请求头部。 |
||
| Name |
string |
Header 匹配的键。 |
x-request-id |
| MatchingMode |
string |
Header 值匹配方式,取值:
|
exact |
| MatchingContent |
string |
用于 Header 匹配的内容。 |
v1 |
| TLSMatchAttributes |
array<object> |
TLS 连接匹配属性列表。 |
|
|
object |
TLS 连接匹配属性。 |
||
| TLSPort |
integer |
TLS 端口。 |
443 |
| SNIHosts |
array |
服务器名称标识列表。 |
|
|
string |
SNI 值中可以使用通配符前缀,例如 说明
SNI 值必须是相应虚拟服务主机的子集。 |
*.com |
|
| Ports |
array |
端口列表。 |
|
|
integer |
指定主机上要寻址的端口。 |
443 |
|
| HTTPAdvancedOptions |
object |
HTTP 路由高级配置选项。 |
|
| HTTPRedirect |
object |
HTTP 重定向。 |
|
| Uri |
string |
在重定向时,使用此值覆盖 URL 的路径部分。 |
/v1/getProductRatings |
| Authority |
string |
在重定向时,使用此值覆盖 URL 的 Authority 或 Host 部分。 |
newratings.default.svc.cluster.local |
| RedirectCode |
integer |
在重定向上,指定要在重定向响应中使用的 HTTP 状态代码。默认响应代码为 301。 |
301 |
| Delegate |
object |
虚拟服务流量代理。 |
|
| Name |
string |
名称。 |
reviews |
| Namespace |
string |
命名空间。 |
default |
| Rewrite |
object |
重写虚拟服务。 |
|
| Uri |
string |
用这个值重写 URI 的路径(或前缀)部分。 |
/v1/getProductRatings |
| Authority |
string |
使用此值重写 Authority 或 Host 头。 |
newratings.default.svc.cluster.local |
| Timeout |
string |
超时时长。 |
5s |
| Retries |
object |
请求重试配置。 |
|
| Attempts |
integer |
给定请求允许的重试次数。 |
3 |
| PerTryTimeout |
string |
请求的每次尝试超时时间。 |
2s |
| RetryOn |
string |
用于指定重试发生的条件,例如 |
connect-failure,refused-stream,503 |
| RetryRemoteLocalities |
object |
用于指定重试是否应重试到其他位置的标志。 |
|
| Value |
boolean |
用于指定重试是否应重试到其他位置的标志,取值:
默认 |
false |
| Fault |
object |
故障注入设置。 |
|
| Delay |
object |
设置延迟。 |
|
| FixedDelay |
string |
固定延迟时间。 |
5s |
| ExponentialDelay |
string |
指数型延迟等待时间,等待时间为 2 的 x 次方,x 为输入参数。 |
3 |
| Percentage |
object |
将注入延迟的请求的百分比。 |
|
| Value |
number |
使用提供的错误码中止的请求的百分比,用小数表示。 |
0.1 |
| Abort |
object |
提前中止带有预先指定的错误码的请求。 |
|
| HttpStatus |
integer |
HTTP 状态码。 |
400 |
| Percentage |
object |
使用提供的错误码中止的请求的百分比。 |
|
| Value |
number |
流量镜像百分比。用小数表示 |
0.1 |
| Mirror |
object |
除了将请求转发到预期目标之外,还将 HTTP 通信镜像到另一个目标。 |
|
| Host |
string |
服务注册表中服务的名称。 |
reviews.default.svc.cluster.local |
| Subset |
string |
服务中子集的名称 |
v1 |
| MirrorPercentage |
object |
使用提供的错误码中止的请求的百分比。 |
|
| Value |
number |
使用提供的错误码中止的请求的百分比,用小数表示。 |
0.2 |
| RouteDestinations |
array<object> |
L4 路由规则加权目的地列表。 |
|
|
object |
L4 路由规则加权目的地。 |
||
| Destination |
object |
Destination 唯一标识请求或连接应转发到的服务实例。 |
|
| Host |
string |
服务注册表中服务的名称。 |
reviews |
| Subset |
string |
服务中子集的名称。 |
v1 |
| Port |
object |
端口列表。 |
|
| Number |
integer |
指定主机上要寻址的端口。 |
443 |
| Weight |
integer |
流量权重,范围:1~100。 |
80 |
| Headers |
object |
用于判断是否匹配的请求头部列表。 |
|
| Request |
object |
用于判断是否匹配的请求头部。 |
|
| Set |
object |
用给定值覆盖键指定的 Header。 |
|
|
string |
输入 Value 值覆盖键 Header。 |
key |
|
| Add |
object |
添加值到 Header 中。 |
key |
| Remove |
array |
删除 Header 中的值。 |
|
|
string |
输入要删除的 Key。 |
key |
|
| Response |
object |
返回响应前做的处理。 |
|
| Set |
object |
用给定值覆盖键指定的 Header。 |
key |
| Add |
object |
添加值到 Header 中。 |
key |
| Remove |
array |
删除 Header 中的值。 |
|
|
string |
输入要删除的 Key。 |
key |
|
| Domains |
array |
匹配的请求域名列表 |
|
|
string |
匹配的请求域名 |
test.asm.aliyun.com |
|
| RawVSRoute |
string |
序列化为 JSON 的 VirtualService 原始 YAML |
{} |
| HasUnsafeFeatures |
boolean |
如果为 True,说明原始 YAML 中包含有当前界面上不支持的特性。 |
true |
| RequestId |
string |
请求 ID。 |
31d3a0f0-07ed-4f6e-9004-1804498c**** |
| Priority |
integer |
路由优先级。整数,数字越小,优先级越高。 |
1 |
| Status |
integer |
网关路由状态,取值:
|
1 |
| Description |
string |
路由描述。 |
demo route |
| Namespace |
string |
命名空间 |
default |
示例
正常返回示例
JSON格式
{
"RouteDetail": {
"RouteName": "demo-route",
"RouteType": "HTTP",
"MatchRequest": {
"URI": {
"MatchingMode": "prefix",
"MatchingContent": "/ratings/v2/"
},
"Headers": [
{
"Name": "x-request-id",
"MatchingMode": "exact",
"MatchingContent": "v1"
}
],
"TLSMatchAttributes": [
{
"TLSPort": 443,
"SNIHosts": [
"*.com"
]
}
],
"Ports": [
443
]
},
"HTTPAdvancedOptions": {
"HTTPRedirect": {
"Uri": "/v1/getProductRatings",
"Authority": "newratings.default.svc.cluster.local",
"RedirectCode": 301
},
"Delegate": {
"Name": "reviews",
"Namespace": "default"
},
"Rewrite": {
"Uri": "/v1/getProductRatings",
"Authority": "newratings.default.svc.cluster.local"
},
"Timeout": "5s",
"Retries": {
"Attempts": 3,
"PerTryTimeout": "2s",
"RetryOn": "connect-failure,refused-stream,503",
"RetryRemoteLocalities": {
"Value": false
}
},
"Fault": {
"Delay": {
"FixedDelay": "5s",
"ExponentialDelay": "3",
"Percentage": {
"Value": 0.1
}
},
"Abort": {
"HttpStatus": 400,
"Percentage": {
"Value": 0.1
}
}
},
"Mirror": {
"Host": "reviews.default.svc.cluster.local",
"Subset": "v1"
},
"MirrorPercentage": {
"Value": 0.2
}
},
"RouteDestinations": [
{
"Destination": {
"Host": "reviews",
"Subset": "v1",
"Port": {
"Number": 443
}
},
"Weight": 80,
"Headers": {
"Request": {
"Set": {
"key": "key"
},
"Add": {
"test": "test",
"test2": 1
},
"Remove": [
"key"
]
},
"Response": {
"Set": {
"test": "test",
"test2": 1
},
"Add": {
"test": "test",
"test2": 1
},
"Remove": [
"key"
]
}
}
}
],
"Domains": [
"test.asm.aliyun.com"
],
"RawVSRoute": "{}",
"HasUnsafeFeatures": true
},
"RequestId": "31d3a0f0-07ed-4f6e-9004-1804498c****",
"Priority": 1,
"Status": 1,
"Description": "demo route",
"Namespace": "default"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 500 | ERR500 | An internal server error occurred. | 后端服务异常 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。