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.



529
530
531
# File 'lib/google/apis/batch_v1/classes.rb', line 529

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



510
511
512
# File 'lib/google/apis/batch_v1/classes.rb', line 510

def environment
  @environment
end

#max_run_durationString

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. Corresponds to the JSON property maxRunDuration

Returns:

  • (String)


516
517
518
# File 'lib/google/apis/batch_v1/classes.rb', line 516

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



521
522
523
# File 'lib/google/apis/batch_v1/classes.rb', line 521

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



527
528
529
# File 'lib/google/apis/batch_v1/classes.rb', line 527

def 
  @user_account
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

def update!(**args)
  @environment = args[:environment] if args.key?(:environment)
  @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