調(diào)用DeleteNatGateway接口刪除指定的公網(wǎng)NAT網(wǎng)關(guān)。
接口說明
DeleteNatGateway 接口屬于異步接口,即系統(tǒng)會先返回一個請求 ID,但該 NAT 網(wǎng)關(guān)實例并未刪除完成,系統(tǒng)后臺的刪除任務(wù)仍在進(jìn)行。您可以調(diào)用 DescribeNatGateways 查詢 NAT 網(wǎng)關(guān)的狀態(tài):
-
當(dāng) NAT 網(wǎng)關(guān)處于 Deleting 狀態(tài)時,表示 NAT 網(wǎng)關(guān)正在刪除中,在該狀態(tài)下,您只能執(zhí)行查詢操作,不能執(zhí)行其他操作。
-
當(dāng)查詢不到該 NAT 網(wǎng)關(guān)實例時,表示 NAT 網(wǎng)關(guān)刪除完成。
調(diào)試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
授權(quán)信息
下表是API對應(yīng)的授權(quán)信息,可以在RAM權(quán)限策略語句的Action
元素中使用,用來給RAM用戶或RAM角色授予調(diào)用此API的權(quán)限。具體說明如下:
- 操作:是指具體的權(quán)限點。
- 訪問級別:是指每個操作的訪問級別,取值為寫入(Write)、讀取(Read)或列出(List)。
- 資源類型:是指操作中支持授權(quán)的資源類型。具體說明如下:
- 對于必選的資源類型,用背景高亮的方式表示。
- 對于不支持資源級授權(quán)的操作,用
全部資源
表示。
- 條件關(guān)鍵字:是指云產(chǎn)品自身定義的條件關(guān)鍵字。
- 關(guān)聯(lián)操作:是指成功執(zhí)行操作所需要的其他權(quán)限。操作者必須同時具備關(guān)聯(lián)操作的權(quán)限,操作才能成功。
操作 | 訪問級別 | 資源類型 | 條件關(guān)鍵字 | 關(guān)聯(lián)操作 |
---|---|---|---|---|
vpc:DeleteNatGateway | delete |
|
| 無 |
請求參數(shù)
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 是 | NAT 網(wǎng)關(guān)所在的地域 ID。 您可以通過調(diào)用 DescribeRegions 接口獲取地域 ID。 | cn-hangzhou |
NatGatewayId | string | 是 | 要刪除的 NAT 網(wǎng)關(guān)的實例 ID。 | ngw-bp1uewa15k4iy5770**** |
Force | boolean | 否 | 是否強(qiáng)制刪除 NAT 網(wǎng)關(guān),取值:
| false |
返回參數(shù)
示例
正常返回示例
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有依賴的終端節(jié)點服務(wù),所以此操作不能進(jìn)行 |
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有依賴的路由條目,所以此操作不能進(jìn)行 |
400 | DependencyViolation.BandwidthPackages | There are BandwidthPackages on specified NatGateway not deleted. | NAT網(wǎng)關(guān)上有尚未刪除的帶寬包,請刪除NAT網(wǎng)關(guān)下的所有帶寬包后再重新操作。 |
400 | DependencyViolation.EIPS | There are Eips on specified NatGateway, please unbind it first. | 指定的NAT網(wǎng)關(guān)已綁定了彈性公網(wǎng)IP,請先將其從NAT網(wǎng)關(guān)解綁。 |
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. | - |
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條目實例狀態(tài)不對 |
400 | DependencyViolation.NatIp | The specified resource of %s depends on %s, so the operation cannot be completed. | 有依賴的NAT IP,所以此操作不能進(jìn)行 |
400 | IncorrectStatus.NatIp | The status of %s [%s] is incorrect. | NatIp當(dāng)前狀態(tài)不正確。 |
400 | DependencyViolation.NatIpCidr | The specified resource of %s depends on %s, so the operation cannot be completed. | NAT有依賴的NAT IP CIDR,所以此操作不能進(jìn)行 |
400 | IncorrectStatus.NatGateway | The NatGateway instance is being deleted and needs to wait until the process is complete. | NAT網(wǎng)關(guān)實例正在被刪除,無法重復(fù)刪除,需要等待刪除過程完成。 |
400 | IncorrectStatus.RouterEntry | The status of %s [%s] is incorrect. | RouterEntry當(dāng)前狀態(tài)不正確。 |
400 | IncorrectStatus.VSwitch | The specified vSwitch status is invalid. | 虛擬交換機(jī)狀態(tài)異常。 |
404 | INSTANCE_NOT_EXISTS | Instance not exists. | - |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | 指定的RegionId不存在。 |
404 | InvalidNatGatewayId.NotFound | The specified NatGatewayId does not exist in our records. | 指定的 NatGatewayId 不存在,請您檢查填寫的 NatGatewayId 是否正確。 |
404 | IncorrectStatus.NatGateway | %s | - |
404 | ResourceNotFound.NatGateway | The specified resource of %s is not found. | - |
訪問錯誤中心查看更多錯誤碼。
變更歷史
變更時間 | 變更內(nèi)容概要 | 操作 |
---|---|---|
2024-01-18 | OpenAPI 錯誤碼發(fā)生變更 | 查看變更詳情 |
2023-12-20 | OpenAPI 錯誤碼發(fā)生變更 | 查看變更詳情 |
2023-07-24 | OpenAPI 描述信息更新、OpenAPI 錯誤碼發(fā)生變更 | 查看變更詳情 |