Reference documentation and code samples for the Cloud Run V2 API class Google::Cloud::Run::V2::EnvVar.
EnvVar represents an environment variable present in a Container.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#name
defname()->::String
Returns
(::String) — Required. Name of the environment variable. Must not exceed 32768
characters.
#name=
defname=(value)->::String
Parameter
value(::String) — Required. Name of the environment variable. Must not exceed 32768
characters.
Returns
(::String) — Required. Name of the environment variable. Must not exceed 32768
characters.
#value
defvalue()->::String
Returns
(::String) — Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
Note: The following fields are mutually exclusive:value,value_source. If a field in that set is populated, all other fields in the set will automatically be cleared.
#value=
defvalue=(value)->::String
Parameter
value(::String) — Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
Note: The following fields are mutually exclusive:value,value_source. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
Note: The following fields are mutually exclusive:value,value_source. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:value_source,value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:value_source,value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:value_source,value. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Run V2 API - Class Google::Cloud::Run::V2::EnvVar (v0.26.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.26.0 (latest)](/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-EnvVar)\n- [0.25.0](/ruby/docs/reference/google-cloud-run-v2/0.25.0/Google-Cloud-Run-V2-EnvVar)\n- [0.24.1](/ruby/docs/reference/google-cloud-run-v2/0.24.1/Google-Cloud-Run-V2-EnvVar)\n- [0.23.0](/ruby/docs/reference/google-cloud-run-v2/0.23.0/Google-Cloud-Run-V2-EnvVar)\n- [0.22.1](/ruby/docs/reference/google-cloud-run-v2/0.22.1/Google-Cloud-Run-V2-EnvVar)\n- [0.21.0](/ruby/docs/reference/google-cloud-run-v2/0.21.0/Google-Cloud-Run-V2-EnvVar)\n- [0.20.0](/ruby/docs/reference/google-cloud-run-v2/0.20.0/Google-Cloud-Run-V2-EnvVar)\n- [0.19.0](/ruby/docs/reference/google-cloud-run-v2/0.19.0/Google-Cloud-Run-V2-EnvVar)\n- [0.18.0](/ruby/docs/reference/google-cloud-run-v2/0.18.0/Google-Cloud-Run-V2-EnvVar)\n- [0.17.0](/ruby/docs/reference/google-cloud-run-v2/0.17.0/Google-Cloud-Run-V2-EnvVar)\n- [0.16.1](/ruby/docs/reference/google-cloud-run-v2/0.16.1/Google-Cloud-Run-V2-EnvVar)\n- [0.15.0](/ruby/docs/reference/google-cloud-run-v2/0.15.0/Google-Cloud-Run-V2-EnvVar)\n- [0.14.0](/ruby/docs/reference/google-cloud-run-v2/0.14.0/Google-Cloud-Run-V2-EnvVar)\n- [0.13.2](/ruby/docs/reference/google-cloud-run-v2/0.13.2/Google-Cloud-Run-V2-EnvVar)\n- [0.12.0](/ruby/docs/reference/google-cloud-run-v2/0.12.0/Google-Cloud-Run-V2-EnvVar)\n- [0.11.0](/ruby/docs/reference/google-cloud-run-v2/0.11.0/Google-Cloud-Run-V2-EnvVar)\n- [0.10.1](/ruby/docs/reference/google-cloud-run-v2/0.10.1/Google-Cloud-Run-V2-EnvVar)\n- [0.9.1](/ruby/docs/reference/google-cloud-run-v2/0.9.1/Google-Cloud-Run-V2-EnvVar)\n- [0.8.0](/ruby/docs/reference/google-cloud-run-v2/0.8.0/Google-Cloud-Run-V2-EnvVar)\n- [0.7.0](/ruby/docs/reference/google-cloud-run-v2/0.7.0/Google-Cloud-Run-V2-EnvVar)\n- [0.6.0](/ruby/docs/reference/google-cloud-run-v2/0.6.0/Google-Cloud-Run-V2-EnvVar)\n- [0.5.0](/ruby/docs/reference/google-cloud-run-v2/0.5.0/Google-Cloud-Run-V2-EnvVar)\n- [0.4.0](/ruby/docs/reference/google-cloud-run-v2/0.4.0/Google-Cloud-Run-V2-EnvVar)\n- [0.3.1](/ruby/docs/reference/google-cloud-run-v2/0.3.1/Google-Cloud-Run-V2-EnvVar)\n- [0.2.0](/ruby/docs/reference/google-cloud-run-v2/0.2.0/Google-Cloud-Run-V2-EnvVar)\n- [0.1.0](/ruby/docs/reference/google-cloud-run-v2/0.1.0/Google-Cloud-Run-V2-EnvVar) \nReference documentation and code samples for the Cloud Run V2 API class Google::Cloud::Run::V2::EnvVar.\n\nEnvVar represents an environment variable present in a Container. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. Name of the environment variable. Must not exceed 32768 characters.\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. Name of the environment variable. Must not exceed 32768 characters. \n**Returns**\n\n- (::String) --- Required. Name of the environment variable. Must not exceed 32768 characters.\n\n### #value\n\n def value() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Literal value of the environment variable. Defaults to \"\", and the maximum length is 32768 bytes. Variable references are not supported in Cloud Run.\n\n Note: The following fields are mutually exclusive: `value`, `value_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #value=\n\n def value=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Literal value of the environment variable. Defaults to \"\", and the maximum length is 32768 bytes. Variable references are not supported in Cloud Run.\n\n\nNote: The following fields are mutually exclusive: `value`, `value_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- Literal value of the environment variable. Defaults to \"\", and the maximum length is 32768 bytes. Variable references are not supported in Cloud Run.\n\n Note: The following fields are mutually exclusive: `value`, `value_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #value_source\n\n def value_source() -\u003e ::Google::Cloud::Run::V2::EnvVarSource\n\n**Returns**\n\n- ([::Google::Cloud::Run::V2::EnvVarSource](./Google-Cloud-Run-V2-EnvVarSource)) --- Source for the environment variable's value.\n\n\n Note: The following fields are mutually exclusive: `value_source`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #value_source=\n\n def value_source=(value) -\u003e ::Google::Cloud::Run::V2::EnvVarSource\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Run::V2::EnvVarSource](./Google-Cloud-Run-V2-EnvVarSource)) --- Source for the environment variable's value.\n\n\nNote: The following fields are mutually exclusive: `value_source`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::Run::V2::EnvVarSource](./Google-Cloud-Run-V2-EnvVarSource)) --- Source for the environment variable's value.\n\n\n Note: The following fields are mutually exclusive: `value_source`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]