Class: Google::Apis::RunV1::TaskSpec

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TaskSpec

Returns a new instance of TaskSpec.



3499
3500
3501
# File 'lib/google/apis/run_v1/classes.rb', line 3499

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

Instance Attribute Details

#containersArray<Google::Apis::RunV1::Container>

Optional. List of containers belonging to the task. We disallow a number of fields on this Container. Only a single container may be provided. Corresponds to the JSON property containers

Returns:



3471
3472
3473
# File 'lib/google/apis/run_v1/classes.rb', line 3471

def containers
  @containers
end

#max_retriesFixnum

Optional. Number of retries allowed per task, before marking this job failed. Corresponds to the JSON property maxRetries

Returns:

  • (Fixnum)


3476
3477
3478
# File 'lib/google/apis/run_v1/classes.rb', line 3476

def max_retries
  @max_retries
end

#service_account_nameString

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

Returns:

  • (String)


3484
3485
3486
# File 'lib/google/apis/run_v1/classes.rb', line 3484

def 
  @service_account_name
end

#timeout_secondsFixnum

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. Corresponds to the JSON property timeoutSeconds

Returns:

  • (Fixnum)


3491
3492
3493
# File 'lib/google/apis/run_v1/classes.rb', line 3491

def timeout_seconds
  @timeout_seconds
end

#volumesArray<Google::Apis::RunV1::Volume>

Optional. List of volumes that can be mounted by containers belonging to the task. More info: https://kubernetes.io/docs/concepts/storage/volumes Corresponds to the JSON property volumes

Returns:



3497
3498
3499
# File 'lib/google/apis/run_v1/classes.rb', line 3497

def volumes
  @volumes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3504
3505
3506
3507
3508
3509
3510
# File 'lib/google/apis/run_v1/classes.rb', line 3504

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