Class: Google::Apis::BatchV1::AgentTaskSpec
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::AgentTaskSpec
- 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
-
#environment ⇒ Google::Apis::BatchV1::AgentEnvironment
AgentEnvironment is the Environment representation between Agent and CLH communication.
-
#max_run_duration ⇒ String
Maximum duration the task should run.
-
#runnables ⇒ Array<Google::Apis::BatchV1::AgentTaskRunnable>
AgentTaskRunnable is runanbles that will be executed on the agent.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AgentTaskSpec
constructor
A new instance of AgentTaskSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AgentTaskSpec
Returns a new instance of AgentTaskSpec.
513 514 515 |
# File 'lib/google/apis/batch_v1/classes.rb', line 513 def initialize(**args) update!(**args) end |
Instance Attribute Details
#environment ⇒ Google::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
500 501 502 |
# File 'lib/google/apis/batch_v1/classes.rb', line 500 def environment @environment end |
#max_run_duration ⇒ String
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
506 507 508 |
# File 'lib/google/apis/batch_v1/classes.rb', line 506 def max_run_duration @max_run_duration end |
#runnables ⇒ Array<Google::Apis::BatchV1::AgentTaskRunnable>
AgentTaskRunnable is runanbles that will be executed on the agent.
Corresponds to the JSON property runnables
511 512 513 |
# File 'lib/google/apis/batch_v1/classes.rb', line 511 def runnables @runnables end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
518 519 520 521 522 |
# File 'lib/google/apis/batch_v1/classes.rb', line 518 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) end |