POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/networkEndpointGroups/NEG/listNetworkEndpoints
Ganti kode berikut:
PROJECT_ID: ID project NEG pemetaan port.
REGION: region NEG pemetaan port.
NEG: nama NEG pemetaan port.
Memperbarui endpoint jaringan
Jika perlu memperbarui pemetaan port atau VM yang terkait dengan endpoint jaringan, Anda dapat menghapus endpoint jaringan atau menghapus VM.
Saat Anda menghapus VM, Google Cloud akan menghapus semua endpoint jaringan yang
dikaitkan dengan VM.
Setelah endpoint jaringan dihapus,
tambahkan endpoint jaringan ke NEG pemetaan port yang berisi VM atau pemetaan port yang diperbarui.
Menghapus endpoint jaringan dari NEG pemetaan port
Anda dapat menghapus endpoint jaringan dari NEG pemetaan port tanpa perlu membuat ulang NEG.
Konsol
Di Google Cloud console, buka halaman Network Endpoint Groups.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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."]]