呼叫 DeleteNatGateway 介面刪除指定的公網 NAT 閘道器。
介面說明
DeleteNatGateway 介面屬於非同步介面,即系統會先返回一個請求 ID,但該 NAT 閘道器執行個體並未刪除完成,系統背景的刪除任務仍在進行。您可以呼叫 DescribeNatGateways 查詢 NAT 閘道器的狀態:
-
當 NAT 閘道器處於 Deleting 狀態時,表示 NAT 閘道器正在刪除中,在該狀態下,您只能執行查詢操作,不能執行其他操作。
-
當查詢不到該 NAT 閘道器執行個體時,表示 NAT 閘道器刪除完成。
刪除 NAT 閘道器操作不可恢復,請您謹慎操作。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:DeleteNatGateway |
delete |
*NatGateway
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
NAT 閘道器所在的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| NatGatewayId |
string |
是 |
要刪除的 NAT 閘道器執行個體 ID。 |
ngw-bp1uewa15k4iy5770**** |
| Force |
boolean |
否 |
是否強制刪除 NAT 閘道器,取值:
|
false |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
請求 ID。 |
||
| RequestId |
string |
請求 ID。 |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | DependencyViolation.VpcEndpointService | The specified resource of %s depends on %s, so the operation cannot be completed. | NAT 有依賴的終端節點服務,因此無法執行此操作。 |
| 400 | DependencyViolation.FullNatEntry | The specified resource of %s depends on %s, so the operation cannot be completed. | |
| 400 | DependencyViolation.RouterEntry | The specified resource of %s depends on %s, so the operation cannot be completed. | NAT 有依賴的路由條目,所以此操作不能進行。 |
| 400 | DependencyViolation.BandwidthPackages | There are BandwidthPackages on specified NatGateway not deleted. | |
| 400 | DependencyViolation.EIPS | There are Eips on specified NatGateway, please unbind it first. | 指定的 NAT 閘道器已綁定了彈性公網 IP,請先將其從 NAT 閘道器解除綁定。 |
| 400 | Forbidden.PrePaidNatGateway | The specified NatGateway is PrePaid. | |
| 400 | InvalidOperation.DeletionProtection | The instance cannnot delete because of deletion protecion. | |
| 400 | DependencyViolation.SnatEntry | The specified resource of %s depends on %s, so the operation cannot be completed. | NatIp 或 Ipv4Prefix 存在關聯的 SnatEntry,刪除作業無法繼續,請刪除相依的 Snat 後再重新刪除。 |
| 400 | IncorrectStatus.SnatEntry | The status of %s [%s] is incorrect. | |
| 400 | DependencyViolation.ForwardEntry | The specified resource of %s depends on %s, so the operation cannot be completed. | |
| 400 | IncorrectStatus.ForwardEntry | The status of %s [%s] is incorrect. | 要刪除的 DNAT 條目執行個體狀態不對。 |
| 400 | DependencyViolation.NatIp | The specified resource of %s depends on %s, so the operation cannot be completed. | 有依賴的 NAT IP,所以此操作不能進行。 |
| 400 | IncorrectStatus.NatIp | The status of %s [%s] is incorrect. | NatIp 處於中間狀態,請稍後重試。 |
| 400 | DependencyViolation.NatIpCidr | The specified resource of %s depends on %s, so the operation cannot be completed. | NAT 有依賴的 NAT IP CIDR,所以此操作不能進行。 |
| 400 | IncorrectStatus.NatGateway | The NatGateway instance is being deleted and needs to wait until the process is complete. | 指定的 NatGateway 未處於穩態。 |
| 400 | IncorrectStatus.RouterEntry | The status of %s [%s] is incorrect. | RouterEntry 目前狀態不正確。 |
| 400 | IncorrectStatus.VSwitch | The specified vSwitch status is invalid. | |
| 404 | INSTANCE_NOT_EXISTS | Instance not exists. | |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | |
| 404 | InvalidNatGatewayId.NotFound | The specified NatGatewayId does not exist in our records. | |
| 404 | ResourceNotFound.NatGateway | The specified resource of %s is not found. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。