DeleteVSwitch
呼叫 DeleteVSwitch 介面刪除交換機。
介面說明
呼叫該介面刪除交換機時,請注意以下事項:
-
刪除交換機之前,需要先釋放或移走 VPC 內的所有資源,包括交換機、雲端產品執行個體、路由器介面、HaVip 等。
-
只有處於 Available 狀態的交換機可以被刪除。
-
交換機所在的 VPC 正在建立或刪除交換機或路由條目時,無法刪除交換機。
-
DeleteVSwitch 介面屬於非同步介面,即系統會返回一個請求 ID,但該交換機尚未刪除成功,系統後台的刪除任務仍在進行。您可以呼叫 DescribeVSwitchAttributes 查詢交換機的刪除狀態:
當交換機處於 Pending 狀態時,表示交換機正在刪除中。
當查詢不到指定的交換機時,表示交換機刪除成功。
-
DeleteVSwitch 介面不支援並行刪除同一個交換機。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:DeleteVSwitch |
delete |
*VSwitch
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| VSwitchId |
string |
是 |
要刪除的交換機的 ID。 |
vsw-asdfjlna**** |
| RegionId |
string |
否 |
要刪除的交換機的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| DryRun |
boolean |
否 |
是否只預檢此次請求。取值:
|
false |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回資訊。 |
||
| RequestId |
string |
請求 ID。 |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 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. | |
| 400 | Forbidden.RegionNotFound | Specified instance is not found during access authentication. | |
| 400 | IncorrectStatus | Vswtich status not stable. | |
| 400 | DependencyViolation.RouterInterface | Specified object has dependent resources RouterInterface. | |
| 400 | InvalidRegionId.NotFound | The specified region is not found. | |
| 404 | IncorrectVSwitchId | Specified vSwtich instance is not found during access authentication. | |
| 404 | InvalidVSwitchId.NotFound | VSwitch not exist. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。