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

API 网关

复制全文
下载 pdf
网关管理
ListGateways - 查询网关列表
复制全文
下载 pdf
ListGateways - 查询网关列表
批量查询网关实例。​
请求说明​
API 网关已在全球多个地域部署服务,旨在为您提供更稳定、低延迟的访问体验。您可以通过查阅 服务地址 文档,根据业务所在地域,选择最合适的接入点。​
  • 请求方式:POST​
  • 请求地址:https://apig.cn-beijing.volcengineapi.com?Action=ListGateways&Version=2021-03-03​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
​
参数​
类型​
是否必选​
示例值​
描述​
Action​
String​
是​
ListGateways​
接口名称。当前 API 的名称为 ListGateways。​
Version​
String​
是​
2021-03-03​
接口版本。当前 API 的版本为 2021-03-03。​
PageNumber​
Long​
否​
1​
分页查询的页号。取值最小限制为 1,默认值为 1。​
PageSize​
Long​
否​
10​
每页个数。取值范围为 0~100,默认值为 10。​
Filter​
Object of GatewayFilter​
否​
-​
过滤条件。​
ProjectName​
String​
否​
default​
网关实例所属项目名称。​
​
GatewayFilter​
​
参数​
类型​
是否必选​
示例值​
描述​
Name​
String​
否​
test​
网关名称。​
Status​
String​
否​
Running​
实例状态,取值:​
  • Creating:创建中。​
  • CreatedFailed:创建失败。​
  • Running:运行中。​
  • Deleting:删除中。​
  • DeletedFailed:删除失败。​
  • Abnormal:异常。​
Type​
String​
否​
standard​
网关类型,取值:​
  • standard:标准网关。​
  • serverless:Serverless网关。​
  • elastic:弹性网关。​
VpcIds​
Array of String​
否​
["vpc-rrd****"]​
网关实例所在的私有网络的 ID。​
Ids​
Array of String​
否​
["gd8****"]​
网关实例 ID。长度限制为 0~50 个。​
​
返回参数​
​
参数​
类型​
示例值​
描述​
Total​
Long​
10​
过滤后的网关实例总个数。​
Items​
Array of GatewayItem​
-​
网关实例列表。​
​
GatewayItem​
​
参数​
类型​
示例值​
描述​
Id​
String​
gd8****​
网关实例 ID。​
Name​
String​
example​
网关实例名称。​
Region​
String​
cn-beijing​
网关实例所属的地域。​
NetworkSpec​
Object of BriefNetworkSpec​
-​
网络配置。​
Status​
String​
Running​
网关状态,取值:​
  • Creating:创建中。​
  • CreatedFailed:创建失败。​
  • Updating:更新中。​
  • Running:运行中。​
  • Deleting:删除中。​
  • DeletedFailed:删除失败。​
  • Abnormal:异常。​
Message​
String​
-​
网关创建失败、删除失败或异常时的错误信息。​
CreateTime​
String​
2025-01-01T00:00:00+08:00​
网关实例创建时间。​
标准 RFC3339 格式的 UTC+8 时间。​
MonitorSpec​
Object of MonitorSpec​
-​
监控配置。​
LogSpec​
Object of LogSpec​
-​
日志配置。​
Comments​
String​
example​
网关实例备注信息。​
ResourceSpec​
Object of ResourceSpec​
-​
规格配置。​
Type​
String​
standard​
网关类型,取值:​
  • standard:标准网关。​
  • serverless:Serverless 网关。​
  • elastic:弹性网关。​
Version​
String​
1.16.0​
网关版本。​
Events​
Array of GatewayEvent​
-​
网关实例对应的事件信息。​
ProjectName​
String​
default​
网关实例所属的项目名称。​
CustomLog​
Object of CustomLog​
-​
网关实例自定义日志。​
TraceSpec​
Object of TraceSpecResponse​
-​
链路追踪配置。​
​
BriefNetworkSpec​
​
参数​
类型​
示例值​
描述​
VpcId​
String​
vpc-rrd****​
网关实例所在的私有网络的 ID。​
SubnetIds​
Array of String​
["subnet-5g3****","subnet-2fe****"]​
私有网络子网 ID 列表。​
  • 子网必须是上述私有网络的子网。​
  • 最少需要输入两个不同可用区的子网。​
​
MonitorSpec​
​
参数​
类型​
示例值​
描述​
Enable​
Boolean​
true​
是否开启托管 Prometheus(VMP)服务。取值:​
  • true:开启。​
  • false:不开启。​
WorkspaceID​
String​
e28ae****​
Prometheus 工作区 ID。详情请参见 创建通用工作区。​
说明​
当MonitorSpec.Enable值为 true 时,需要配置本参数。​
​
LogSpec​
​
参数​
类型​
示例值​
描述​
Enable​
Boolean​
true​
是否开启日志服务。取值:​
  • true:开启。​
  • false:不开启。​
ProjectId​
String​
fc69****​
日志项目 ID。详情请参见 创建日志项目。​
说明​
当LogSpec.Enable值为 true 时,需要配置本参数。​
TopicId​
String​
b****​
日志主题 ID,取值为空时会在当前项目中生成名称为“网关实例 ID - accessLog”的主题。详情请参见 创建日志主题。​
说明​
当LogSpec.Enable值为 true 时,需要配置本参数。​
​
ResourceSpec​
​
参数​
类型​
示例值​
描述​
Replicas​
Integer​
3​
节点数量。整数形式,取值范围为 2~100。​
InstanceSpecCode​
String​
2c4g​
节点规格,取值:​
  • 1c2g。​
  • 2c4g。​
  • 4c8g。​
  • 8c16g。​
