查询Ingress配置详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
sae:DescribeIngress |
get |
*全部资源
|
无 | 无 |
请求语法
GET /pop/v1/sam/ingress/Ingress HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| IngressId |
integer |
是 |
需要查询的路由规则 ID。 路由规则 ID 请通过 ListIngresses 接口获取。 |
16263 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回数据。 |
||
| RequestId |
string |
请求 ID。 |
91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** |
| Message |
string |
附加信息。取值说明如下:
|
success |
| TraceId |
string |
调用链 ID,用于精确查询调用信息。 |
0a981dd515966966104121683d**** |
| Data |
object |
返回结果。 |
|
| SlbId |
string |
SLB ID。 |
lb-uf62****6d13tq2u5 |
| NamespaceId |
string |
命名空间 ID。 |
cn-beijing:sae-test |
| Description |
string |
路由规则名称。 |
ingress-sae-test |
| ListenerPort |
integer |
SLB 监听端口。 |
443 |
| SlbType |
string |
SLB 类型。取值说明如下:
|
internet |
| CertId |
string |
CLB 证书 ID。 |
13623****809_16cad216b32_845_-419427029 |
| Name |
string |
路由规则名称。 |
lb-uf6jt0nu4z6ior943****-80-f5**** |
| DefaultRule |
object |
默认规则。 |
|
| ContainerPort |
integer |
默认规则应用的后端端口。 |
8080 |
| AppName |
string |
默认规则的应用名称。 |
app1 |
| AppId |
string |
默认规则的应用。 |
395b60e4-0550-458d-9c54-a265d036**** |
| BackendProtocol |
string |
后端协议。取值说明如下:
该参数仅在参数 LoadBalanceType 取值为 ALB,且参数 ListenerProtocol 取值为 HTTPS 时返回。 |
http |
| Rules |
array<object> |
转发规则。 |
|
|
array<object> |
转发规则。 |
||
| AppName |
string |
目标应用名称。 |
app1 |
| ContainerPort |
integer |
应用后端端口。 |
8080 |
| Domain |
string |
应用域名。 |
edas.site |
| AppId |
string |
目标应用 ID。 |
395b60e4-0550-458d-9c54-a265d036**** |
| Path |
string |
URL 路径。 |
/path1 |
| BackendProtocol |
string |
后端协议。取值说明如下:
该参数仅在参数 LoadBalanceType 取值为 ALB,且参数 ListenerProtocol 取值为 HTTPS 时返回。 |
http |
| RewritePath |
string |
重写路径。 |
/${1} |
| RuleActions |
array<object> |
转发规则动作列表。 |
|
|
object |
规则动作列表。 |
||
| ActionType |
string |
转发动作类型。
|
rewrite |
| ActionConfig |
string |
转发动作中的具体配置。 |
{\"host\":\"www.example.com\",\"path\":\"/example/text\",\"query\":\"x=1\"} |
| Id |
integer |
路由规则 ID。 |
87 |
| LoadBalanceType |
string |
负载均衡 SLB 的类型。取值说明如下:
|
clb |
| ListenerProtocol |
string |
请求转发协议。取值说明如下:
在 CreateIngress 和 UpadateIngress 中,该参数非必填项,如果创建或更新网关路由规则时未填写该参数,则调用该 API 时不返回。 |
HTTP |
| CertIds |
string |
ALB 多证书 ID。 |
87***35-cn-hangzhou,812***3-cn-hangzhou |
| SecurityPolicyId |
string |
安全策略实例 ID |
sp-n0kn923**** |
| RequestTimeout |
integer |
指定请求超时时间。单位:秒。 取值:1~180。 默认值:60。 如果在超时时间内后端服务器一直没有响应,负载均衡将放弃等待,并给客户端返回 HTTP 504 错误码。 |
60 |
| IdleTimeout |
integer |
指定连接空闲超时时间。单位:秒。 取值范围:1~60。 默认值:15。 如果在超时时间内一直没有访问请求,负载均衡会暂时中断当前连接,直到一下次请求来临时重新建立新的连接。 |
3 |
| EnableXForwardedFor |
boolean |
是否开启通过 X-Forwarded-For 头字段获取来访者客户端 IP。 |
true |
| EnableXForwardedForClientSrcPort |
boolean |
是否通过 X-Forwarded-Port 头字段获取负载均衡实例的监听端口。 |
true |
| EnableXForwardedForProto |
boolean |
是否通过 X-Forwarded-Proto 头字段获取负载均衡实例的监听协议。 |
true |
| EnableXForwardedForSlbId |
boolean |
是否通过 SLB-ID 头字段获取负载均衡实例 ID。 |
true |
| EnableXForwardedForSlbPort |
boolean |
是否通过 X-Forwarded-Port 头字段获取负载均衡实例的监听端口。 |
true |
| CreatedBySae |
boolean |
ALB 实例是否为 SAE 代购。 |
true |
| CorsConfig |
object |
选择跨域访问时允许的 HTTP 方法。取值:
|
|
| Enable |
string |
是否启用跨域支持。 |
false |
| ExposeHeaders |
string |
允许暴露的 Header 列表。 |
test_123 |
| AllowHeaders |
string |
允许跨域的 Header 列表。 |
test_123 |
| AllowMethods |
string |
跨域访问时允许的 HTTP 方法。 |
GET |
| AllowOrigin |
string |
允许的访问来源列表。支持只配置一个元素
|
* |
| AllowCredentials |
string |
是否允许携带凭证信息。取值:
|
on |
| MaxAge |
string |
预检请求在浏览器的最大缓存时间,单位:秒。 取值范围:-1~172800。 |
1000 |
| EnableGzip |
boolean |
||
| ErrorCode |
string |
错误码。取值说明如下:
|
空 |
| Code |
string |
接口状态或 POP 错误码。取值说明如下:
|
200 |
| Success |
boolean |
查询 Ingress 详情是否成功。取值说明如下:
|
true |
示例
正常返回示例
JSON格式
{
"RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message": "success",
"TraceId": "0a981dd515966966104121683d****",
"Data": {
"SlbId": "lb-uf62****6d13tq2u5",
"NamespaceId": "cn-beijing:sae-test",
"Description": "ingress-sae-test",
"ListenerPort": 443,
"SlbType": "internet",
"CertId": "13623****809_16cad216b32_845_-419427029",
"Name": "lb-uf6jt0nu4z6ior943****-80-f5****",
"DefaultRule": {
"ContainerPort": 8080,
"AppName": "app1",
"AppId": "395b60e4-0550-458d-9c54-a265d036****",
"BackendProtocol": "http"
},
"Rules": [
{
"AppName": "app1",
"ContainerPort": 8080,
"Domain": "edas.site",
"AppId": "395b60e4-0550-458d-9c54-a265d036****",
"Path": "/path1",
"BackendProtocol": "http",
"RewritePath": "/${1}",
"RuleActions": [
{
"ActionType": "rewrite",
"ActionConfig": "{\\\"host\\\":\\\"www.example.com\\\",\\\"path\\\":\\\"/example/text\\\",\\\"query\\\":\\\"x=1\\\"}"
}
]
}
],
"Id": 87,
"LoadBalanceType": "clb",
"ListenerProtocol": "HTTP",
"CertIds": "87***35-cn-hangzhou,812***3-cn-hangzhou",
"SecurityPolicyId": "sp-n0kn923****",
"RequestTimeout": 60,
"IdleTimeout": 3,
"EnableXForwardedFor": true,
"EnableXForwardedForClientSrcPort": true,
"EnableXForwardedForProto": true,
"EnableXForwardedForSlbId": true,
"EnableXForwardedForSlbPort": true,
"CreatedBySae": true,
"CorsConfig": {
"Enable": "false",
"ExposeHeaders": "test_123",
"AllowHeaders": "test_123",
"AllowMethods": "GET",
"AllowOrigin": "*",
"AllowCredentials": "on",
"MaxAge": "1000"
},
"EnableGzip": true
},
"ErrorCode": "空",
"Code": "200",
"Success": true
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | 不合法的参数:%s不能为空。 |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | 不合法的参数{%s}。 |
| 400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | 不合法的参数{%s}:%s。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。