O Cloud Deployment Manager vai chegar ao fim do suporte em 31 de dezembro de 2025. Se você usa o Deployment Manager, migre para o Infrastructure Manager ou uma tecnologia de implantação alternativa até 31 de dezembro de 2025 para garantir que seus serviços continuem sem interrupções.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Neste documento, você verá uma visão geral do recurso Runtime Configurator e os principais conceitos relacionados a ele. Para saber como criar um recurso RuntimeConfig, leia Criação e exclusão de recursos RuntimeConfig.
O que é o Runtime Configurator?
O recurso Runtime Configurator permite definir e armazenar dados como uma hierarquia de pares de chave-valor no Google Cloud Platform. Você pode usar esses pares para:
configurar serviços dinamicamente;
comunicar estados de serviço;
enviar notificação de alterações de dados;
compartilhar informações entre várias camadas de serviços.
Por exemplo, imagine um cenário em que você tem um cluster de nodes que executam um procedimento de inicialização. Durante a inicialização, é possível configurar os nodes para relatar o status ao Runtime Configurator e, em seguida, definir outro aplicativo para consultar o Runtime Configurator e executar tarefas específicas com base no status dos nodes.
O Runtime Configurator também oferece os serviços Inspetor e Waiter.
O inspetor observa determinado par de chaves e é retornado quando há alteração no valor desse par. O encarregado aguarda uma condição final específica e retorna uma resposta quando essa condição é atingida.
Use o Runtime Configurator com a CLI gcloud ou como uma API independente.
Conceitos
Recurso Config
Esse recurso contém uma lista hierárquica de variáveis. Você pode criar configurações diferentes para diversas finalidades. Por exemplo, é possível separar configurações com base no ambiente (produção, desenvolvimento, teste), em diferentes camadas de aplicativos ou serviços (back end, front end) ou em entidades (uma configuração por usuário do aplicativo).
Variáveis
Tratam-se de pares de chave-valor que pertencem a um recurso RuntimeConfig.
As chaves de variável têm o seguinte formato:
É possível definir, receber e observar valores de variáveis para transmitir informações aos aplicativos, sinalizar o estado concluído, enviar notificação de alterações de dados etc. As variáveis são hierárquicas, portanto a chave de variável pode ter diversos níveis. Por exemplo, as chaves de variável de amostra podem ser:
Use o método watch() para observar uma variável e retornar quando a variável for alterada, o inspetor expirar ou o inspetor for excluído. Use a funcionalidade watch() para configurar dinamicamente seus aplicativos com base em alterações nos seus dados.
Encarregados
Se você criar um recurso Waiter para observar determinado prefixo de caminho, esse recurso será retornado quando o número de variáveis no prefixo atingir um valor específico. Ele está relacionado a uma condição de cardinalidade.
Por exemplo, se você definir uma condição para o caminho /foo e o número de caminhos for definido como 2, a seguinte configuração atenderá à condição:
/foo/variable1 = "value1"
/foo/variable2 = "value2"
/bar/variable3 = "value3" # Not /foo path
Um waiter tem a condição tanto de falha quanto de sucesso que você pode definir.
Depois que você cria um waiter, o serviço retorna um objeto de operação que você pesquisa para execução. A operação é concluída quando ocorre uma das seguintes situações:
A condição success é atendida.
A condição failure é atendida.
O encarregado esgotou o tempo limite especificado na solicitação inicial.
O uso do waiter é ideal em cenários de inicialização, nos quais você pode precisar pausar uma implantação até que determinado número de serviços esteja em execução.
[[["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\u003eRuntime Configurator allows you to define and store data as key-value pairs in Google Cloud Platform, enabling dynamic service configuration, communication of service states, and sharing of information across service tiers.\u003c/p\u003e\n"],["\u003cp\u003eThe Config resource contains a hierarchical list of variables, allowing for different configurations based on environments, service tiers, or entities, while Variables, formatted as key-value pairs, facilitate data communication, status updates, and change notifications.\u003c/p\u003e\n"],["\u003cp\u003eWatchers and Waiters are key services within Runtime Configurator, where Watchers monitor variables for changes and Waiters await specific conditions to be met, such as a certain number of variables under a prefix.\u003c/p\u003e\n"],["\u003cp\u003eRuntime Configurator can be used via the gcloud CLI or as a standalone API, offering flexibility in how you manage and interact with your configurations.\u003c/p\u003e\n"],["\u003cp\u003eThe Beta status of the service means it is subject to the Pre-GA Offerings Terms and has limited support, users should also consult the relevant documentation for details on its launch stage.\u003c/p\u003e\n"]]],[],null,["# Runtime Configurator Fundamentals\n\n| **Beta**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis document provides an overview of the Runtime Configurator feature and\ndescribes the key concepts related to Runtime Configurator. To learn\nhow to create a RuntimeConfig resource, read\n[Creating and Deleting RuntimeConfig Resources](/deployment-manager/runtime-configurator/create-and-delete-runtimeconfig-resources).\n\nWhat is Runtime Configurator?\n-----------------------------\n\nThe Runtime Configurator feature lets you define and store data as a hierarchy\nof key value pairs in Google Cloud Platform. You can use these key value pairs\nas a way to:\n\n- Dynamically configure services\n- Communicate service states\n- Send notification of changes to data\n- Share information between multiple tiers of services\n\nFor example, imagine a scenario where you have a cluster of nodes that run a\nstartup procedure. During startup, you can configure your nodes to report\ntheir status to the Runtime Configurator, and then have another application\nquery the Runtime Configurator and run specific tasks based on the status of the\nnodes.\n\nThe Runtime Configurator also offers a Watcher service and a Waiter service.\nThe Watcher service watches a specific key pair and returns when the value of\nthe key pair changes, while the Waiter service waits for a specific end\ncondition and returns a response once that end condition has been met.\n\nYou use Runtime Configurator through using the gcloud CLI, or as a\nstandalone API.\n\n\u003cbr /\u003e\n\nConcepts\n--------\n\n- **Config resource**\n\n A Config resource contains a hierarchical list of variables. You\n can create different configurations for different purposes. For example, you\n can separate configurations based on environment (prod, dev, test), based\n on different tiers of applications or services (back end, front end),\n or based on entities (one configuration per user of your\n application).\n- **Variables**\n\n Variables are key value pairs that belong to a RuntimeConfig resource.\n Variable keys have the following format: \n\n projects/[project_id]/configs/[CONFIG_ID]/variables/[VARIABLE_NAME]\n\n You can set, get, and watch variable values to communicate information to\n your applications, to signal a completed state, to send notification of data\n changes, and more. Variables are hierarchical, so your variable key could\n have several levels. For example, sample variable keys could be: \n\n webserver-1/users/name\n webserver-1/users/favorite_color\n\n- **Watchers**\n\n You can use the `watch()` method to watch a variable and return when the\n variable changes, the watcher times out, or the watcher is deleted. Use the\n `watch()` functionality to dynamically configure your applications based on\n changes in your data.\n- **Waiters**\n\n If you create a Waiter resource to watch a specific path prefix, the waiter\n returns once the number of variables under the prefix reaches a particular\n amount. This is referred to as a\n [Cardinality condition](/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.waiters#Cardinality).\n\n For example, if you set a condition for the path `/foo` and the number\n of paths is set to 2, the following setup would meet the condition:\n - `/foo/variable1 = \"value1\"`\n - `/foo/variable2 = \"value2\"`\n - `/bar/variable3 = \"value3\" # Not /foo path`\n\n A waiter has both a failure and success condition that you can set.\n\n After you create a Waiter, the service returns an operation object that you\n poll for completion. The operation is complete when the one of the\n following occurs:\n - The `success` condition is met.\n - The `failure` condition is met.\n - The Waiter reached the timeout deadline specified in the initial request.\n\n Using a waiter is ideal for startup scenarios, where you might need to pause\n a deployment until a certain number of services is running.\n\nWhat's next\n-----------\n\n- [Creating a RuntimeConfig resource](/deployment-manager/runtime-configurator/create-and-delete-runtimeconfig-resources).\n- [Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables).\n- [Watching a Specific Variable](/deployment-manager/runtime-configurator/watching-a-variable).\n- [Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter).\n- Refer to the [v1beta1 reference](/deployment-manager/runtime-configurator/reference/rest).\n- Refer to the [Quotas for Runtime Configurator](/deployment-manager/pricing-and-quotas#runtime_configurator)."]]