CLBSpecCode​
String​
small_1​
CLB 规格,取值:​
  • small_1:小型 I。​
  • small_2:小型 II。​
  • medium_1:中型 I。​
  • medium_2:中型 II。​
  • large_1:大型 I。​
  • large_2:大型 II。​
PublicNetworkBillingType​
String​
traffic​
公网网络计费方式,取值:​
  • traffic:按实际流量计费。​
  • bandwidth:按带宽上限计费。​
PublicNetworkBandwidth​
Integer​
20​
公网带宽上限。单位为Mbps,取值范围为 0~500,默认值为 0。​
说明​
当ResourceSpec.PublicNetworkBillingType取值为 bandwidth 时,需要配置本参数。​
NetworkType​
Object of NetworkType​
-​
网络类型。​
​
GatewayEvent​
​
参数​
类型​
示例值​
描述​
Code​
String​
example​
事件代码。​
Description​
String​
example​
事件描述。​
CreateTime​
String​
2025-01-01T00:00:00+08:00​
事件创建时间。​
Data​
JSON Map​
{"example-key":"example-value"}​
事件附带信息。​
​
CustomLog​
​
参数​
类型​
示例值​
描述​
RequestHeaders​
Array of LogEntry​
-​
请求头。长度限制为 0~20 个。​
ResponseHeaders​
Array of LogEntry​
-​
响应头。长度限制为 0~20 个。​
CustomVariables​
Array of LogEntry​
-​
自定义变量。长度限制为 0~20 个。​
​
TraceSpecResponse​
​
参数​
类型​
示例值​
描述​
Enable​
Boolean​
true​
是否开启链路追踪。取值:​
  • true:开启。​
  • false:不开启。​
TraceType​
String​
tls​
链路追踪类型,取值:​
  • tls:日志服务。​
  • apm:应用性能监控全链路版。​
TLSTraceSpec​
-​
日志服务链路追踪配置。​
APMTraceSpec​
-​
应用性能监控全链路版链路追踪配置。​
​
NetworkType​
​
参数​
类型​
示例值​
描述​
EnablePublicNetwork​
Boolean​
true​
是否开启公网。取值:​
  • true:开启。​
  • false:不开启。​
EnablePrivateNetwork​
Boolean​
true​
是否开启私网。取值:​
  • true:开启。​
  • false:不开启。​
​
Data​
​
参数​
类型​
示例值​
描述​
key​
String​
example-key​
事件附带信息的键。​
value​
String​
example-value​
事件附带信息的值。​
​
LogEntry​
​
参数​
类型​
示例值​
描述​
Key​
String​
example​
日志规则的字段值。​
AliasesInLog​
String​
alias​
日志规则的字段别名。​
​
TLSTraceSpecResponse​
​
参数​
类型​
示例值​
描述​
ProjectId​
String​
fc69****​
日志项目ID。详情请参见 创建日志项目。​
TraceId​
String​
0fda****​
Trace ID。详情请参见 创建Trace实例。​
​
示例​
​
请求示例​
​
POST https://apig.cn-beijing.volcengineapi.com?Action=ListGateways&Version=2021-03-03​
Content-Type: application/json​
{​
"PageNumber": 1,​
"PageSize": 10,​
"Filter": {​
"Ids": [​
"gd8****"​
],​
"Name": "test",​
"Type": "standard",​
"Status": "Running",​
"VpcIds": [​
"vpc-rrd****"​
]​
},​
"ProjectName": "default"​
}​
​
返回示例​
​
Content-Type: application/json​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "ListGateways",​
"Version": "2021-03-03",​
"Service": "apig",​
"Region": "cn-beijing"​
},​
"Result": {​
"Total": 10,​
"Items": [​
{​
"Id": "gd8****",​
"Name": "example",​
"Type": "standard",​
"Events": [​
{​
"Code": "example",​
"Data": {​
"example-key": "example-value"​
},​
"CreateTime": "2025-01-01T00:00:00+08:00",​
"Description": "example"​
}​
],​
"Region": "cn-beijing",​
"Status": "Running",​
"LogSpec": {​
"Enable": true,​
"TopicId": "b****",​
"ProjectId": "fc69****"​
},​
"Message": "",​
"Version": "1.16.0",​
"Comments": "example",​
"CustomLog": {​
"RequestHeaders": [​
{​
"Key": "example",​
"AliasesInLog": "alias"​
}​
],​
"CustomVariables": [​
{​
"Key": "example",​
"AliasesInLog": "alias"​
}​
],​
"ResponseHeaders": [​
{​
"Key": "example",​
"AliasesInLog": "alias"​
}​
]​
},​
"TraceSpec": {​
"Enable": true,​
"TraceType": "tls",​
"TLSTraceSpec": {​
"TraceId": "0fda****",​
"ProjectId": "fc69****"​
}​
},​
"CreateTime": "2025-01-01T00:00:00+08:00",​
"MonitorSpec": {​
"Enable": true,​
"WorkspaceID": "e28ae****"​
},​
"NetworkSpec": {​
"VpcId": "vpc-rrd****",​
"SubnetIds": [​
"subnet-5g3****",​
"subnet-2fe****"​
]​
},​
"ProjectName": "default",​
"ResourceSpec": {​
"Replicas": 3,​
"CLBSpecCode": "small_1",​
"NetworkType": {​
"EnablePublicNetwork": true,​
"EnablePrivateNetwork": true​
},​
"InstanceSpecCode": "2c4g",​
"PublicNetworkBandwidth": 20,​
"PublicNetworkBillingType": "traffic"​
}​
}​
]​
}​
}​
​
错误码​
本接口无特有的错误码。更多信息请参见 公共错误码。​
最近更新时间:2026.07.29 10:20:00
这个页面对您有帮助吗?
有用
有用
无用
无用