DeleteVpc_专有网络_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

调用该接口删除 VPC 时,请注意:

  • 删除 VPC 之前,需要先释放或转移 VPC 内的所有资源,包括交换机、云产品实例、高可用虚拟 IP 等。

  • 只有处于 Available 状态的 VPC 才可以被删除。

  • DeleteVpc 接口属于异步接口,即系统会返回一个请求 ID,但该 VPC 尚未删除成功,系统后台的删除任务仍在进行。您可以调用 DescribeVpcAttribute 查询 VPC 的删除状态:

    • 当 VPC 处于 Deleting 状态时,表示 VPC 正在删除中。
    • 当查询不到指定的 VPC 时,表示 VPC 删除成功。
  • DeleteVpc 接口不支持并发删除同一个 VPC。

流控信息

请求速率为300/60(s)。更多流控信息,请前往配额中心查看

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
vpc:DeleteVpc
Delete
VPC
acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}
vpc:tag

请求参数

字段名称字段详情
VpcIdstring

要删除的 VPC ID。

示例值:vpc-bp1m7v25emi1h5mtc****参考取值来源:
    CreateVpc
RegionIdstring

要删除的 VPC 所在的地域 ID。展开详情

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
ForceDeleteboolean

是否强制删除 VPC。取值:展开详情

示例值:false
DryRunboolean

是否只预检此次请求。取值:展开详情

示例值:false
ClientTokenstring

客户端 Token,用于保证请求的幂等性。展开详情

示例值:123e4567-e89b-12d3-a456-426655440000

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:0ED8D006-F706-4D23-88ED-E11ED28DCAC0

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
IncorrectStatus.VpcDhcpStatus
The DhcpOptionsSet status of vpc does not support this operation.诊断
400
DependencyViolation.GatewayEndpoint
The VPC contains endpoints and cannot be deleted.诊断
400
IncorrectVpcStatus
Current VPC status does not support this operation.诊断
400
DependencyViolation.RouteEntry
Specified object has dependent resources诊断
400
DependencyViolation.Instance
Specified object has dependent resources诊断
400
DependencyViolation.VSwitch
Specified object has dependent resources诊断
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.诊断
400
DependencyViolation.RouterInterface
Specified object has dependent resources RouterInterface.诊断
400
DependencyViolation.SecurityGroup
Specified object has dependent resources SecurityGroup.诊断
400
Forbidden.VpcNotFound
Specified VPC can not found.诊断
400
Forbbiden
Active custom route in 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
IncorrectStatus.cbnStatus
Current CBN status does not support this operation.诊断
400
DependencyViolation.RouteTable
Specified object has dependent custom routeTable.诊断
400
DependencyViolation.NetworkAcl
Specified object has dependent resources network acl.诊断
400
DependencyViolation.ClassicLinkInstance
Specified object has active classicLink instance.诊断
400
System.ServiceBusy
System is busy, please try later.诊断
400
DependencyViolation.DhcpOptionsSet
The VPC cannot be deleted when it is associated with dhcpOptionsSet.诊断
400
InvalidRegionId.NotFound
The specified region is not found.诊断
400
DependencyViolation.CustomRouteTable
CustomRouteTable already exists.诊断
400
DependencyViolation.Ipv4Gateway
The VPC cannot be deleted when it has ipv4Gateway.诊断
400
DependencyViolation.GatewayRouteTable
Specified object has dependent resources gatewayRouteTable.诊断
400
OperationDenied.VpcPeerExists
The operation is not allowed because the VpcPeer exists.诊断
400
DependencyViolation.AppAccess
Specified object has dependent resources app access.诊断
400
DependencyViolation.OppositeRouterInterface
Failed to delete the VPC because it has peer router interfaces.诊断
400
DependencyViolation.TransitRouter
Specified object has attached to Transit Router.诊断
400
DependencyViolation.Ipv6Gateway
The VPC contains IPv6Gateway and cannot be deleted.诊断
400
DependencyViolation.CloudServiceResource
The VPC contains CloudServiceResource and cannot be deleted.诊断
400
IncorrectStatus.VpcDnsHostnameStatus
The DnsHostname status of vpc does not support this operation.诊断
403
OperationDenied
The operation is not supported in this status.诊断
404
InvalidVpcId.NotFound
Specified VPC does not exist.诊断
404
DependencyViolation.Instance
ClassicLink Instances exist in VPC.诊断
500
InternalError
The request processing has failed due to some unknown error.诊断

变更历史

变更时间变更内容概要操作
2025-02-25
变更错误码400
2024-10-28
变更错误码400
2024-09-29
变更错误码400
2024-07-24
删除返回参数
2024-01-24
变更错误码400
2023-09-25
变更错误码404
  • 1
  • 2
  • 10 条/页

相关示例

查询vswitch->删除vswitch->等待vswitch删除完成->删除vpc
2021-12-22