Na Apigee híbrida, a tarefa principal do Synchronizer é pesquisar e fazer o download dos contratos de ambiente de execução
fornecidos pelo plano de gerenciamento. As informações comunicadas por contrato incluem proxies de API
produtos de API, caches e hosts virtuais. O sincronizador por padrão armazena dados de configuração do ambiente no banco de dados do Cassandra.
Espera-se que as instâncias do Synchronizer em execução no plano de ambiente de execução pesquise
o plano de gerenciamento regularmente, faça o download dos contratos e disponibilize o mesmo para instâncias de ambiente de execução
local.
Um Synchronizer pode aceitar vários processadores de mensagens implantados no mesmo pod.
Ativar acesso do Synchronizer
É preciso conceder ao Synchronizer permissão para extrair
artefatos da Apigee, como recursos e pacotes de proxy do plano de gerenciamento. Você precisa chamar uma
API Apigee para autorizar o sincronizador a extrair artefatos do plano de gerenciamento para o plano de
ambiente de execução.
Verifique se você ativou a API Apigee conforme explicado nas etapas de configuração do Google Cloud.
Para ver detalhes, consulte Ativar APIs.
Localize a chave da conta de serviço do Google Cloud ativada para gravação (um arquivo JSON) de que fez o download como parte de Criar contas de serviço e credenciais. A conta de serviço tem o papel Administrador da organização Apigee
e é denominada "apigee-org-admin". Se você não criou essa conta de serviço
anteriormente, faça isso antes de continuar.
Defina a variável de ambiente GOOGLE_APPLICATION_CREDENTIALS para o caminho onde a
chave da conta de serviço está localizada:
synchronizer-manager-service-account-name: o nome de uma conta de serviço
com o papel Gerenciador de Synchronizer da Apigee. O nome tem o formato de endereço
de e-mail. Por exemplo:
my-synchronizer-manager-service_account@my_project_id.iam.gserviceaccount.com
[[["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-28 UTC."],[[["\u003cp\u003eThe current documentation version (1.8) is end-of-life and should be upgraded to a newer version.\u003c/p\u003e\n"],["\u003cp\u003eThe Synchronizer polls the management plane to download runtime contracts, including API proxies, API products, caches, and virtual hosts, and stores environment configuration data in the Cassandra database.\u003c/p\u003e\n"],["\u003cp\u003eSynchronizers need permission to pull Apigee artifacts from the management plane, requiring a call to the \u003ccode\u003esetSyncAuthorization\u003c/code\u003e API.\u003c/p\u003e\n"],["\u003cp\u003eEnabling Synchronizer access requires a write-enabled Google Cloud service account with the Apigee Org Admin role and setting the \u003ccode\u003eGOOGLE_APPLICATION_CREDENTIALS\u003c/code\u003e environment variable.\u003c/p\u003e\n"],["\u003cp\u003eYou can verify the Synchronizer service account setup by using the getSyncAuthorization API which will return a list of service accounts.\u003c/p\u003e\n"]]],[],null,["# Configure the Synchronizer\n\n| You are currently viewing version 1.8 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nThis section describes the Synchronizer.\n\nSynchronizer overview\n---------------------\n\nIn Apigee hybrid, the Synchronizer's primary job is to poll and download the runtime contracts\nwhich are supplied by the management plane. Information communicated by contract includes API\nproxies, API products, caches, and virtual hosts. Synchronizer by default stores environment\nconfiguration data in the Cassandra database.\n\nSynchronizer instances running in the runtime-plane are expected to poll the management\nplane on a regular basis, download the contracts and make the same available to local runtime\ninstances.\n\nOne Synchronizer can support many Message Processors deployed in the same pod.\n\nEnable Synchronizer access\n--------------------------\n\nYou must grant the [Synchronizer](/apigee/docs/hybrid/v1.8/what-is-hybrid#synchronizer) permission to pull down\nApigee artifacts, such as proxy bundles and resources from the management plane. You must call an\nApigee API to authorize the Synchronizer to pull artifacts down from the management plane to the\nruntime plane.\n\n1. Ensure that you have enabled the Apigee API as explained in the Google Cloud setup steps. For details, see [Enable APIs](./precog-enableapi).\n2. Locate the **write-enabled Google Cloud service account key** (a JSON file) that you downloaded as part of [Create service accounts and credentials](./install-service-accounts). The service account has the **Apigee Org Admin** role and is the one named \"apigee-org-admin\". If you did not previously create this service account, you must do so before continuing.\n3. Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path where the\n service account key is located:\n\n export GOOGLE_APPLICATION_CREDENTIALS=\u003cvar translate=\"no\"\u003eyour_sa_credentials_file\u003c/var\u003e.json\n\n 4. Call the [setSyncAuthorization](/apigee/docs/reference/apis/apigee/rest/v1/organizations/setSyncAuthorization) API to enable the required permissions for Synchronizer: **IMPORTANT:** Be sure that the service account name that you add to this API has the role **Apigee Synchronizer Manager** . See also [Create service accounts and credentials](./install-service-accounts). \n\n ```\n curl -X POST -H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n -H \"Content-Type:application/json\" \\\n \"https://apigee.googleapis.com/v1/organizations/your_org_name:setSyncAuthorization\" \\\n -d '{\"identities\":[\"serviceAccount:synchronizer-manager-service-account-name\"]}'\n ```\n\n Where:\n - `your_org_name`: The name of the hybrid organization.\n - `synchronizer-manager-service-account-name`: The name of a service account with the **Apigee Synchronizer Manager** role. The name is formed like an email address. For example: `my-synchronizer-manager-service_account@my_project_id.iam.gserviceaccount.com`\n\n Example: \n\n ```\n curl -X POST -H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n -H \"Content-Type:application/json\" \\\n \"https://apigee.googleapis.com/v1/organizations/my_org:setSyncAuthorization\" \\\n -d '{\"identities\":[\"serviceAccount:my-synchronizer-manager-service_account@my_project_id.iam.gserviceaccount.com\"]}'\n ```\n\n For more information on this API, see [setSyncAuthorization API](/apigee/docs/reference/apis/apigee/rest/v1/organizations/setSyncAuthorization).\n5. To verify that the service account was set, call the following API to get a list of service accounts: \n\n ```\n curl -X POST -H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n -H \"Content-Type:application/json\" \\\n \"https://apigee.googleapis.com/v1/organizations/your_org_name:getSyncAuthorization\" \\\n -d ''\n ```\n\n The output looks similar to the following: \n\n ```transact-sql\n {\n \"identities\":[\n \"serviceAccount:my-synchronizer-manager-service_account@my_project_id.iam.gserviceaccount.com\"\n ],\n \"etag\":\"BwWJgyS8I4w=\"\n }\n ```"]]