Il supporto di Cloud Deployment Manager terminerà il 31 dicembre 2025. Se al momento utilizzi Deployment Manager, esegui la migrazione a Infrastructure Manager o a una tecnologia di deployment alternativa entro il 31 dicembre 2025 per assicurarti che i tuoi servizi continuino senza interruzioni.
Creazione ed eliminazione delle risorse RuntimeConfig
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina spiega come creare una risorsa Config. Una risorsa Config
è un oggetto API che archivia le variabili come coppie chiave-valore. Prima di poter impostare e recuperare le variabili, devi disporre di una risorsa Config. Dopo aver creato una risorsa Config, puoi creare variabili arbitrarie che puoi utilizzare per archiviare i dati.
[PROJECT_ID] è l'ID progetto per questa richiesta.
[CONFIG_NAME] è il nome di questo RuntimeConfig.
[DESCRIPTION] è la descrizione di questa configurazione (facoltativo).
Per scoprire di più su questo metodo, consulta la documentazione relativa a
configs().create.
Eliminazione di una risorsa RuntimeConfig
L'eliminazione di una risorsa RuntimeConfig comporta l'eliminazione di tutte le risorse contenute in quella
risorsa, incluse tutte le variabili e tutti i waiter.
Deployment Manager
Elimina una risorsa RuntimeConfig che fa parte di un deployment utilizzando uno
dei seguenti metodi:
Aggiorna il deployment
per omettere la configurazione ed eseguirne nuovamente il deployment.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-03 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)."]]