POST https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/regions/REGION/networkEndpointGroups/NEG/listNetworkEndpoints
Ersetzen Sie Folgendes:
PROJECT_ID: die ID des Projekts der NEG für die Portzuordnung.
REGION: die Region der NEG für die Portzuordnung.
NEG: der Name der NEG für die Portzuordnung.
Netzwerkendpunkt aktualisieren
Wenn Sie die Portzuordnung oder VM aktualisieren möchten, die mit einem Netzwerkendpunkt verknüpft ist, können Sie den Netzwerkendpunkt entfernen oder die VM löschen.
Wenn Sie eine VM löschen, werden in Google Cloud alle mit der VM verknüpften Netzwerkendpunkte gelöscht.
Nachdem der Netzwerkendpunkt gelöscht wurde, fügen Sie der NEG für die Portzuordnung einen Netzwerkendpunkt hinzu, der die aktualisierte Portzuordnung oder VM enthält.
Netzwerkendpunkt aus einer NEG für die Portzuordnung entfernen
Sie können Netzwerkendpunkte aus einer NEG für die Portzuordnung entfernen, ohne die NEG neu erstellen zu müssen.
Console
Rufen Sie in der Google Cloud Console die Seite Netzwerk-Endpunktgruppen auf.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-28 (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."]]