Class: Google::Apis::BatchV1::AgentTaskSpec

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

AgentTaskSpec is the user's TaskSpec representation between Agent and CLH communication.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AgentTaskSpec

Returns a new instance of AgentTaskSpec.



565
566
567
# File 'lib/google/apis/batch_v1/classes.rb', line 565

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

Instance Attribute Details

#environmentGoogle::Apis::BatchV1::AgentEnvironment

AgentEnvironment is the Environment representation between Agent and CLH communication. The environment is used in both task level and agent level. Corresponds to the JSON property environment



535
536
537
# File 'lib/google/apis/batch_v1/classes.rb', line 535

def environment
  @environment
end

#logging_optionGoogle::Apis::BatchV1::AgentTaskLoggingOption

AgentTaskLoggingOption contains the options for the logging of the task. Corresponds to the JSON property loggingOption



540
541
542
# File 'lib/google/apis/batch_v1/classes.rb', line 540

def logging_option
  @logging_option
end

#max_run_durationString

Maximum duration the task should run before being automatically retried (if enabled) or automatically failed. Format the value of this field as a time limit in seconds followed by s—for example, 3600s for 1 hour. The field accepts any value between 0 and the maximum listed for the Duration field type at https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however, the actual maximum run time for a job will be limited to the maximum run time for a job listed at https://cloud.google.com/batch/quotas#max-job- duration. Corresponds to the JSON property maxRunDuration

Returns:

  • (String)


552
553
554
# File 'lib/google/apis/batch_v1/classes.rb', line 552

def max_run_duration
  @max_run_duration
end

#runnablesArray<Google::Apis::BatchV1::AgentTaskRunnable>

AgentTaskRunnable is runanbles that will be executed on the agent. Corresponds to the JSON property runnables



557
558
559
# File 'lib/google/apis/batch_v1/classes.rb', line 557

def runnables
  @runnables
end

#user_accountGoogle::Apis::BatchV1::AgentTaskUserAccount

AgentTaskUserAccount contains the information of a POSIX account on the guest os which is used to execute the runnables. Corresponds to the JSON property userAccount



563
564
565
# File 'lib/google/apis/batch_v1/classes.rb', line 563

def 
  @user_account
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



570
571
572
573
574
575
576
# File 'lib/google/apis/batch_v1/classes.rb', line 570

def update!(**args)
  @environment = args[:environment] if args.key?(:environment)
  @logging_option = args[:logging_option] if args.key?(:logging_option)
  @max_run_duration = args[:max_run_duration] if args.key?(:max_run_duration)
  @runnables = args[:runnables] if args.key?(:runnables)
  @user_account = args[:user_account] if args.key?(:user_account)
end