This page explains how to delete variables. To learn more about variables and the Runtime Configurator service, Runtime Configurator Fundamentals .
To learn how to create a variable, see Setting and Getting Data .
Before you begin
- If you want to use the command-line examples in this guide, install the `gcloud` command-line tool .
- If you want to use the API examples in this guide, set up API access .
- Read Runtime Configurator Fundamentals .
- Read Creating and Deleting RuntimeConfig Resources .
- Read Setting and Getting Data .
Deleting a variable
You can delete a single variable or recursively delete all variables under a specific path.
Deployment Manager
Delete a variable that is part of a deployment using one of the following methods:
- Update the deployment to omit the variable and redeploy the deployment.
- Delete the deployment and the resources it contains .
gcloud
To delete a variable with the Google Cloud CLI, use the runtime-config configs variables delete
command:
gcloud
beta
runtime
-
config
configs
variables
unset
[
VARIABLE_KEY
]
--config-name [CONFIG_NAME]
where [VARIABLE_KEY]
is the key of the variable and [CONFIG_NAME]
is the
name of the config this variable belongs to.
If you want to recursively delete all variables under a certain path,
provide the --recursive
flag.
The gcloud CLI returns a response like:
Deleted [https://runtimeconfig.googleapis.com/v1beta1/projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_KEY].
API
In the REST API, make a DELETE
request to the following URI to delete
a new variable:
https
:
//
runtimeconfig
.
googleapis
.
com
/
v1beta1
/
projects
/[
PROJECT_ID
]/
configs
/[
CONFIG_NAME
]/
variables
/[
VARIABLE_KEY
]
where:
-
[PROJECT_ID]is the project ID for this request. -
[CONFIG_NAME]is the name for this configuration. -
[VARIABLE_KEY]is the variable to delete.If you want to recursively delete all variables under a specific pass, provide a payload with your request that has the
recursiveproperty set totrue:{ "recursive": true }
If successful, the API returns an empty response.
To learn more about the method, read the
variables().deletedocumentation.
What's next?
- Learn about Runtime Configurator .
- Setting and Getting Data .
- Watching a Specific Variable .
- Creating a Waiter .
- Refer to the v1beta1 reference .
- Refer to the Quotas for Runtime Configurator .

