Class: Google::Apis::RunV2::GoogleCloudRunV2TaskTemplate

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/run_v2/classes.rb,
lib/google/apis/run_v2/representations.rb,
lib/google/apis/run_v2/representations.rb

Overview

TaskTemplate describes the data a task should have when created from a template.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2TaskTemplate

Returns a new instance of GoogleCloudRunV2TaskTemplate.



2541
2542
2543
# File 'lib/google/apis/run_v2/classes.rb', line 2541

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

Instance Attribute Details

#containersArray<Google::Apis::RunV2::GoogleCloudRunV2Container>

Holds the single container that defines the unit of execution for this task. Corresponds to the JSON property containers



2494
2495
2496
# File 'lib/google/apis/run_v2/classes.rb', line 2494

def containers
  @containers
end

#encryption_keyString

A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/ securing/using-cmek Corresponds to the JSON property encryptionKey

Returns:

  • (String)


2501
2502
2503
# File 'lib/google/apis/run_v2/classes.rb', line 2501

def encryption_key
  @encryption_key
end

#execution_environmentString

The execution environment being used to host this Task. Corresponds to the JSON property executionEnvironment

Returns:

  • (String)


2506
2507
2508
# File 'lib/google/apis/run_v2/classes.rb', line 2506

def execution_environment
  @execution_environment
end

#max_retriesFixnum

Number of retries allowed per Task, before marking this Task failed. Defaults to 3. Corresponds to the JSON property maxRetries

Returns:

  • (Fixnum)


2512
2513
2514
# File 'lib/google/apis/run_v2/classes.rb', line 2512

def max_retries
  @max_retries
end

#service_accountString

Email address of the IAM service account associated with the Task of a Job. 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 serviceAccount

Returns:

  • (String)


2520
2521
2522
# File 'lib/google/apis/run_v2/classes.rb', line 2520

def 
  
end

#timeoutString

Max allowed time duration 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 timeout

Returns:

  • (String)


2528
2529
2530
# File 'lib/google/apis/run_v2/classes.rb', line 2528

def timeout
  @timeout
end

#volumesArray<Google::Apis::RunV2::GoogleCloudRunV2Volume>

A list of Volumes to make available to containers. Corresponds to the JSON property volumes



2533
2534
2535
# File 'lib/google/apis/run_v2/classes.rb', line 2533

def volumes
  @volumes
end

#vpc_accessGoogle::Apis::RunV2::GoogleCloudRunV2VpcAccess

VPC Access settings. For more information on sending traffic to a VPC network, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. Corresponds to the JSON property vpcAccess



2539
2540
2541
# File 'lib/google/apis/run_v2/classes.rb', line 2539

def vpc_access
  @vpc_access
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
# File 'lib/google/apis/run_v2/classes.rb', line 2546

def update!(**args)
  @containers = args[:containers] if args.key?(:containers)
  @encryption_key = args[:encryption_key] if args.key?(:encryption_key)
  @execution_environment = args[:execution_environment] if args.key?(:execution_environment)
  @max_retries = args[:max_retries] if args.key?(:max_retries)
   = args[:service_account] if args.key?(:service_account)
  @timeout = args[:timeout] if args.key?(:timeout)
  @volumes = args[:volumes] if args.key?(:volumes)
  @vpc_access = args[:vpc_access] if args.key?(:vpc_access)
end