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​
要执行的操作,取值: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 object 可选 示例值:-​
路由同步过滤条件。​
EnableIngress boolean 可选 示例值:false​
是否开启路由同步过滤条件。取值:​
  • true:开启。​
  • false:不开启。​
​
​
Filter object 可选 示例值:-​
过滤条件。​
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时,需要配置本参数。​
​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
Total long 示例值:10​
过滤后的总个数。​
​
Items object[] 示例值:-​
Upstream来源列表。​
Id string 示例值:ust7****​
Upstream 来源 ID。​
​
GatewayId string 示例值:gd8****​
网关 ID。​
​
SourceType string 示例值:K8S​
Upstream 来源类型,取值:​
  • K8S:容器集群。​
  • Nacos:注册中心。​
​
Comments string 示例值:-​
Upstream 来源备注信息。​
​
SourceSpec object 示例值:-​
Upstream 来源配置。​
K8SSource object 示例值:-​
容器集群来源。​
ClusterId string 示例值:cc9q8p****​
集群 ID。您可以通过 ListClusters 查询集群 ID。​
​
ClusterType string 示例值:vke​
集群类型,取值:vke,代表容器服务集群​
​
​
NacosSource object 示例值:-​
注册中心来源。​
NacosId string 示例值:ncn24****​
Nacos 实例 ID。​
​
AuthConfig object 示例值:-​
认证配置。​
Basic object 示例值:-​
Nacos 登录认证。​
Username string 示例值:username​
Nacos 登录用户名。​
​
Password string 示例值:password​
Nacos 登录密码。​
​
​
​
NacosName string 示例值:example​
Nacos 名称。​
​
​
​
WatchNamespaces string[] 示例值:["default"]​
指定命名空间。​
​
IngressSettings object 示例值:-​
路由同步。​
EnableIngress boolean 示例值:true​
是否开启路由同步。取值:​
  • true:开启。​
  • false:不开启。​
说明​
  • 开启后,API 网关会自动监听 Ingress 资源的变化,并将 Ingress 资源转义为服务,域名和 Upstream 等资源合并至当前网关。​
  • 由 Ingress 转义的资源不支持在控制台操作。​
​
EnableAllIngressClasses boolean 示例值:false​
是否设置为全部 IngressClass。取值:​
  • true:是。​
  • false:否。​
​
IngressClasses string[] 示例值:["example"]​
指定 IngressClass。​
说明​
当IngressSettings.EnableAllIngressClasses取值为false时有返回值。​
​
EnableIngressWithoutIngressClass boolean 示例值:false​
是否开启监听 IngressClass 为空的资源。取值:​
  • true:开启。​
  • false:不开启。​
说明​
当IngressSettings.EnableAllIngressClasses取值为false时有返回值。​
​
EnableAllNamespaces boolean 示例值:false​
是否设置为全部命名空间。取值:​
  • true:是。​
  • false:否。​
​
WatchNamespaces string[] 示例值:["default"]​
指定命名空间。​
说明​
当IngressSettings.EnableAllNamespaces取值为false时有返回值。​
​
UpdateStatus boolean 示例值:false​
是否开启流量入口切换。取值:​
  • true:开启。​
  • false:不开启。​
说明​
  • 当IngressSettings.EnableAllNamespaces取值为false时有返回值。​
  • 开启后,当前集群 Ingress 中 Status 的 IP 地址会被修改为当前网关的 IP 地址。​
​
​
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 集群无法连接。​
​
​
​
​
请求示例​
​
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"​
}​
}​
​
返回示例​
​
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"​
]​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
500​
InternalError​
The request has failed due to an unknown error.​
未知错误。请稍后重试。如果多次尝试失败,请提交工单。​
​
​
最近更新时间:2026.10.28 14:59:50
这个页面对您有帮助吗?
有用
有用
无用
无用