Appelle l'opération DeleteVSwitch pour supprimer un vSwitch.
Description de l'opération
Avant d'appeler cette opération pour supprimer un vSwitch, prenez note des éléments suivants :
-
Avant de supprimer un vSwitch, libérez ou déplacez toutes les ressources du VPC, y compris les vSwitches, les instances de service cloud, les interfaces de routeur et les HaVips.
-
Seuls les vSwitches à l'état Available peuvent être supprimés.
-
Un vSwitch ne peut pas être supprimé si le VPC auquel il appartient est en train de créer ou de supprimer un vSwitch ou une route.
-
L'opération DeleteVSwitch est asynchrone. Après l'envoi d'une requête, le système renvoie un identifiant de requête, mais le vSwitch n'est pas encore supprimé. La tâche de suppression est toujours en cours d'exécution en arrière-plan. Vous pouvez appeler DescribeVSwitchAttributes pour interroger l'état de suppression du vSwitch :
Si le vSwitch est à l'état Pending, le vSwitch est en cours de suppression.
Si le vSwitch spécifié est introuvable, le vSwitch est supprimé.
-
L'opération DeleteVSwitch ne prend pas en charge la suppression simultanée du même vSwitch.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
vpc:DeleteVSwitch |
delete |
*VSwitch
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| VSwitchId |
string |
Oui |
L'identifiant du vSwitch à supprimer. |
vsw-asdfjlna**** |
| RegionId |
string |
Non |
L'identifiant de la région du vSwitch à supprimer. Vous pouvez appeler l'opération DescribeRegions pour obtenir la liste des régions la plus récente. |
cn-hangzhou |
| DryRun |
boolean |
Non |
Indique si un test à blanc doit être effectué. Valeurs valides :
|
false |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres de réponse. |
||
| RequestId |
string |
L'identifiant de la requête. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
Exemples
JSON format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 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. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.