查詢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 |
Server Load Balancer 的類型。取值說明如下:
|
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 頭欄位擷取Server Load Balancer執行個體的監聽連接埠。 |
true |
| EnableXForwardedForProto |
boolean |
是否通過 X-Forwarded-Proto 頭欄位擷取Server Load Balancer執行個體的監聽協議。 |
true |
| EnableXForwardedForSlbId |
boolean |
是否通過 SLB-ID 頭欄位擷取Server Load Balancer執行個體 ID。 |
true |
| EnableXForwardedForSlbPort |
boolean |
是否通過 X-Forwarded-Port 頭欄位擷取Server Load Balancer執行個體的監聽連接埠。 |
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。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。