Invoca la operación DeleteVSwitch para eliminar un vSwitch.
Descripción de la operación
Antes de invocar esta operación para eliminar un vSwitch, tenga en cuenta los siguientes puntos:
-
Antes de eliminar un vSwitch, libere o mueva todos los recursos de la VPC, incluidos vSwitches, instancias de servicios en la nube, interfaces de enrutador y HaVips.
-
Solo se pueden eliminar los vSwitches que se encuentran en estado Available.
-
No se puede eliminar un vSwitch si la VPC a la que pertenece está creando o eliminando un vSwitch o una ruta.
-
La operación DeleteVSwitch es asíncrona. Después de enviar una solicitud, el sistema devuelve un ID de solicitud, pero el vSwitch aún no se ha eliminado. La tarea de eliminación sigue ejecutándose en segundo plano. Puede invocar DescribeVSwitchAttributes para consultar el estado de eliminación del vSwitch:
Si el vSwitch está en estado Pending, significa que se está eliminando.
Si no se encuentra el vSwitch especificado, significa que el vSwitch ya se eliminó.
-
La operación DeleteVSwitch no admite la eliminación simultánea del mismo vSwitch.
Pruébelo ahora
Test
Autorización de RAM
|
Action |
Nivel de acceso |
Tipo de recurso |
Clave de condición |
Acción dependiente |
|
vpc:DeleteVSwitch |
delete |
*VSwitch
|
Ninguna | Ninguna |
Parámetros de la solicitud
|
Parámetro |
Tipo |
Obligatorio |
Descripción |
Ejemplo |
| VSwitchId |
string |
Sí |
El ID del vSwitch que se va a eliminar. |
vsw-asdfjlna**** |
| RegionId |
string |
No |
El ID de la región del vSwitch que se va a eliminar. Puede invocar la operación DescribeRegions para consultar la lista de regiones más reciente. |
cn-hangzhou |
| DryRun |
boolean |
No |
Especifica si se debe realizar una ejecución de prueba (dry run). Valores válidos:
|
false |
Elementos de la respuesta
|
Elemento |
Tipo |
Descripción |
Ejemplo |
|
object |
Los parámetros de respuesta. |
||
| RequestId |
string |
El ID de la solicitud. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
Ejemplos
Respuesta exitosa
JSON Formato
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Códigos de error
|
Código de estado HTTP |
Código de error |
Mensaje de error |
Descripción |
|---|---|---|---|
| 400 | OperationDenied.OtherSubnetProcessing | other subnet is processing. | You cannot delete the vSwitch because other subnets are being managed. |
| 400 | IncorrectVSwitchStatus | vpc subnet is in middle status. | |
| 400 | DependencyViolation | Resources deployed in the vSwitch have not been deleted. | Failed to delete the vSwitch because resources attached to the vSwitch are not released. |
| 400 | IncorrectRouteEntryStatus | Some route entry status blocked this operation. | |
| 400 | DependencyViolation.HaVip | VSwitch cannot be deleted when there are some HaVip dependent with it. | The vSwitch is associated with an HAVIP and the vSwitch cannot be deleted. |
| 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. | The system is unavailable. Try again later. |
| 400 | DependencyViolation.SNAT | The vswitch cannot be deleted when used by snat. | You cannot delete a vSwitch when SNAT is used. |
| 400 | DeleteVSwitch.IncorrectStatus.cbnStatus | Current CBN status does not support this operation. | You cannot delete the vSwitch when the CEN instance is in the current state. |
| 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. | You cannot delete the vSwitch because a network ACL exists in the vSwitch. |
| 400 | DependencyViolation.EnhancedNatgw | VSwitch cannot be deleted when natgw exist. | You cannot delete the vSwitch because a NAT gateway exists in the vSwitch. |
| 400 | DependencyViolation.ResourceShare | VSwitch cannot be deleted when resource share exist. | |
| 400 | OperationFailed.SystemBusy | Operation failed because system is busy. | The error message returned because the system is busy. Try again later. |
| 400 | DependencyViolation.MulticastDomain | VSwitch cannot be deleted when associated with multicast domain. | The vSwitch is added to a multicast domain and cannot be deleted. |
| 400 | DependencyViolation.VSwitchCidrReservation | VSwitch cannot be deleted when vswitch cidr reservation exist. | The error message returned because a CIDR block is reserved for the vSwitch and the vSwitch cannot be deleted. |
| 400 | DependencyViolation.CloudService | VSwitch cannot be deleted when uesd by cloud service. | The error message returned because the vSwitch is being used by a cloud service and cannot be deleted. Check the use scenario of the cloud service. |
| 400 | InvalidVSwitchId.NotFound | VSwitch not exist. | |
| 400 | OperationFailed.Ipv6InstanceExist | Operation failed because vswitch has ipv6 instance. | IPv6 instances exist in the vSwitch. |
| 400 | DependencyViolation.Ipv6Address | The specified resource of %s depends on %s, so the operation cannot be completed. | The specified resource is dependent on other resources and the current operation is not allowed. |
| 400 | DependencyViolation.%s | The specified resource of [%s] depends on [%s], so the operation cannot be completed. | 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. | The error message returned because the region is not supported. |
| 400 | IncorrectStatus | Vswtich status not stable. | |
| 400 | DependencyViolation.RouterInterface | Specified object has dependent resources RouterInterface. | |
| 400 | InvalidRegionId.NotFound | The specified region is not found. | The specified region does not exist. |
| 400 | DependencyViolation.NATGW | Nat gateway exists in the VSwitch, so the VSwitch cannot be deleted. | Nat gateway exists in the VSwitch, so the VSwitch cannot be deleted. |
| 404 | IncorrectVSwitchId | Specified vSwtich instance is not found during access authentication. | The vSwitch is not found during the permission verification progress. |
| 404 | InvalidVSwitchId.NotFound | VSwitch not exist. |
Consulte Códigos de error para ver la lista completa.
Notas de la versión
Consulte Notas de la versión para ver la lista completa.