Observa uma variável específica e aguarda uma alteração no valor dela. Quando há uma alteração, este método retorna o novo valor ou esgota o tempo limite.
Se uma variável for excluída durante a observação, o estado variableState será definido como DELETED, e o método vai retornar a última variável conhecida value.
Se você definir o prazo de observação para um valor maior que o tempo limite interno (60 segundos), o valor atual da variável será retornado e o variableState será VARIABLE_STATE_UNSPECIFIED.
Se especificado, verifica o carimbo de data/hora atual da variável. Se o carimbo de data/hora atual for mais recente do que o newerThan, o método será retornado imediatamente.
Se não for especificado ou se a variável tiver um timestamp mais antigo, o inspetor aguardará uma alteração no valor antes de ser retornado.
Um carimbo de data/hora no formato UTC “Zulu” RFC3339, medido com precisão de nanossegundos. Exemplo: "2014-10-02T15:01:23.045123456Z".
Corpo da resposta
Se a solicitação for bem-sucedida, o corpo da resposta conterá uma instância de Variable.
[[["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-03-04 UTC."],[[["\u003cp\u003eThis method watches a specified variable for changes, returning the new value upon change or timing out.\u003c/p\u003e\n"],["\u003cp\u003eIf the watched variable is deleted, the method will return the last known value, and the \u003ccode\u003evariableState\u003c/code\u003e will be set to \u003ccode\u003eDELETED\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a \u003ccode\u003ePOST\u003c/code\u003e to a specific URL, which includes the variable's name in the format: \u003ccode\u003eprojects/[PROJECT_ID]/configs/[CONFIG_NAME]\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can contain a \u003ccode\u003enewerThan\u003c/code\u003e field, which is a timestamp used to immediately check if the current variable timestamp is newer than the provided timestamp.\u003c/p\u003e\n"],["\u003cp\u003eThe method requires authorization with either the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloudruntimeconfig\u003c/code\u003e OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.configs.variables.watch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nWatches a specific variable and waits for a change in the variable's value. When there is a change, this method returns the new value or times out.\n\nIf a variable is deleted while being watched, the `variableState` state is set to `DELETED` and the method returns the last known variable `value`.\n\nIf you set the deadline for watching to a larger value than internal timeout (60 seconds), the current variable value is returned and the `variableState` will be `VARIABLE_STATE_UNSPECIFIED`.\n\nTo learn more about creating a watcher, read the [Watching a Variable for Changes](/deployment-manager/runtime-configurator/watching-a-variable) documentation.\n\n### HTTP request\n\n`POST https://runtimeconfig.googleapis.com/v1beta1/{name=projects/*/configs/*/variables/**}:watch`\n\nThe URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an 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-------"]]