調用ModifyForwardEntry修改DNAT規則。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ens:ModifyForwardEntry |
update |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ForwardEntryId |
string |
是 |
待修改的 DNAT 條目的 ID。 |
dnat-5tfjp3537mi6iokl59g5c**** |
| ForwardEntryName |
string |
否 |
DNAT 規則的名稱。長度為 2~128 個字元,不能以 |
test0 |
| HealthCheckPort |
integer |
否 |
DNAT 的探測連接埠,需要在內網連接埠範圍內。預設值為空白。 |
80 |
| ExternalIp |
string |
否 |
DNAT 條目中提供公網訪問的彈性公網 IP 位址。 |
121.XXX.XXX.28 |
| ExternalPort |
string |
否 |
需要進行連接埠轉寄的外部連接埠或連接埠段。
|
22 |
| InternalIp |
string |
否 |
通過 DNAT 條目進行公網通訊的執行個體的私網 IP 位址。 |
10.XXX.XXX.50 |
| InternalPort |
string |
否 |
需要進行連接埠轉寄的內部連接埠或連接埠段。
|
22 |
| IpProtocol |
string |
否 |
協議類型,取值:
|
Any |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
樣本
正常返回樣本
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | ens.interface.error | Failed to call API. | 介面調用發生異常。 |
| 400 | InvalidParameter.DnatNotFound | The specified dnat is not found. | 指定的DNAT規則不存在。 |
| 400 | IncorretDnatEntryStatus | Dnat entry status blocked this operation. | Dnat狀態不正確,請檢查Dnat狀態。 |
| 400 | InstanceNotFound | Instance not found, please check the InstanceId. | 找不到執行個體,請檢查執行個體ID |
| 400 | IncorrectInstanceStatus | The current status of the instance does not support this operation. | 當前執行個體狀態不支援此操作。 |
| 400 | Forbidden.ExternalPort.Duplicated | The specified ExternalPort is duplicated. | 該外部連接埠已配置了DNAT規則,請您不要重複設定。 |
| 400 | InvalidExternalIp.NotFound | Specified ExternalIp does not found on the NAT Gateway. | 該公網IP不在NAT Gateway中。 |
| 400 | InvalidPort.Malformed | The specified ExternalPort or InternalPort is not a valid port. | 外網連接埠或內網連接埠不正確。 |
| 400 | Forbidden.ExternalIpUsedInSnat | The external ip is already in use in the snat rule. | 公網IP已經在SNAT規則中使用,請檢查。 |
| 400 | InvalidParameter.HealthCheckPort | HealthCheckPort is not in the range of InternalPort. | 健全狀態檢查連接埠沒有在內網連接埠範圍內。 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。