Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
ID da região
O REGION_ID é um código abreviado que o Google atribui
com base na região que você selecionou ao criar o aplicativo. O código não
corresponde a um país ou estado, ainda que alguns IDs de região sejam semelhantes
aos códigos de país e estado geralmente usados. Para apps criados após
fevereiro de 2020, o REGION_ID.r está incluído nos
URLs do App Engine. Para apps existentes criados antes dessa data, o
ID da região é opcional no URL.
É possível usar vários métodos para a comunicação entre seus serviços do App Engine
ou com outros serviços, incluindo serviços Google Cloud e
aplicativos externos.
A abordagem mais simples para a comunicação com o serviço do App Engine é
enviar solicitações HTTP segmentadas, em que o URL inclui o nome ou o ID de um
recurso. Por exemplo, inclua o ID de um serviço ou versão que
quer segmentar, além do ID do projeto Google Cloud correspondente:
O comprimento combinado de
VERSION-dot-SERVICE-dot-PROJECT_ID, em que
VERSION é o nome da versão, SERVICE
é o nome do serviço e PROJECT_ID é o
ID do projeto, não pode ter mais de 63 caracteres nem
começar ou terminar com
um hífen. Se o comprimento combinado for
maior que 63 caracteres, talvez você veja o erro DNS address could not be
found. .
Os serviços do App Engine também podem se comunicar por meio do
Pub/Sub, que fornece mensagens de muitos para muitos confiáveis e assíncronas
entre processos, incluindo o App Engine. Esses
processos podem ser instâncias individuais de um aplicativo, de serviços ou até
de aplicativos externos.
É possível permitir que um serviço flexível do App Engine se comunique com outro serviço do App Engine no mesmo projeto sem precisar expor o serviço de destino à Internet pública.
Defina as configurações de entrada do serviço de destino para permitir apenas tráfego "interno".
Verifique se a versão do aplicativo de origem não está implantada em uma rede VPC compartilhada localizada em um projeto diferente.
Comunicação entre serviços em diferentes projetos
É possível ter acesso particular entre projetos Google Cloud quando os apps em execução
nos projetos pertencem a uma rede VPC compartilhada configurada para
invocar um app em execução no projeto host da rede VPC compartilhada.
[[["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-08-19 UTC."],[[["\u003cp\u003e\u003ccode\u003eREGION_ID\u003c/code\u003e is a Google-assigned code based on the selected region when creating an app, and it's included in App Engine URLs for apps created after February 2020, but optional for older apps.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine services can communicate through targeted HTTP requests using URLs that include the service, version, project ID, and \u003ccode\u003eREGION_ID\u003c/code\u003e, although the combined length of these components cannot exceed 63 characters.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine supports communication via Pub/Sub for asynchronous messaging between instances, services, or external applications.\u003c/p\u003e\n"],["\u003cp\u003ePrivate communication between App Engine services within the same project is possible by configuring the destination service's ingress settings to allow only internal traffic.\u003c/p\u003e\n"],["\u003cp\u003eApp engine has restrictions on reserved URL paths, like those ending in \u003ccode\u003e/eventlog\u003c/code\u003e, beginning with \u003ccode\u003e/_ah/\u003c/code\u003e, or some ending with \u003ccode\u003ez\u003c/code\u003e, are not allowed.\u003c/p\u003e\n"]]],[],null,["# Communicating between your services\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### Region ID\n\nThe \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e is an abbreviated code that Google assigns\nbased on the region you select when you create your app. The code does not\ncorrespond to a country or province, even though some region IDs may appear\nsimilar to commonly used country and province codes. For apps created after\nFebruary 2020, \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e`.r` is included in\nApp Engine URLs. For existing apps created before this date, the\nregion ID is optional in the URL.\n\nLearn more\n[about region IDs](/appengine/docs/flexible/python/how-requests-are-routed#region-id). \nOK\n\nYou can use various methods to communicate between your App Engine\nservices or with other services, including Google Cloud services and\nexternal applications.\n\nThe simplest approach for communicating with your App Engine service is\nto send targeted HTTP requests, where the URL includes the name or ID of a\nresource. For example, you can include the ID of a service or version that you\nwant to target, in addition to the corresponding Google Cloud project ID: \n\n\n `https://`\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e`-dot-`\u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e`-dot-`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003e\u003ca href=\"#appengine-urls\" style=\"border-bottom: 1px dotted #999\" class=\"devsite-dialog-button\" data-modal-dialog-id=\"regional_url\" track-type=\"progressiveHelp\" track-name=\"modalHelp\" track-metadata-goal=\"regionalURL\"\u003eREGION_ID\u003c/a\u003e\u003c/var\u003e`.r.appspot.com`\n\nNote that the combined length of\n\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e`-dot-`\u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e`-dot-`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\u003cvar translate=\"no\"\u003e\u003ca href=\"#appengine-urls\" style=\"border-bottom: 1px dotted #999\" class=\"devsite-dialog-button\" data-modal-dialog-id=\"regional_url\" track-type=\"progressiveHelp\" track-name=\"modalHelp\" track-metadata-goal=\"regionalURL\"\u003e\u003c/a\u003e\u003c/var\u003e, where\n`VERSION` is the name of your version, `SERVICE\n` is the name of your service, and `PROJECT_ID` is your\nproject ID, cannot be longer than 63 characters and cannot start or end with\na hyphen. If the combined length is\nlonger than 63 characters, you might see Error `DNS address could not be\nfound. `\n\nLearn more about requests in App Engine:\n\n- [How requests are\n handled](/appengine/docs/flexible/how-requests-are-handled): Learn how your application receives requests and sends responses.\n- [How requests are routed](/appengine/docs/flexible/how-requests-are-routed): Learn how to target your services, including how to define HTTPS URLs.\n- Learn how to authorize the requests between your services and other Google Cloud services:\n - [Provide credentials for Application Default Credentials](/docs/authentication/provide-credentials-adc)\n - [Using user-managed service accounts](/appengine/docs/flexible/user-managed-service-accounts)\n\nYour App Engine services can also communicate using\n[Pub/Sub](/appengine/docs/flexible/writing-and-responding-to-pub-sub-messages), which provides reliable asynchronous\nmany-to-many messaging between processes, including App Engine. These\nprocesses can be individual instances of your application, services, or even\nexternal applications.\n\nTo share data across databases and your App Engine app or some other\nexternal application, see\n[Understanding Data and File Storage](/appengine/docs/flexible/storage-options).\n\nPrivate Communication\n---------------------\n\n### Communication between services in the same project\n\nYou can allow an App Engine flexible service to communicate with\nanother App Engine service in the same project without having to expose\nthe destination service to the public internet.\n\n1. Configure the destination service's\n [ingress settings](/appengine/docs/flexible/ingress-settings)\n to allow \"internal\" traffic only.\n\n2. Ensure the source app version is not deployed to a Shared VPC network\n located in a different project.\n\n### Communication between services in different projects\n\nYou can have private access between Google Cloud projects when apps running\nin projects belong to a Shared VPC network that is\nconfigured to invoke an app running in the Shared VPC network's host project.\n\nTo use this pattern, follow the previous steps for\n[communicating between services in the same project](#between-services).\n\nIn the flexible environment, [deploy](/appengine/docs/flexible/using-shared-vpc)\neach client version to the same Shared VPC network.\n\n\nOther methods of communication between projects using internal access are not\npossible in App Engine.\n\nReserved URL paths\n------------------\n\nIt is not possible to use the following URL paths:\n\n- Paths ending with `/eventlog`\n- Paths starting with `/_ah/`\n- Some paths ending with `z`"]]