# Cloud Run V2 API - Class Google::Cloud::Run::V2::EnvVar (v0.29.0)

0.29.0 (latest) 0.28.1 0.27.0 0.26.0 0.25.0 0.24.1 0.23.0 0.22.1 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.1 0.15.0 0.14.0 0.13.2 0.12.0 0.11.0 0.10.1 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.1 0.2.0 0.1.0 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

    def name() -> ::String

**Returns**

- (::String) --- Required. Name of the environment variable. Must not exceed 32768 characters.

### #name=

    def name=(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

    def value() -> ::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=

    def value=(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.

### #value_source

    def value_source() -> ::Google::Cloud::Run::V2::EnvVarSource

**Returns**

- ([::Google::Cloud::Run::V2::EnvVarSource](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-EnvVarSource)) --- Source for the environment variable's value.


  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.

### #value_source=

    def value_source=(value) -> ::Google::Cloud::Run::V2::EnvVarSource

**Parameter**

- **value** ([::Google::Cloud::Run::V2::EnvVarSource](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-EnvVarSource)) --- Source for the environment variable's value.


  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.
**Returns**

- ([::Google::Cloud::Run::V2::EnvVarSource](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-EnvVarSource)) --- Source for the environment variable's value.


  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.