POST https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/deleteNetworkInterface?networkInterfaceName=DYNAMIC_NIC_NAME
Remplacez les éléments suivants :
PROJECT_ID : ID du projet contenant l'instance
ZONE : zone dans laquelle se trouve l'instance.
INSTANCE_NAME : nom de l'instance à partir de laquelle supprimer l'interface réseau dynamique
DYNAMIC_NIC_NAME : nom de la carte d'interface réseau dynamique à supprimer, par exemple nic0.2
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/05 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/05 (UTC)."],[],[],null,["# Delete Dynamic NICs from an instance\n====================================\n\n|\n| **Preview\n| --- Dynamic NICs**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\nThis page describes how to delete a Dynamic Network Interface (NIC) from an existing virtual machine (VM) instance.\n\n\u003cbr /\u003e\n\nFor an overview of multi-NIC, see\n[Multiple network interfaces](/vpc/docs/multiple-interfaces-concepts).\n\nTo view an instance's existing network interfaces, see\n[View network interfaces for an instance](/compute/docs/instances/view-network-properties#view_network_interfaces_for_an_instance).\n\nDelete a Dynamic NIC\n--------------------\n\nDelete Dynamic NICs by using the following procedures. To prevent\na possible [error when deleting a Dynamic NIC by instance update](/vpc/docs/troubleshoot-multiple-interfaces#instance-update-dynamic-nic),\ndon't delete Dynamic NICs from individual instances by updating\ninstance properties.\n**Note:** You can't delete a Dynamic NIC by using the Google Cloud console. You must use the gcloud CLI or the API. \n\n### gcloud\n\nTo delete a Dynamic NIC from an existing instance, use the\n[`instances network-interfaces delete` command](/sdk/gcloud/reference/beta/compute/instances/network-interfaces/delete). \n\n```\ngcloud beta compute instances network-interfaces delete INSTANCE_NAME \\\n --zone=ZONE \\\n --network-interface=DYNAMIC_NIC_NAME\n\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the instance to create\n- \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: the zone of the instance\n- \u003cvar translate=\"no\"\u003eDYNAMIC_NIC_NAME\u003c/var\u003e: the name of the Dynamic NIC to delete, such as `nic0.2`\n\nTo delete Dynamic NICs from an a managed instance group (MIG), see[`instance-groups managed set-instance-template`](/sdk/gcloud/reference/beta/compute/instance-groups/managed/set-instance-template).\n\n### API\n\nTo delete a Dynamic NIC from an existing instance, use the\n[`instances.deleteNetworkInterface` method](/compute/docs/reference/rest/beta/instances/deleteNetworkInterface). \n\n```\nPOST https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/deleteNetworkInterface?networkInterfaceName=DYNAMIC_NIC_NAME\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project that contains the instance\n- \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: the zone that contains the instance\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the instance to delete the Dynamic NIC from\n- \u003cvar translate=\"no\"\u003eDYNAMIC_NIC_NAME\u003c/var\u003e: the name of the Dynamic NIC to delete, such as `nic0.2`\n\nTo delete Dynamic NICs from an a managed instance group (MIG), see [`instanceGroupManagers.setInstanceTemplate`](/compute/docs/reference/rest/v1/instanceGroupManagers/setInstanceTemplate)."]]