[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-04。"],[[["\u003cp\u003eThis documentation describes how to create a variable within a given configuration using a \u003ccode\u003ePOST\u003c/code\u003e request to the specified URL.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eparent\u003c/code\u003e path parameter, which is the path to the RuntimeConfig resource in the format \u003ccode\u003eprojects/[PROJECT_ID]/configs/[CONFIG_NAME]\u003c/code\u003e, and the \u003ccode\u003eruntimeconfig.variables.create\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eAn optional but recommended \u003ccode\u003erequestId\u003c/code\u003e query parameter can be used to ensure request idempotency, with a limit of 64 characters.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include an instance of the \u003ccode\u003eVariable\u003c/code\u003e resource, and a successful response will return the newly created \u003ccode\u003eVariable\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eOne of the specified OAuth scopes, \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloudruntimeconfig\u003c/code\u003e, is required for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: projects.configs.variables.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates 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.\n\nTo learn more about creating a variable, read the [Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables) documentation.\n\n### HTTP request\n\n`POST https://runtimeconfig.googleapis.com/v1beta1/{parent=projects/*/configs/*}/variables`\n\nThe URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Variable](/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables#Variable).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Variable](/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables#Variable).\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `https://www.googleapis.com/auth/cloudruntimeconfig`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\nTry it!\n-------"]]