You need to enable JavaScript to run this app.
文档中心
私有网络

私有网络

复制全文
下载 pdf
子网
DeleteSubnet - 删除子网
复制全文
下载 pdf
DeleteSubnet - 删除子网
调用 DeleteSubnet 接口,删除指定的子网。​
使用说明​
​
前提条件​
说明​
子网内无网卡​
您可调用 DescribeNetworkInterfaces 接口,查看是否存在网卡。 若存在,可调用 DeleteNetworkInterface 接口删除网卡。​
子网未关联SNAT规则​
您可调用 DescribeSnatEntries 接口,查看是否关联SNAT规则。若已关联,可调用 DeleteSnatEntry 接口删除SNAT规则。​
子网无高可用虚拟IP​
您可调用 DescribeHaVips 接口,查看是否存在高可用虚拟IP。若存在,可调用 DeleteHaVip 接口删除高可用虚拟IP。​
子网未关联网络ACL​
您可调用 DescribeSubnets 接口,查看是否关联网络ACL。 若存在,可调用 DisassociateNetworkAcl 接口与网络ACL解除关联。​
​
DeleteSubnet 为异步接口,即返回请求ID时,系统后台仍在删除。您可调用 DescribeSubnetAttributes 查看子网的状态,Pending表示删除中,查看失败表示删除成功。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:DeleteSubnet​
接口名称。当前 API 的名称为DeleteSubnet。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
SubnetId String 必选 示例值:subnet-bp15zckdt37pq72zv****​
待删除子网的ID。​
您可以调用 DescribeSubnets 接口,查询子网的ID。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 示例值:2021062415303301022514515207C4****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=DeleteSubnet&Version=2020-04-01&SubnetId=subnet-bp15zdt37pq72zv**** HTTP/1.1​
Host: vpc.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/vpc/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "DeleteSubnet",​
"Version": "2020-04-01",​
"Service": "vpc",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "2021062415303301022514515207C4****"​
}​
}​
​
错误码​
​
状态码​
错误码​
错误信息​
说明​
400​
DryRunOperation​
Exception raised to indicate a successfully authorized action when the DryRun flag is set to true.​
该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。​
400​
IdempotentParameterMismatch​
Arguments on this idempotent request are inconsistent with arguments used in previous request(s).​
此幂等请求的参数与前一个请求中使用的参数不一致。​
400​
InvalidCen.InvalidStatus​
The CEN that the specified VPC attached to is not in the correct status for the request.​
VPC关联的CEN实例所处的状态无法响应请求,请稍后再试。​
400​
InvalidFlowLog.InvalidStatus​
The specified flow log is not in the correct status for the request.​
指定流日志所处的状态无法响应该请求。​
400​
InvalidParameter.ClientTokenMalformed​
The specified parameter ClientToken is malformed.​
指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。​
400​
InvalidSubnet.InUse​
The specified subnet has dependent resource of an HaVip.​
指定的子网包含高可用虚拟IP,无法删除。​
400​
InvalidSubnet.InUse​
The specified subnet has dependent resource of an SNAT entry.​
指定的子网包含SNAT规则,无法删除。​
400​
InvalidSubnet.InUse​
The specified subnet has dependent resource of an elastic network interface.​
指定的子网包含网卡,无法删除。​
400​
InvalidSubnet.InUse​
The specified subnet is associated with Network ACL.​
指定的子网被网络ACL关联,无法删除。​
400​
InvalidSubnet.InUse​
The specified subnet is in use. The subnet in the resource sharing cannot be deleted.​
指定的子网在占用中。资源共享中的子网不能被删除。​
400​
InvalidSubnet.InvalidStatus​
The specified subnet is not in the correct status for the request.​
指定的子网所处的状态无法响应该请求。​
400​
InvalidVpc.InvalidStatus​
The specified VPC is not in the correct status for the request.​
指定的VPC所处状态无法响应该请求。​
400​
QuotaExceeded.SystemRouteEntry​
You've reached the limit on the number of system route entries per route table.​
已达到可创建系统路由条目的数量上限。​
404​
InvalidFlowLog.NotFound​
The specified flow log does not exist.​
指定的流日志不存在。​
404​
InvalidSubnet.NotFound​
The specified subnet does not exist.​
指定的子网不存在。​
404​
InvalidVpc.NotFound​
The specified VPC does not exist.​
指定的VPC不存在。​
409​
InvalidRouteCidr.Conflict​
The specified CIDR block conflicts with that of another route in your route table.​
指定的CIDR地址块与所属路由表中另一个规则CIDR地址块冲突。​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
幂等请求处理中。​
​
​
最近更新时间:2026.09.23 11:13:42
这个页面对您有帮助吗?
有用
有用
无用
无用