呼叫 DeleteNatIp 介面刪除 NAT IP 位址。
介面說明
DeleteNatIp 介面屬於非同步介面,即系統會先返回一個請求 ID,但該 NAT IP 位址並未刪除完成,系統後台的刪除任務仍在進行。您可以呼叫 ListNatIps 查詢 NAT IP 位址的刪除狀態:
-
當 NAT IP 位址處於 Deleting 狀態時,表示 NAT IP 位址正在刪除中,在該狀態下,您只能執行查詢操作,不能執行其他操作。
-
當查詢不到該 NAT IP 位址時,表示 NAT IP 位址已刪除。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:DeleteNatIp |
delete |
*NatGateway
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
要刪除的 NAT IP 位址所屬 NAT 閘道執行個體的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-qingdao |
| NatIpId |
string |
否 |
要刪除的 NAT IP 位址執行個體 ID。 |
vpcnatip-gw8y7q3cpk3fggs87**** |
| NatGatewayId |
string |
否 |
要刪除的 IP 前綴所屬的 NAT 閘道執行個體 ID。 當刪除 IP 前綴時需要指定。 |
ngw-gw8v16wgvtq26vh59**** |
| Ipv4Prefix |
string |
否 |
刪除的 IP 前綴位址。 |
192.168.0.0/28 |
| DryRun |
boolean |
否 |
是否只預檢此次請求,取值:
|
false |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。 從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 可能不一樣。 |
5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
| RegionId |
string |
是 |
要刪除的 NAT IP 位址所屬 NAT 閘道執行個體的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-qingdao |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
E9AD97A0-5338-43F8-8A80-5E274CCBA11B |
樣本
正常返回樣本
JSON格式
{
"RequestId": "E9AD97A0-5338-43F8-8A80-5E274CCBA11B"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IncorrectStatus.NatIp | The status of %s [%s] is incorrect. | |
| 400 | OperationFailed.DefaultNatIp | The operation is failed because of default NatIP can not be deleted. | |
| 400 | DependencyViolation.NatIp | The specified resource of %s depends on %s, so the operation cannot be completed. | |
| 400 | IncorrectStatus.NatGateway | The status of %s [%s] is incorrect. | |
| 400 | DependencyViolation.FullNatEntry | The fullnat entry depends on this nat ip,so the operation cannot be completed. | |
| 400 | IllegalParam.NatIp | The param of %s is illegal. | |
| 400 | Mismatch.Ipv4PrefixAndNatIpCidr | The %s and %s are mismatched. | |
| 400 | Mismatch.Ipv4PrefixAndCidrReservations | The %s and %s are mismatched. | |
| 400 | IllegalParam.Ipv4Prefix | The param of %s is illegal. | |
| 400 | DependencyViolation.%s | The specified resource of [%s] depends on [%s], so the operation cannot be completed. | |
| 400 | DependencyViolation.SnatEntry | The specified resource of %s depends on %s, so the operation cannot be completed. | |
| 400 | DependencyViolation.Ipv4Prefix | The specified resource of %s depends on %s, so the operation cannot be completed. | |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | |
| 404 | ResourceNotFound.NatIp | The specified resource of %s is not found. | |
| 404 | ResourceNotFound.NatGateway | The specified resource of %s is not found. | |
| 404 | ResourceNotFound.NatIpCidr | The specified resource of %s is not found. | |
| 404 | ResourceNotFound.%s | The specified resource of %s is not found. | |
| 404 | ResourceNotFound.Ipv4Prefix | The specified resource of %s is not found. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。