查询网关已订阅的服务列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
mse:ListGatewayService |
get |
*Gateway
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
PageNumber |
integer |
否 |
页码。 |
1 |
PageSize |
integer |
否 |
分页大小。 |
10 |
OrderItem |
string |
否 |
排序属性。 |
GmtCreate |
DescSort |
boolean |
否 |
排序。 |
false |
FilterParams |
object |
否 |
过滤条件,格式为{"key1":"value1"}。 |
|
Name |
string |
否 |
服务名。 |
test |
SourceType |
string |
否 |
来源类型。 |
MSE |
Namespace |
string |
否 |
命名空间。 |
public |
GroupName |
string |
否 |
分组。 |
test |
GatewayUniqueId |
string |
是 |
网关唯一标识 ID。 |
gw-5017305290e14centbrveca**** |
ServiceProtocol |
string |
否 |
服务协议。
|
HTTP |
AcceptLanguage |
string |
否 |
返回信息的语言类型:
|
zh |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
数据结构。 |
||
RequestId |
string |
请求 ID。 |
F46CDBA4-B1EE-5C94-8A48-51C10177**** |
HttpStatusCode |
integer |
HTTP 状态码。 |
200 |
Message |
string |
错误信息。 |
You are not authorized to perform this operation. |
Code |
integer |
返回值。 |
200 |
Success |
boolean |
请求结果,取值如下:
|
true |
Data |
object |
返回数据。 |
|
TotalSize |
integer |
总条数。 |
9 |
PageNumber |
integer |
页码。 |
1 |
PageSize |
integer |
每页最大记录数,默认值为 10。 |
10 |
Result |
array |
返回集合。 |
|
object |
数据结构。 |
||
Id |
integer |
ID。 |
1 |
Name |
string |
服务名。 |
test |
GatewayUniqueId |
string |
网关唯一 ID。 |
gw-5017305290e14centbrveca**** |
GatewayId |
integer |
网关 ID。 |
1 |
SourceType |
string |
来源类型。 |
MSE |
Namespace |
string |
命名空间。 |
public |
GroupName |
string |
分组。 |
test |
SourceId |
integer |
来源 ID。 |
2 |
ServiceNameInRegistry |
string |
注册中心中原服务名。 |
test |
MetaInfo |
string |
元信息或 IP 列表。 |
{} |
Ips |
array |
IP 列表。 |
|
string |
IP。 |
127.0.2.1 |
|
GmtCreate |
string |
记录创建时间。 |
2022-01-07 18:07:57 |
GmtModified |
string |
记录修改时间。 |
2022-01-07 18:07:57 |
Versions |
array |
服务版本。 |
|
object |
版本。 |
||
Name |
string |
版本名。 |
v1 |
ServiceProtocol |
string |
服务协议。 |
HTTP |
ServicePort |
integer |
服务端口。 |
80 |
HealehStatus |
string |
健康状态。
|
Unhealthy |
HealthStatus |
string |
健康状态。
|
Unhealthy |
HealthCheck |
boolean |
是否进行健康检查。 |
true |
HealthCheckInfo |
object |
健康检查信息。 |
|
Check |
boolean |
是否检查。 |
true |
Protocol |
string |
网络协议。 |
TCP |
Timeout |
integer |
超时时间。 |
2 |
Interval |
integer |
健康检查间隔。 |
2 |
HealthyThreshold |
integer |
健康阈值。 |
2 |
UnhealthyThreshold |
integer |
非健康阈值。 |
2 |
HttpPath |
string |
健康检查 HTTP 请求路径。 |
/health |
HttpHost |
string |
健康检查 HTTP 请求地址。 |
http://172.168.0.1 |
ExpectedStatuses |
array |
健康检查期望状态值。 |
|
integer |
期望的 HttpStatus。 |
200 |
|
UnhealthyEndpoints |
array |
非健康 endpoint 数组 |
|
string |
非健康 endpoint |
172.168.0.1 |
|
GatewayTrafficPolicy |
object |
流量管理策略。 |
|
Tls |
object |
TLS。 |
|
Mode |
string |
TLS 模式。
|
SIMPLE |
CertId |
string |
证书 ID。 |
5******-cn-hangzhou |
CaCertId |
string |
CA 证书 ID。 |
5******-cn-hangzhou |
CaCertContent |
string |
CA 证书公钥。 |
content |
SubjectAltNames |
array |
主体别名数组。 |
|
string |
主体别名。 |
name |
|
Sni |
string |
服务名称标识。 |
name-sni |
LoadBalancerSettings |
object |
负载均衡设置。 |
|
LoadbalancerType |
string |
负载均衡策略
|
RANDOM |
ConsistentHashLBConfig |
object |
一致性哈希配置。 |
|
ParameterName |
string |
参数名称。 |
param |
HttpCookie |
object |
基于 Cookie 的参数。 |
|
Name |
string |
cookie 名称。 |
name |
Path |
string |
cookie 路径。 |
/path |
Ttl |
string |
cookie 生命周期。 |
360 |
MinimumRingSize |
integer |
哈希环最小值。 |
10000 |
ConsistentHashLBType |
string |
一致性哈希的方式。
|
HEADER |
WarmupDuration |
integer |
最小请求数的预热时间。 |
10 |
Ports |
array |
端口数组。 |
|
integer |
端口。 |
8080 |
|
ServiceFQDN |
string |
||
DnsServerList |
array |
DNS 服务器列表(仅供 DNS 域名服务使用) |
|
string |
DNS 服务器地址(IP+端口) |
1.1.1.1:80 |
示例
正常返回示例
JSON
格式
{
"RequestId": "F46CDBA4-B1EE-5C94-8A48-51C10177****",
"HttpStatusCode": 200,
"Message": "You are not authorized to perform this operation.",
"Code": 200,
"Success": true,
"Data": {
"TotalSize": 9,
"PageNumber": 1,
"PageSize": 10,
"Result": [
{
"Id": 1,
"Name": "test",
"GatewayUniqueId": "gw-5017305290e14centbrveca****",
"GatewayId": 1,
"SourceType": "MSE",
"Namespace": "public",
"GroupName": "test",
"SourceId": 2,
"ServiceNameInRegistry": "test",
"MetaInfo": "{}",
"Ips": [
"127.0.2.1"
],
"GmtCreate": "2022-01-07 18:07:57",
"GmtModified": "2022-01-07 18:07:57",
"Versions": [
{
"Name": "v1"
}
],
"ServiceProtocol": "HTTP",
"ServicePort": 80,
"HealehStatus": "Unhealthy",
"HealthStatus": "Unhealthy",
"HealthCheck": true,
"HealthCheckInfo": {
"Check": true,
"Protocol": "TCP",
"Timeout": 2,
"Interval": 2,
"HealthyThreshold": 2,
"UnhealthyThreshold": 2,
"HttpPath": "/health",
"HttpHost": "http://172.168.0.1",
"ExpectedStatuses": [
200
]
},
"UnhealthyEndpoints": [
"172.168.0.1"
],
"GatewayTrafficPolicy": {
"Tls": {
"Mode": "SIMPLE",
"CertId": "5******-cn-hangzhou",
"CaCertId": "5******-cn-hangzhou",
"CaCertContent": "content",
"SubjectAltNames": [
"name"
],
"Sni": "name-sni"
},
"LoadBalancerSettings": {
"LoadbalancerType": "RANDOM",
"ConsistentHashLBConfig": {
"ParameterName": "param",
"HttpCookie": {
"Name": "name",
"Path": "/path",
"Ttl": "360"
},
"MinimumRingSize": 10000,
"ConsistentHashLBType": "HEADER"
},
"WarmupDuration": 10
}
},
"Ports": [
8080
],
"ServiceFQDN": "",
"DnsServerList": [
"1.1.1.1:80"
]
}
]
}
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | IllegalRequest | Invalid request:%s | 非法请求: %s |
400 | InvalidParameter | Parameter error:%s | 请求参数错误:%s |
500 | InternalError | Console error. Try again later:%s | 控制台错误.稍后重试:%s |
403 | NoPermission | You are not authorized to perform this operation:%s | 没有权限使用此接口:%s |
404 | NotFound | Not found:%s | 资源不存在:%s |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。