Class: Google::Apis::BatchV1::Environment

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb

Overview

An Environment describes a collection of environment variables to set when executing Tasks.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Environment

Returns a new instance of Environment.



1053
1054
1055
# File 'lib/google/apis/batch_v1/classes.rb', line 1053

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#encrypted_variablesGoogle::Apis::BatchV1::KmsEnvMap

An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. Corresponds to the JSON property encryptedVariables



1040
1041
1042
# File 'lib/google/apis/batch_v1/classes.rb', line 1040

def encrypted_variables
  @encrypted_variables
end

#secret_variablesHash<String,String>

A map of environment variable names to Secret Manager secret names. The VM will access the named secrets to set the value of each environment variable. Corresponds to the JSON property secretVariables

Returns:

  • (Hash<String,String>)


1046
1047
1048
# File 'lib/google/apis/batch_v1/classes.rb', line 1046

def secret_variables
  @secret_variables
end

#variablesHash<String,String>

A map of environment variable names to values. Corresponds to the JSON property variables

Returns:

  • (Hash<String,String>)


1051
1052
1053
# File 'lib/google/apis/batch_v1/classes.rb', line 1051

def variables
  @variables
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1058
1059
1060
1061
1062
# File 'lib/google/apis/batch_v1/classes.rb', line 1058

def update!(**args)
  @encrypted_variables = args[:encrypted_variables] if args.key?(:encrypted_variables)
  @secret_variables = args[:secret_variables] if args.key?(:secret_variables)
  @variables = args[:variables] if args.key?(:variables)
end