為應用綁定SLB。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
sae:BindSlb |
create |
*全部資源
|
無 | 無 |
請求文法
POST /pop/v1/sam/app/slb HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| AppId |
string |
是 |
需要綁定 SLB 的目標應用 ID。 |
0099b7be-5f5b-4512-a7fc-56049ef1**** |
| Internet |
string |
否 |
綁定公網 SLB。例如:[{"port":80,"targetPort":8080,"protocol":"TCP"}],表示通過 TCP 協議,將容器的 8080 連接埠通過 SLB 的 80 連接埠暴露服務。取值說明如下:
|
[{"port":80,"targetPort":8080,"protocol":"TCP"}] |
| Intranet |
string |
否 |
綁定私網 SLB。例如:[{"port":80,"targetPort":8080,"protocol":"TCP"}],表示通過 TCP 協議,將容器的 8080 連接埠通過 SLB 的 80 連接埠暴露服務。取值說明如下:
|
[{"port":80,"targetPort":8080,"protocol":"TCP"}] |
| InternetSlbId |
string |
否 |
使用指定的已購買的公網 SLB,支援非共用型執行個體。 |
lb-bp1tg0k6d9nqaw7l1**** |
| IntranetSlbId |
string |
否 |
使用指定的已購買的私網 SLB,支援非共用型執行個體。 |
lb-bp1tg0k6d9nqaw7l1**** |
| InternetSlbChargeType |
string |
否 |
公網負載平衡的計費方式。支援以下兩種計費方式:
|
PayBySpec |
| IntranetSlbChargeType |
string |
否 |
內網負載平衡的計費方式。支援以下兩種計費方式:
|
PayBySpec |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回資料。 |
||
| RequestId |
string |
請求 ID。 |
91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** |
| Message |
string |
調用結果的附加資訊。 |
success |
| TraceId |
string |
調用鏈 ID,可用於精確查詢調用資訊。 |
0a98a02315955564772843261e**** |
| Data |
object |
返回結果。 |
|
| ChangeOrderId |
string |
返回的發布單 ID,用於查詢任務執行狀態。 |
01db03d3-3ee9-48b3-b3d0-dfce2d88**** |
| ErrorCode |
string |
錯誤碼。取值說明如下:
|
空 |
| Code |
string |
介面狀態或 POP 錯誤碼。取值說明如下:
|
200 |
| Success |
boolean |
綁定 SLB 是否成功。取值說明如下:
|
true |
樣本
正常返回樣本
JSON格式
{
"RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": {
"ChangeOrderId": "01db03d3-3ee9-48b3-b3d0-dfce2d88****"
},
"ErrorCode": "空",
"Code": "200",
"Success": true
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Slb.NotFound | The SLB instance does not exist: slbId [%s] | SLB不存在:slbId[%s]。 |
| 400 | InvalidApplication.NotFound | The current application does not exist. | 找不到當前應用。 |
| 400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | 不合法的參數:%s不可為空。 |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | 不合法的參數{%s}。 |
| 400 | SlbHttpsCert.NotConsistent | The HTTPS listening certificate for each listener must match. | SLB設定HTTPS監聽認證配置必須一致。 |
| 400 | SlbHttpsCert.NotFound | You must configure the certificate before you configure HTTPS listening for the SLB instance. | SLB設定HTTPS監聽必須有認證配置。 |
| 400 | SlbListenerPort.NotAvailable | The SLB listening port is unavailable: slbId [%s], port [%s] | SLB監聽連接埠被佔用:slbId[%s], port[%s]。 |
| 400 | SlbListenerType.Invalid | An SLB listener type error occurred. Only HTTPS and TCP are supported. | SLB監聽類型異常,只支援HTTPS和TCP類型。 |
| 400 | SlbSpec.NotSupport | Shared performance SLB instances are not supported. | 不支援效能共用型SLB執行個體。 |
| 400 | SlbType.Invalid | An SLB network type error occurred. | SLB網路類型異常。 |
| 400 | SSLCert.NotFound | The specified SSL certificate cannot be found. | 找不到對應的SSL認證。 |
| 400 | System.Upgrading | The system is being upgraded. Please try again later. | 系統正在升級,請稍後操作。 |
| 400 | Application.ChangerOrderRunning | An application change process is in progress. Please try again later. | 應用有變更流程正在執行,請稍後重試。 |
| 400 | Application.InvalidStatus | The application status is abnormal. Please try again later. | 應用狀態異常,請稍後重試。 |
| 400 | Application.NotDeployYet | The application has not been deployed. Please deploy it and try again. | 應用沒有部署,請部署後重試。 |
| 400 | InvalidParam.ProtocolNotSupport | Only TCP protocol is supported. | 不支援指定的協議,只支援TCP協議。 |
| 400 | SLBInstanceQuota.OverQuota | The total number of SLB instances exceeds the quota. Please reduce the instances and try again. | SLB總執行個體數超過了限額,請您減少數量後重試。 |
| 400 | Slb.Tag.Not.Qualified | The current SLB instance cannot be reused because it may have been occupied by %s. | SLB執行個體正在被%s使用,不建議複用。 |
| 400 | Application.NoInstanceAvailable | No instance is available for the application. Please scale out and try again. | 應用沒有可用執行個體,請擴容後重試。 |
| 400 | SlbAppVSwitch.NotMatch | The SLB instance does not match the vSwitch of the current application. | SLB與應用vSwitch不匹配。 |
| 404 | InvalidAppId.NotFound | The specified AppId does not exist. | 指定的AppId不存在。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。