全部產品
Search
文件中心

Elastic Compute Service:DeleteVpc -

更新時間:Apr 21, 2026

說明

目前該API介面已標記為棄用,推薦使用替代API:Vpc(2016-04-28) - DeleteVpc

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

vpc:DeleteVpc

delete

*VPC

acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}

  • vpc:tag

請求參數

名稱

類型

必填

描述

樣本值

VpcId

string

RegionId

string

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

樣本

正常返回樣本

JSON格式

{
  "RequestId": ""
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 DependencyViolation.RouteTable VPC cannot be deleted when custom route table exists.
400 IncorrectVpcStatus Current VPC status does not support this operation. 當前Virtual Private Cloud 的狀態無法支援這個操作。
400 DependencyViolation.RouteEntry Specified object has dependent resources
400 DependencyViolation.Instance Specified object has dependent resources 當前 VPC 還存在未刪除的雲產品執行個體,VPC 刪除失敗。
400 DependencyViolation.VSwitch Specified object has dependent resources 當前 VPC 還存在未刪除的交換器,VPC 刪除失敗,刪除 VPC 下的交換器後再嘗試刪除 VPC。
400 DependencyViolation.SecurityGroup Specified object has dependent resources SecurityGroup. 當前 VPC 還存在未刪除的安全性群組,VPC 刪除失敗,請先刪除該 VPC 下的安全性群組後再刪除 VPC。指定的虛擬交換器已關聯安全性群組,無法刪除。
400 DependencyViolation.RouteInterface Specified object has dependent route interface . 指定的虛擬交換器串連了路由器介面,無法刪除。
400 DependencyViolation.Tunnel Specified object has dependent tunnel. 指定的虛擬交換器關聯了資料通道,無法刪除。
400 DependencyViolation.NatGateway Specified object has dependent resources NatGateway. VPC 中還有 NAT Gateway,不能被刪除,請先刪除該 VPC 中的 NAT Gateway再刪除 VPC。
400 DependencyViolation.RouterInterface Specified object has dependent resources RouterInterface.
400 Forbidden.VpcNotFound Specified VPC can not found.
400 Forbbiden Active custom route in vpc. 您需要在 VPC 中添加自訂路由條目。
400 TaskConflict The eip operate too frequent, TaskConflict. 操作過於頻繁,請稍等一會再重試
400 InvalidAction The VPC has been connected to the classic network ECS. Please cancel the connection before proceeding. 您要進行修改的資源還有依賴資源
400 DependencyViolation.Ipv6Gateway %s
400 IncorrectStatus.cbnStatus Current CBN status does not support this operation.
400 DependencyViolation.CloudServiceResource %s
400 DependencyViolation.ClassicLinkInstance Specified object has active classicLink instance.
400 IllegalParam.RegionId The specified RegionId is illegal.
400 DependencyViolation.NetworkAcl Specified object has dependent resources network acl.
400 InvalidRegionInstance The specified InstanceId does not exist in given region. 該執行個體在指定的地區中不存在,請確認參數是否正確。
400 DependencyViolation.Ipv4Gateway The VPC cannot be deleted when it has ipv4Gateway.
400 OperationDenied.VpcPeerExists The operation is not allowed because the VpcPeer exists. 指定操作被禁止,因為VPC記憶體在VPC對等串連。
400 DependencyViolation.GatewayRouteTable Specified object has dependent resources gatewayRouteTable. 存在網關路由表依賴,不允許刪除VPC。
400 DependencyViolation.DhcpOptionsSet The VPC cannot be deleted when it is associated with dhcpOptionsSet. 當前VPC還存在未刪除的DHCP選項集執行個體,不允許刪除。
400 InternalError The request processing has failed due to some unknown error 未知錯誤,請求失效。
401 DependencyViolation.RouterInterface Specified object has dependent resources RouterInterface. 指定的虛擬交換器串連了路由器介面,無法刪除。
500 InternalError The request processing has failed due to some unknown error.
403 OperationDenied The operation is not supported in this status. 此狀態下制定操作無效。
404 InvalidVpcId.NotFound Specified VPC does not exist. 指定的Virtual Private Cloud ID 不存在。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情