# Method: projects.configs.variables.create

- [HTTP request](https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/create#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/create#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/create#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/create#body.request_body)
- [Response body](https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/create#body.response_body)
- [Authorization Scopes](https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/create#body.aspect)
- [Try it!](https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/create#try-it)

Creates a variable within the given configuration. You cannot create a variable with a name that is a prefix of an existing variable name, or a name that has an existing variable name as a prefix.

To learn more about creating a variable, read the [Setting and Getting Data](https://docs.cloud.google.com/deployment-manager/runtime-configurator/set-and-get-variables) documentation.

### HTTP request

`POST https://runtimeconfig.googleapis.com/v1beta1/{parent=projects/*/configs/*}/variables`

The URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` The path to the RutimeConfig resource that this variable should belong to. The configuration must exist beforehand; the path must be in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource `parent`: - `runtimeconfig.variables.create` <br /> |

### Query parameters

| Parameters ||
|---|---|
| `requestId` | `string` An optional but recommended unique `requestId`. If the server receives two `create()` requests with the same `requestId`, then the second request will be ignored and the first resource created and stored in the backend is returned. Empty `requestId` fields are ignored. It is responsibility of the client to ensure uniqueness of the `requestId` strings. `requestId` strings are limited to 64 characters. <br /> |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables#Variable`.

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables#Variable`.

### Authorization Scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/cloudruntimeconfig`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).

## Try it!