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.
Esta página explica como criar o recurso Config, que é um objeto de API que armazena variáveis como pares de chave-valor. Ele é necessário para definir e receber variáveis. Após criá-lo, será possível criar variáveis arbitrárias que podem ser usadas para armazenar dados.
[[["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\u003eThis document outlines the process of creating and deleting Config resources, which are API objects that store variables as key-value pairs, within the Runtime Configurator service.\u003c/p\u003e\n"],["\u003cp\u003eConfig resources must be created before variables can be set and retrieved, enabling users to store and manage data through arbitrary variables.\u003c/p\u003e\n"],["\u003cp\u003eConfig resources can be managed via Deployment Manager, the \u003ccode\u003egcloud\u003c/code\u003e command-line tool, or directly through the Runtime Configurator API using specific commands and requests, as shown in the examples.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a Config resource will remove all associated variables and waiters, and can be done through Deployment Manager, \u003ccode\u003egcloud\u003c/code\u003e, or the REST API.\u003c/p\u003e\n"],["\u003cp\u003eThis is a Beta product, meaning it is subject to "Pre-GA Offerings Terms", with limited support and features available on an "as is" basis.\u003c/p\u003e\n"]]],[],null,["# Creating and Deleting RuntimeConfig Resources\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 page explains how to create a Config resource. A Config\nresource is an API object that stores variables as key value pairs. You need a\nConfig resource before you can set and get variables. After creating a Config\nresource, you can create arbitrary variables that you can use to store data.\n\nTo learn more about configurations, variables, and the Runtime Configurator\nservice, see\n[Runtime Configurator Fundamentals](/deployment-manager/runtime-configurator).\n\nBefore you begin\n----------------\n\n- If you want to use the command-line examples in this guide, install the [\\`gcloud\\` command-line tool](/sdk).\n- If you want to use the API examples in this guide, set up [API access](/deployment-manager/docs/reference/latest).\n- Read [Runtime Configurator Fundamentals](/deployment-manager/runtime-configurator).\n- Enable the [Runtime Configurator API](https://console.cloud.google.com/apis/api/runtimeconfig.googleapis.com/overview).\n\nCreating a config\n-----------------\n\nYou can create a Config resource with Deployment Manager, the `gcloud`\ncommand-line tool, or directly using the Runtime Configurator API. \n\n### Deployment Manager\n\nTo create a config in Deployment Manager, specify the RuntimeConfig type: \n\n runtimeconfig.v1beta1.config\n\nIn the `properties` of the resource, provide the `name` and other optional\nproperties if desired: \n\n resources:\n - name: [CONFIG_NAME]\n type: runtimeconfig.v1beta1.config\n properties:\n config: [CONFIG_NAME]\n description: [DESCRIPTION]\n\nwhere:\n\n- `[CONFIG_NAME]` is the name for this config.\n- `[DESCRIPTION]` is the description of this config (optional).\n\n### gcloud\n\nWith the Google Cloud CLI, use the\n`gcloud beta runtime-config configs create` command: \n\n gcloud beta runtime-config configs create [CONFIG_NAME] --description [DESCRIPTION]\n\nwhere:\n\n- `[CONFIG_NAME]` is the name for this config.\n- `[DESCRIPTION]` is the description of this config (optional).\n\n`gcloud` returns a response like: \n\n```\nCreated [https://runtimeconfig.googleapis.com/v1beta1/projects/[PROJECT_ID]/configs/[CONFIG_NAME]].\n```\n\nFor a complete reference for this `gcloud` command, read the\n[`runtime-config configs create`](/sdk/gcloud/reference/beta/runtime-config/configs/create)\nreference documentation.\n\n### API\n\nIn the REST API, make a `POST` request to the following URI: \n\n https://runtimeconfig.googleapis.com/v1beta1/projects/[PROJECT_ID]/configs/\n\nwhere `[PROJECT_ID]` is the project ID for this request. The payload for\nthe request looks like this: \n\n {\n \"name\": \"projects/[PROJECT_ID]/configs/[CONFIG_NAME]\",\n \"description\": \"[DESCRIPTION]\"\n\n }\n\nwhere:\n\n- `[PROJECT_ID]` is the project ID for this request.\n- `[CONFIG_NAME]` is the name of this RuntimeConfig.\n- `[DESCRIPTION]` is the description of this config (optional).\n\n To learn more about this method, read the\n [`configs().create`](/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs/create)\n documentation.\n\nDeleting a RuntimeConfig resource\n---------------------------------\n\nDeleting a RuntimeConfig resource deletes all resources contained by that\nresource, including all variables and waiters. \n\n### Deployment Manager\n\nDelete a RuntimeConfig resource that is part of a deployment using one\nof the following methods:\n\n- [Update the deployment](/deployment-manager/docs/deployments/updating-deployments) to omit the config and redeploy the deployment.\n- [Delete the deployment and the resources it contains](/deployment-manager/docs/deployments/deleting-deployments).\n\n### gcloud\n\nWith the Google Cloud CLI, use the `gcloud beta runtime-config configs delete`\ncommand: \n\n gcloud beta runtime-config configs delete [CONFIG_NAME]\n\nwhere `[CONFIG_NAME]` is the name of the configuration object.\n\nThe gcloud CLI returns a response like: \n\n```\nDeleted [https://runtimeconfig.googleapis.com/v1beta1/projects/[PROJECT_ID]/configs/[CONFIG_NAME]].\n```\n\nFor the full `gcloud` reference, read the [`runtime-config configs delete`](/sdk/gcloud/reference/beta/runtime-config/configs/delete)\nreference documentation.\n\n### API\n\nIn the REST API, make a `DELETE` request to the following URI: \n\n https://runtimeconfig.googleapis.com/v1beta1/projects/[PROJECT_ID]/configs/[CONFIG_NAME]\n\nwhere:\n\n- `[PROJECT_ID]` is the project ID for this request.\n- `[CONFIG_NAME]` is the name of this configuration.\n\n To learn more about this method, read the\n [`configs().delete`](/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs/delete)\n documentation.\n\nWhat's next\n-----------\n\n- Next, create some variables and learn how to [set and get data](/deployment-manager/runtime-configurator/set-and-get-variables).\n- Learn how to set a [Watcher on a specific variable](/deployment-manager/runtime-configurator/watching-a-variable).\n- [Create a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter) that returns when a variable reaches a Cardinality condition.\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).\n- Learn about [Runtime Configurator](/deployment-manager/runtime-configurator)."]]