POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/networkEndpointGroups/NEG/listNetworkEndpoints
Sostituisci quanto segue:
PROJECT_ID: l'ID del progetto del NEG mappatura porte.
REGION: la regione del NEG mappatura porte.
NEG: il nome del NEG mappatura porte.
Aggiornare un endpoint di rete
Se devi aggiornare la mappatura delle porte o la VM associata a un endpoint di rete, puoi rimuovere l'endpoint di rete o eliminare la VM.
Quando elimini una VM, Google Cloud vengono eliminati tutti gli endpoint di rete associati alla VM.
Dopo aver eliminato l'endpoint di rete,
aggiungi un endpoint di rete al NEG di mappatura delle porte che contiene
la mappatura delle porte o la VM aggiornata.
Rimuovere un endpoint di rete da un NEG con mappatura delle porte
Puoi rimuovere gli endpoint di rete da un NEG con mappatura delle porte senza doverlo rielaborare.
Console
Nella Google Cloud console, vai alla pagina Gruppi di endpoint di rete.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-05 UTC."],[],[],null,["# Update port mapping services\n============================\n\nThis page describes how service producers can update\nPrivate Service Connect port mapping services.\n\nAdd a network endpoint\n----------------------\n\nYou can add network endpoints to a port mapping network endpoint group (NEG) without\nneeding to recreate the NEG.\n\nFor information about adding a network endpoint, see\n[Add networking endpoints to a port mapping NEG](/vpc/docs/create-port-mapping-service#add-endpoints).\n\nList network endpoints\n----------------------\n\nYou can list the network endpoints that are associated with a port mapping NEG. \n\n### Console\n\n1. In the Google Cloud console, go to the **Network Endpoint Groups** page.\n\n [Go to Network Endpoint Groups](https://console.cloud.google.com/compute/networkendpointgroups/list)\n2. Click the name of your port mapping NEG.\n\n### gcloud\n\nUse the [`network-endpoint-groups list-network-endpoints` command](/sdk/gcloud/reference/compute/network-endpoint-groups/list). \n\n```\ngcloud compute network-endpoint-groups list-network-endpoints NEG \\\n --region=REGION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eNEG\u003c/var\u003e: the name of the port mapping NEG.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the port mapping NEG.\n\n### API\n\nSend a `POST` request to the\n[`regionNetworkEndpointGroups.listNetworkEndpoints` method](/compute/docs/reference/rest/v1/regionNetworkEndpointGroups/listNetworkEndpoints). \n\n```\nPOST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/networkEndpointGroups/NEG/listNetworkEndpoints\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the port mapping NEG's project.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the port mapping NEG.\n- \u003cvar translate=\"no\"\u003eNEG\u003c/var\u003e: the name of the port mapping NEG.\n\nUpdate a network endpoint\n-------------------------\n\nIf you need to update the port mapping or VM that is associated with a network\nendpoint, you can remove the network endpoint or\n[delete the VM](/compute/docs/instances/deleting-instance#delete_an_instance).\nWhen you delete a VM, Google Cloud deletes all network endpoints that are\nassociated with the VM.\n\nAfter the network endpoint is deleted,\nadd a network endpoint to the port mapping NEG that contains\nthe updated port mapping or VM.\n\nRemove a network endpoint from a port mapping NEG\n-------------------------------------------------\n\nYou can remove network endpoints from a port mapping NEG without needing to\nrecreate the NEG. \n\n### Console\n\n1. In the Google Cloud console, go to the **Network Endpoint Groups** page.\n\n [Go to Network Endpoint Groups](https://console.cloud.google.com/compute/networkendpointgroups/list)\n2. Click the name of the port mapping NEG that you want to update.\n\n3. Select the network endpoint that you want to remove.\n\n4. Click **Remove endpoint**.\n\n### gcloud\n\nUse the [`network-endpoint-groups update` command](/sdk/gcloud/reference/compute/network-endpoint-groups/update). \n\n```\ngcloud compute network-endpoint-groups update NEG \\\n --region=REGION \\\n --remove-endpoint=instance=https://www.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eNEG\u003c/var\u003e: the name of the port mapping NEG.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the port mapping NEG.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the port mapping NEG's project.\n- \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: the zone of the VM that is associated with the network endpoint to remove.\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the instance that is associated with the network endpoint to remove.\n\n### API\n\nSend a `POST` request to the\n[`regionNetworkEndpointGroups.detachNetworkEndpoints` method](/compute/docs/reference/rest/v1/regionNetworkEndpointGroups/detachNetworkEndpoints). \n\n```\nPOST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/networkEndpointGroups/NEG/detachNetworkEndpoints\n{\n \"networkEndpoints\": [\n {\n \"instance\": \"projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME\"\n }\n ]\n}\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the port mapping NEG's project.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the port mapping NEG.\n- \u003cvar translate=\"no\"\u003eNEG\u003c/var\u003e: the name of the port mapping NEG.\n- \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: the zone of the VM that is associated with the network endpoint to remove.\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the instance that is associated with the network endpoint to remove."]]