POST https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/regions/REGION/networkEndpointGroups/NEG/listNetworkEndpoints
Substitua:
PROJECT_ID: o ID do projeto do NEG de mapeamento
de porta.
REGION: a região do NEG de mapeamento da porta.
NEG: o nome do NEG de mapeamento da porta.
Atualizar um endpoint de rede
Se for necessário atualizar o mapeamento de porta ou a VM associada a um endpoint
de rede, será possível removê-lo ou
excluir a VM.
Quando você exclui uma VM, o Google Cloud exclui todos os endpoints de rede
associados a ela.
Depois que o endpoint da rede for excluído,
adicione um ao NEG de mapeamento de portas que contenha
o mapeamento de porta ou VM atualizada.
Remover um endpoint de rede de um NEG de mapeamento de portas
É possível remover endpoints de rede de um NEG de mapeamento de portas sem precisar
recriá-lo.
Console
No console do Google Cloud, acesse a página Grupos de endpoints da rede.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-03 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."]]