DeleteVSwitch_专有网络_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 内的所有资源,包括交换机、云产品实例、路由器接口、HaVip 等。

  • 只有处于 Available 状态的交换机可以被删除。

  • 交换机所在的 VPC 正在创建或删除交换机或路由条目时,无法删除交换机。

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

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

流控信息

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

授权信息

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

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
vpc:DeleteVSwitch
Delete
VSwitch
acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}

请求参数

字段名称字段详情
VSwitchIdstring

要删除的交换机的 ID。

示例值:vsw-asdfjlna****参考取值来源:
    CreateVSwitch
    DescribeVSwitches
    ListVSwitchCidrReservations
    GetVSwitchCidrReservationUsage
RegionIdstring

要删除的交换机的地域 ID。展开详情

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

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

示例值:false

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

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

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
OperationDenied.OtherSubnetProcessing
other subnet is processing.诊断
400
IncorrectVSwitchStatus
vpc subnet is in middle status.诊断
400
DependencyViolation
Resources deployed in the vSwitch have not been deleted.诊断
400
IncorrectRouteEntryStatus
Some route entry status blocked this operation.诊断
400
DependencyViolation.HaVip
VSwitch cannot be deleted when there are some HaVip dependent with it.诊断
400
DependencyViolation.RouteTable
VSwitch cannot be deleted when associated with route table诊断
400
MissingParameter
Miss mandatory parameter.诊断
400
TaskConflict
The operation is too frequent, TaskConflict.诊断
400
DependencyViolation.SNAT
The vswitch cannot be deleted when used by snat.诊断
400
DeleteVSwitch.IncorrectStatus.cbnStatus
Current CBN status does not support this operation.诊断
400
AttrMismatching.NaclAndBindInstance
The network acl and resource not in same vpc.诊断
400
InvalidResource.NotBinding
The resource has not been binded.诊断
400
DependencyViolation.SnatEntry
VSwitch cannot be deleted when snat entry exist.诊断
400
DependencyViolation.NetworkAcl
VSwitch cannot be deleted when network acl exist.诊断
400
DependencyViolation.EnhancedNatgw
VSwitch cannot be deleted when natgw exist.诊断
400
DependencyViolation.ResourceShare
VSwitch cannot be deleted when resource share exist.诊断
400
OperationFailed.SystemBusy
Operation failed because system is busy.诊断
400
DependencyViolation.MulticastDomain
VSwitch cannot be deleted when associated with multicast domain.诊断
400
DependencyViolation.VSwitchCidrReservation
VSwitch cannot be deleted when vswitch cidr reservation exist.诊断
400
DependencyViolation.CloudService
VSwitch cannot be deleted when uesd by cloud service.诊断
400
InvalidVSwitchId.NotFound
VSwitch not exist.诊断
400
OperationFailed.Ipv6InstanceExist
Operation failed because vswitch has ipv6 instance.诊断
400
DependencyViolation.Ipv6Address
The specified resource of %s depends on %s, so the operation cannot be completed.诊断
400
DependencyViolation.%s
The specified resource of [%s] depends on [%s], so the operation cannot be completed.诊断
404
Forbidden.RegionNotFound
Specified instance is not found during access authentication.诊断
404
IncorrectVSwitchId
Specified vSwtich instance is not found during access authentication.诊断
404
InvalidVSwitchId.NotFound
VSwitch not exist.诊断
404
IncorrectStatus
Vswtich status not stable.诊断
404
DependencyViolation.VSwitchCidrReservation
VSwitch cannot be deleted when vswitch cidr reservation exist.诊断
404
DependencyViolation.RouterInterface
Specified object has dependent resources RouterInterface.诊断

变更历史

变更时间变更内容概要操作
2025-04-01
新增请求参数DryRun
2025-02-14
变更错误码400
2025-02-10
删除返回参数
2023-12-14
变更错误码404
2023-10-10
变更错误码400
2023-09-21
变更错误码400
2023-06-25
变更错误码400
2023-06-09
变更错误码400
2023-03-17
变更错误码400
2023-01-05
变更错误码404
新增返回参数
  • 1
  • 2
  • 10 条/页

相关示例

查询交换机 --> 删除交换机
2021-12-16
查询vswitch->删除vswitch->等待vswitch删除完成->删除vpc
2021-12-22