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 before being automatically retried (if enabled) or automatically failed.
-
#runnables ⇒ Array<Google::Apis::BatchV1::AgentTaskRunnable>
AgentTaskRunnable is runanbles that will be executed on the agent.
-
#user_account ⇒ Google::Apis::BatchV1::AgentTaskUserAccount
AgentTaskUserAccount contains the information of a POSIX account on the guest os which is used to execute the runnables.
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.
541 542 543 |
# File 'lib/google/apis/batch_v1/classes.rb', line 541 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
516 517 518 |
# File 'lib/google/apis/batch_v1/classes.rb', line 516 def environment @environment end |
#max_run_duration ⇒ String
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
528 529 530 |
# File 'lib/google/apis/batch_v1/classes.rb', line 528 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
533 534 535 |
# File 'lib/google/apis/batch_v1/classes.rb', line 533 def runnables @runnables end |
#user_account ⇒ Google::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
539 540 541 |
# File 'lib/google/apis/batch_v1/classes.rb', line 539 def user_account @user_account end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
546 547 548 549 550 551 |
# File 'lib/google/apis/batch_v1/classes.rb', line 546 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 |