Neste tópico, explicamos como alterar o IP de uma instância do Apigee atualizando manualmente as VMs.
Visão geral
Quando uma instância da Apigee é excluída e depois criada, um endereço IP é gerado para a instância recém-criada. Por exemplo, determinados parâmetros de instância, como cidrRange e rede, são imutáveis. Por isso, se você quiser alterar esses parâmetros, será necessário excluir a instância e recriá-la com a configuração pretendida.
Na maioria dos casos, quando uma instância é recriada, o mesmo IP da instância é selecionado, mas o mesmo IP não é garantido. As VMs que direcionam o tráfego do balanceador de carga para o IP privado da Apigee ainda têm o endereço IP antigo. Assim, nos casos em que um novo IP de instância for gerado, você precisará atualizar manualmente as VMs com o novo IP.
Como alterar o IP da instância
Para atualizar as VMs com um novo IP de instância, siga estas etapas:
No console do Google Cloud , acesse a página Máquinas virtuais>Modelos de instância.
Clique no modelo de instância da Apigee (o modelo que você quer copiar e atualizar).
Clique em Criar semelhante.
No campo Nome, forneça um novo nome para o modelo. Por exemplo, é possível adicionar um sufixo como "v2" no final do nome original.
Em Opções avançadas, clique na guia Gerenciamento.
Role para baixo até a seção Metadados (opcional) e procure o par de chave-valor que contém a
chave ENDPOINT. Altere o valor do endpoint para corresponder ao novo IP da instância. Use seu
IP, não aquele mostrado na captura de tela:
Clique em Criar para criar o modelo.
No console Google Cloud , acesse a página Grupos de instâncias.
Na coluna Nome da lista, clique no nome do grupo de instâncias da Apigee que você quer modificar.
Clique em Editar para modificar o grupo de instâncias.
Em Modelo de instância, selecione o novo modelo de instância (aquele que você acabou de criar).
Clique em Save.
Na parte superior da página, clique em Atualização gradual.
Mantenha todos os padrões/pré-definidos como estão e clique em Atualizar.
As novas VMs demoram alguns minutos, e as VMs antigas são encerradas e removidas. Quando as novas VMs estiverem ativas, todo o tráfego da API será retomado normalmente.
[[["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-05 UTC."],[[["\u003cp\u003eThis content pertains to Apigee, excluding Apigee hybrid, and is specifically for organizations with VPC peering enabled.\u003c/p\u003e\n"],["\u003cp\u003eWhen an Apigee instance is deleted and recreated, a new IP address may be generated, requiring manual updating of the VMs.\u003c/p\u003e\n"],["\u003cp\u003eChanging certain immutable parameters of an Apigee instance, like \u003ccode\u003ecidrRange\u003c/code\u003e and networking, necessitates deleting and recreating the instance.\u003c/p\u003e\n"],["\u003cp\u003eTo update VMs with a new instance IP, create a new instance template, modify the \u003ccode\u003eENDPOINT\u003c/code\u003e metadata to reflect the new IP, and then apply this template to the instance group via a rolling update.\u003c/p\u003e\n"],["\u003cp\u003eAfter a rolling update is initiated, new VMs will take a few minutes to become operational, and old VMs will be shut down, resuming normal API traffic upon completion.\u003c/p\u003e\n"]]],[],null,["# Changing instance IPs\n\n*This page\napplies to **Apigee** , but not to **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n| **Important:** This topic only applies to organizations that were created with VPC peering enabled. See also [Apigee networking options](/apigee/docs/api-platform/get-started/networking-options).\n\n\nThis topic explains how to change the IP of an Apigee instance by manually updating the\nVMs.\n\nOverview\n--------\n\n\nWhen an Apigee instance is\n[deleted](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.instances/delete)\nand then [created](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.instances/create)\nagain, an IP address is generated for the newly created instance. For example, certain instance\nparameters, such as cidrRange and networking, are immutable. Therefore, if you want to change\nthese parameters, you must delete the instance and recreate it with the desired configuration.\n\n\nIn most cases, when you recreate an instance, the same instance IP is selected, but getting the\nsame IP is not guaranteed. The VMs that are routing traffic from the load balancer to\nApigee's private IP still have the old IP address; therefore, in cases where a new instance\nIP is generated, you have to manually update the VMs with the new IP.\n\nChanging the instance IP\n------------------------\n\n\nTo update the VMs with a new instance IP, follow these steps:\n\n1. In the Google Cloud console, go to the **Virtual Machines** \\\u003e **Instance templates** page.\n\n [Go to Instance templates](https://console.cloud.google.com/compute/instanceTemplates/list)\n2. Click on the Apigee instance template (the template that you want to copy and update).\n3. Click **Create Similar**.\n4. In the **Name** field, provide a new name for the template. For example, you might add a suffix like \"v2\" at the end of the original name.\n5. Under **Advanced options** , click the **Management** tab.\n6. Scroll down to the **Metadata (Optional)** section and look for the key value pair containing the **ENDPOINT** key. Change the value of the endpoint to match the new instance IP. Use your IP, not the one shown in the screenshot:\n\n7. Click **Create** to create the template.\n8. In the Google Cloud console, go to the **Instance groups** page.\n\n [Go to Instance groups](https://console.cloud.google.com/compute/instanceGroups/list)\n9. Under the **Name** column of the list, click the name of the Apigee instance group that you wish to modify.\n10. Click **Edit** to modify this instance group.\n11. Under **Instance template**, select the new instance template (the one you just created).\n12. Click **Save**.\n13. At the top of the page, click **Rolling update**.\n14. Leave all the defaults/presets as-is and click **Update**.\n15. It takes a few minutes for the new VMs to come up, and the old VMs will be shut down and removed. Once the new VMs are up, all API traffic will resume normally."]]