Class: Google::Apis::RunV1::TaskSpec
- Inherits:
-
Object
- Object
- Google::Apis::RunV1::TaskSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v1/classes.rb,
lib/google/apis/run_v1/representations.rb,
lib/google/apis/run_v1/representations.rb
Overview
TaskSpec is a description of a task.
Instance Attribute Summary collapse
-
#containers ⇒ Array<Google::Apis::RunV1::Container>
Optional.
-
#max_retries ⇒ Fixnum
Optional.
-
#node_selector ⇒ Hash<String,String>
Optional.
-
#service_account_name ⇒ String
Optional.
-
#timeout_seconds ⇒ Fixnum
Optional.
-
#volumes ⇒ Array<Google::Apis::RunV1::Volume>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TaskSpec
constructor
A new instance of TaskSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TaskSpec
Returns a new instance of TaskSpec.
6444 6445 6446 |
# File 'lib/google/apis/run_v1/classes.rb', line 6444 def initialize(**args) update!(**args) end |
Instance Attribute Details
#containers ⇒ Array<Google::Apis::RunV1::Container>
Optional. List of containers belonging to the task. We disallow a number of
fields on this Container.
Corresponds to the JSON property containers
6408 6409 6410 |
# File 'lib/google/apis/run_v1/classes.rb', line 6408 def containers @containers end |
#max_retries ⇒ Fixnum
Optional. Number of retries allowed per task, before marking this job failed.
Defaults to 3.
Corresponds to the JSON property maxRetries
6414 6415 6416 |
# File 'lib/google/apis/run_v1/classes.rb', line 6414 def max_retries @max_retries end |
#node_selector ⇒ Hash<String,String>
Optional. The Node Selector configuration. Map of selector key to a value
which matches a node.
Corresponds to the JSON property nodeSelector
6420 6421 6422 |
# File 'lib/google/apis/run_v1/classes.rb', line 6420 def node_selector @node_selector end |
#service_account_name ⇒ String
Optional. Email address of the IAM service account associated with the task of
a job execution. The service account represents the identity of the running
task, and determines what permissions the task has. If not provided, the task
will use the project's default service account.
Corresponds to the JSON property serviceAccountName
6428 6429 6430 |
# File 'lib/google/apis/run_v1/classes.rb', line 6428 def service_account_name @service_account_name end |
#timeout_seconds ⇒ Fixnum
Optional. Duration in seconds the task may be active before the system will
actively try to mark it failed and kill associated containers. This applies
per attempt of a task, meaning each retry can run for the full timeout.
Defaults to 600 seconds.
Corresponds to the JSON property timeoutSeconds
6436 6437 6438 |
# File 'lib/google/apis/run_v1/classes.rb', line 6436 def timeout_seconds @timeout_seconds end |
#volumes ⇒ Array<Google::Apis::RunV1::Volume>
Optional. List of volumes that can be mounted by containers belonging to the
task.
Corresponds to the JSON property volumes
6442 6443 6444 |
# File 'lib/google/apis/run_v1/classes.rb', line 6442 def volumes @volumes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6449 6450 6451 6452 6453 6454 6455 6456 |
# File 'lib/google/apis/run_v1/classes.rb', line 6449 def update!(**args) @containers = args[:containers] if args.key?(:containers) @max_retries = args[:max_retries] if args.key?(:max_retries) @node_selector = args[:node_selector] if args.key?(:node_selector) @service_account_name = args[:service_account_name] if args.key?(:service_account_name) @timeout_seconds = args[:timeout_seconds] if args.key?(:timeout_seconds) @volumes = args[:volumes] if args.key?(:volumes) end |