Class: Google::Apis::RunV1alpha1::EnvVar
- Inherits:
-
Object
- Object
- Google::Apis::RunV1alpha1::EnvVar
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v1alpha1/classes.rb,
lib/google/apis/run_v1alpha1/representations.rb,
lib/google/apis/run_v1alpha1/representations.rb
Overview
EnvVar represents an environment variable present in a Container.
Instance Attribute Summary collapse
-
#name ⇒ String
Name of the environment variable.
-
#value ⇒ String
Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables.
-
#value_from ⇒ Google::Apis::RunV1alpha1::EnvVarSource
Cloud Run fully managed: not supported Cloud Run on GKE: supported EnvVarSource represents a source for the value of an EnvVar.
Instance Method Summary collapse
-
#initialize(**args) ⇒ EnvVar
constructor
A new instance of EnvVar.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ EnvVar
Returns a new instance of EnvVar.
1073 1074 1075 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1073 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
Name of the environment variable. Must be a C_IDENTIFIER.
Corresponds to the JSON property name
1055 1056 1057 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1055 def name @name end |
#value ⇒ String
Variable references $(VAR_NAME) are expanded using the previous defined
environment variables in the container and any route environment variables. If
a variable cannot be resolved, the reference in the input string will be
unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(
VAR_NAME). Escaped references will never be expanded, regardless of whether
the variable exists or not. Defaults to "". +optional
Corresponds to the JSON property value
1065 1066 1067 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1065 def value @value end |
#value_from ⇒ Google::Apis::RunV1alpha1::EnvVarSource
Cloud Run fully managed: not supported Cloud Run on GKE: supported
EnvVarSource represents a source for the value of an EnvVar.
Corresponds to the JSON property valueFrom
1071 1072 1073 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1071 def value_from @value_from end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1078 1079 1080 1081 1082 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1078 def update!(**args) @name = args[:name] if args.key?(:name) @value = args[:value] if args.key?(:value) @value_from = args[:value_from] if args.key?(:value_from) end |