You need to enable JavaScript to run this app.
文档中心
API 网关

API 网关

复制全文
下载 pdf
后端管理
ListUpstreamSources - 批量查询Upstream来源
复制全文
下载 pdf
ListUpstreamSources - 批量查询Upstream来源
批量查询 Upstream 来源配置详情。​
请求说明​
API 网关已在全球多个地域部署服务,旨在为您提供更稳定、低延迟的访问体验。您可以通过查阅 服务地址 文档,根据业务所在地域,选择最合适的接入点。​
  • 请求方式:POST​
  • 请求地址:https://apig.cn-beijing.volcengineapi.com?Action=ListUpstreamSources&Version=2021-03-03​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
​
参数​
类型​
是否必选​
示例值​
描述​
Action​
String​
是​
ListUpstreamSources​
接口名称。当前 API 的名称为 ListUpstreamSources。​
Version​
String​
是​
2021-03-03​
接口版本。当前 API 的版本为 2021-03-03。​
PageNumber​
Long​
否​
1​
分页查询的页号。取值最小限制为 1,,默认值为 1。​
PageSize​
Long​
否​
10​
每页个数。取值范围为 0~100,默认值为 5。​
GatewayId​
String​
否​
gd8****​
网关实例 ID。您可以通过 ListGateways 查询网关实例 ID。​
IngressSettingsFilter​
否​
-​
路由同步过滤条件。​
Filter​
否​
-​
过滤条件。​
​
IngressSettingsFilter​
​
参数​
类型​
是否必选​
示例值​
描述​
EnableIngress​
Boolean​
否​
false​
是否开启路由同步过滤条件。取值:​
  • true:开启。​
  • false:不开启。​
​
UpstreamSourceFilter​
​
参数​
类型​
是否必选​
示例值​
描述​
name​
String​
否​
example​
Upstream 来源名称。​
说明​
当UpstreamSourceFilter.SourceType取值为Nacos时,需要配置本参数。​
SourceType​
String​
否​
K8S​
Upstream 来源类型,取值:​
  • K8S:容器集群。​
  • Nacos:注册中心。​
Status​
String​
否​
SyncedSucceed​
导入状态,取值:​
  • Syncing:导入中。​
  • SyncedSucceed:导入成功。​
  • SyncedFailed:导入失败。​
ClusterId​
String​
否​
cc9q8p****​
容器集群 ID。您可以通过 ListClusters 查询集群 ID。​
说明​
当UpstreamSourceFilter.SourceType取值为K8S时,需要配置本参数。​
​
请求示例​
​
POST https://apig.cn-beijing.volcengineapi.com?Action=ListUpstreamSources&Version=2021-03-03​
Content-Type: application/json​
{​
"PageNumber": 1,​
"PageSize": 10,​
"GatewayId": "gd8****",​
"IngressSettingsFilter": {​
"EnableIngress": false​
},​
"Filter": {​
"name": "example",​
"Status": "SyncedSucceed",​
"ClusterId": "cc9q8p****",​
"SourceType": "K8S"​
}​
}​
​
返回参数​
​
参数​
类型​
示例值​
描述​
Total​
Long​
10​
过滤后的总个数。​
Items​
-​
Upstream来源列表。​
​
UpstreamSourceResponse​
​
参数​
类型​
示例值​
描述​
Id​
String​
ust7****​
Upstream 来源 ID。​
GatewayId​
String​
gd8****​
网关 ID。​
SourceType​
String​
K8S​
Upstream 来源类型,取值:​
  • K8S:容器集群。​
  • Nacos:注册中心。​
Comments​
String​
-​
Upstream 来源备注信息。​
SourceSpec​
Object of SourceSpec​
-​
Upstream 来源配置。​
WatchNamespaces​
Array of String​
["default"]​
指定命名空间。​
IngressSettings​
Object of IngressSettings​
-​
路由同步。​
CreateTime​
String​
2025-01-01T00:00:00+08:00​
Upstream 来源创建时间。​
标准 RFC3339 格式的 UTC+0 时间。​
UpdateTime​
String​
2025-01-01T00:00:00+08:00​
Upstream 来源更新时间。​
标准 RFC3339 格式的 UTC+0 时间。​
Status​
String​
SyncedSucceed​
导入状态,取值:​
  • Syncing:导入中。​
  • SyncedSucceed:导入成功。​
  • SyncedFailed:导入失败。​
