呼叫 ModifySnatEntry 介面修改指定的 SNAT 條目。
介面說明
ModifySnatEntry 介面屬於非同步介面,即系統會先返回一個請求 ID,但 SNAT 條目並未修改完成,系統後台的修改任務仍在進行。您可以呼叫 DescribeSnatTableEntries 查詢 SNAT 條目的狀態:
-
當 SNAT 條目處於 Pending 狀態時,表示 SNAT 條目正在修改中,在該狀態下,您只能執行查詢操作,不能執行其他操作。
-
當 SNAT 條目處於 Available 狀態時,表示 SNAT 條目修改完成。
如果 SNAT 表中有 SNAT 條目的狀態為 Pending 時,無法修改該 SNAT 表中的 SNAT 條目。
ModifySnatEntry 介面在同一個 SNAT 條目執行個體下不支援並發修改指定的 SNAT 條目。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:ModifySnatEntry |
update |
*SnatTable
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
NAT 閘道所在的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| SnatTableId |
string |
是 |
SNAT 條目所在的 SNAT 表的 ID。 |
stb-8vbczigrhop8x5u3t**** |
| SnatEntryId |
string |
是 |
要修改的 SNAT 條目的 ID。 |
snat-bp1vcgcf8tm0plqcg**** |
| SnatIp |
string |
否 |
說明
指定多個 EIP 設定 SNAT IP 位址池時,業務連線會透過雜湊演算法分配到多個 EIP,由於每個連線的流量不同,可能會出現多 EIP 業務流量不均勻的情況,建議您將每個 EIP 都加入到同一個共用頻寬中以避免單 EIP 頻寬達到上限導致業務受損。
|
47.98.XX.XX |
| SnatEntryName |
string |
否 |
SNAT 條目的名稱。 長度為 2~128 個字元,必須以字母或中文開頭,但不能以 |
SnatEntry-1 |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。 從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 可能不一樣。 |
02fb3da4-130e-11e9-8e44-001**** |
| EipAffinity |
integer |
否 |
是否開啟 IP 親和性。取值:
說明
開啟 IP 親和性開關後,如果 SNAT 條目繫結多個 EIP 或 NAT IP,同一個用戶端將使用相同的 EIP 或 NAT IP 進行存取,否則用戶端將從繫結的 EIP 或 NAT IP 中隨機選取進行存取。 |
1 |
| NetworkInterfaceId |
string |
否 |
彈性網路卡 ID。 說明
會將彈性網路卡的 IPv4 位址集作為 SNAT 位址。 |
eni-gw8g131ef2dnbu3k**** |
| DryRun |
boolean |
否 |
是否只預檢此次請求,取值:
|
false |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回的回應體。 |
||
| RequestId |
string |
請求 ID。 |
2315DEB7-5E92-423A-91F7-4C1EC9AD**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "2315DEB7-5E92-423A-91F7-4C1EC9AD****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidSnatIp.Malformed | The specified SnatIp is not a valid IP address. | |
| 400 | Forbidden.SourceVSwitchId.Duplicated | The specified SourceCIDRis duplicated. | |
| 400 | Forbidden.IpUsedInForwardTable | The specified SnatIp already used in forward table | |
| 400 | OperationUnsupported.EipForSnatPool | The Eip cannot support snat pool | |
| 400 | InvalidParameter.Name.Malformed | The specified Name is not valid. | |
| 400 | IncorretSnatEntryStatus | The Specified SnatEntry is not stable status, can not operation | |
| 400 | EIP_NOT_IN_GATEWAY | The Eip not in nat gateway | |
| 400 | InvalidParameter.SnatIp | Error public ip must in same bandwidth package. | |
| 400 | QuotaExceeded.SnatIp | Public ip number exceeds quota. | |
| 400 | InvalidSnatEntryId.NotFound | Specified SNAT entry does not exist. | |
| 400 | IncorrectStatus.SnatEntry | The Specified SnatEntry is not stable status, can not operation | |
| 400 | OperationFailed.CanNotUseEipInDnat | Operation failed because the eip can not used by forward entry. | |
| 400 | OperationUnsupported.EipNatGWCheck | Operation unsupported because the relation check of eip and nat gateway is failed. | |
| 400 | ResourceNotFound.SnatEntry | Specified SNAT entry does not exist. | |
| 400 | IncorrectStatus.NatIp | Specified NatIp does not exist. | |
| 400 | OperationFailed.CanNotUseNatIpInDnat | Operation failed because the NatIp can not used by forward entry. | |
| 400 | IncorrectStatus.NATGW | NATGW status is invalid. | |
| 400 | OperationUnsupported.EipInBinding | Create snat entry with eip in associating status is unsupported. | |
| 400 | OperationUnsupported.EipNatBWPCheck | The EIP is not associated with a NAT service plan. | |
| 400 | IllegalParam.NetworkInterfaceId | The param of NetworkInterfaceId is illegal. | |
| 400 | OperationFailed.SnatIpPoolBwpRules | The operation failed because the IP in Snat entryl was added to multiple NAT bandwidth packets. | |
| 400 | OperationFailed.SnatIpPoolCbwpRules | The operation failed because the SNAT rule IPs are added to multi bandwidth packages. | |
| 400 | OperationFailed.SnatIpsTooMany | The maximum number of IP addresses is exceeded in the SNAT pool. | |
| 400 | OperationFailed.SnatIpsCheck | The operation fails because some IPs address in the SNAT entry are not added to common bandwidth packet. | |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | |
| 404 | InvalidSnatTableId.NotFound | Specified SNAT table does not exist. | |
| 404 | InvalidSnatEntryId.NotFound | Specified SNAT entry does not exist. | |
| 404 | InvalidSnatIp.NotFound | Specified SnatIp does not found on the NAT Gateway | |
| 404 | ResourceNotFound.NatIp | Specified NatIp does not found on the NAT Gateway |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。