StatusMessage​
String​
-​
导入状态信息,取值:​
  • ConnectionFailed:Nacos 集群无法连接。​
  • AuthenticationFailed:认证失败。​
  • PermissionFailed:Nacos 集群无法连接。​
​
SourceSpec​
​
参数​
类型​
示例值​
描述​
K8SSource​
Object of K8SSource​
-​
容器集群来源。​
NacosSource​
Object of NacosSource​
-​
注册中心来源。​
​
IngressSettings​
​
参数​
类型​
示例值​
描述​
EnableIngress​
Boolean​
true​
是否开启路由同步。取值:​
  • true:开启。​
  • false:不开启。​
说明​
  • 开启后,API 网关会自动监听 Ingress 资源的变化,并将 Ingress 资源转义为服务,域名和 Upstream 等资源合并至当前网关。​
  • 由 Ingress 转义的资源不支持在控制台操作。​
EnableAllIngressClasses​
Boolean​
false​
是否设置为全部 IngressClass。取值:​
  • true:是。​
  • false:否。​
IngressClasses​
Array of String​
["example"]​
指定 IngressClass。​
说明​
当IngressSettings.EnableAllIngressClasses取值为false时有返回值。​
EnableIngressWithoutIngressClass​
Boolean​
false​
是否开启监听 IngressClass 为空的资源。取值:​
  • true:开启。​
  • false:不开启。​
说明​
当IngressSettings.EnableAllIngressClasses取值为false时有返回值。​
EnableAllNamespaces​
Boolean​
false​
是否设置为全部命名空间。取值:​
  • true:是。​
  • false:否。​
WatchNamespaces​
Array of String​
["default"]​
指定命名空间。​
说明​
当IngressSettings.EnableAllNamespaces取值为false时有返回值。​
UpdateStatus​
Boolean​
false​
是否开启流量入口切换。取值:​
  • true:开启。​
  • false:不开启。​
说明​
  • 当IngressSettings.EnableAllNamespaces取值为false时有返回值。​
  • 开启后,当前集群 Ingress 中 Status 的 IP 地址会被修改为当前网关的 IP 地址。​
​
K8SSource​
​
参数​
类型​
示例值​
描述​
ClusterId​
String​
cc9q8p****​
集群 ID。您可以通过 ListClusters 查询集群 ID。​
ClusterType​
String​
vke​
集群类型,取值:vke,代表容器服务集群​
​
NacosSource​
​
参数​
类型​
示例值​
描述​
NacosId​
String​
ncn24****​
Nacos 实例 ID。​
AuthConfig​
Object of AuthConfig​
-​
认证配置。​
NacosName​
String​
example​
Nacos 名称。​
​
AuthConfig​
​
参数​
类型​
示例值​
描述​
Basic​
Object of Basic​
-​
Nacos 登录认证。​
​
Basic​
​
参数​
类型​
示例值​
描述​
Username​
String​
username​
Nacos 登录用户名。​
Password​
String​
password​
Nacos 登录密码。​
​
返回示例​
​
Content-Type: application/json​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "ListUpstreamSources",​
"Version": "2021-03-03",​
"Service": "apig",​
"Region": "cn-beijing"​
},​
"Result": {​
"Total": 10,​
"Items": [​
{​
"Id": "ust7****",​
"Status": "SyncedSucceed",​
"Comments": "",​
"GatewayId": "gd8****",​
"CreateTime": "2025-01-01T00:00:00+08:00",​
"SourceSpec": {​
"K8SSource": {​
"ClusterId": "cc9q8p****",​
"ClusterType": "vke"​
},​
"NacosSource": {​
"NacosId": "ncn24****",​
"NacosName": "example",​
"AuthConfig": {​
"Basic": {​
"Password": "password",​
"Username": "username"​
}​
}​
}​
},​
"SourceType": "K8S",​
"UpdateTime": "2025-01-01T00:00:00+08:00",​
"StatusMessage": "",​
"IngressSettings": {​
"UpdateStatus": false,​
"EnableIngress": true,​
"IngressClasses": [​
"example"​
],​
"WatchNamespaces": [​
"default"​
],​
"EnableAllNamespaces": true,​
"EnableAllIngressClasses": true,​
"EnableIngressWithoutIngressClass": true​
},​
"WatchNamespaces": [​
"default"​
]​
}​
]​
}​
}​
​
错误码​
本接口无特有的错误码。更多信息请参见 公共错误码。​
最近更新时间:2026.07.29 10:20:04
这个页面对您有帮助吗?
有用
有用
无用
无用