Class: Google::Apis::RunV2::GoogleCloudRunV2TaskTemplate
- Inherits:
-
Object
- Object
- Google::Apis::RunV2::GoogleCloudRunV2TaskTemplate
- 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
-
#containers ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2Container>
Holds the single container that defines the unit of execution for this task.
-
#encryption_key ⇒ String
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image.
-
#execution_environment ⇒ String
Optional.
-
#gpu_zonal_redundancy_disabled ⇒ Boolean
(also: #gpu_zonal_redundancy_disabled?)
Optional.
-
#max_retries ⇒ Fixnum
Number of retries allowed per Task, before marking this Task failed.
-
#node_selector ⇒ Google::Apis::RunV2::GoogleCloudRunV2NodeSelector
Hardware constraints configuration.
-
#service_account ⇒ String
Optional.
-
#timeout ⇒ String
Optional.
-
#volumes ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2Volume>
Optional.
-
#vpc_access ⇒ Google::Apis::RunV2::GoogleCloudRunV2VpcAccess
VPC Access settings.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRunV2TaskTemplate
constructor
A new instance of GoogleCloudRunV2TaskTemplate.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRunV2TaskTemplate
Returns a new instance of GoogleCloudRunV2TaskTemplate.
3976 3977 3978 |
# File 'lib/google/apis/run_v2/classes.rb', line 3976 def initialize(**args) update!(**args) end |
Instance Attribute Details
#containers ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2Container>
Holds the single container that defines the unit of execution for this task.
Corresponds to the JSON property containers
3918 3919 3920 |
# File 'lib/google/apis/run_v2/classes.rb', line 3918 def containers @containers end |
#encryption_key ⇒ String
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
3925 3926 3927 |
# File 'lib/google/apis/run_v2/classes.rb', line 3925 def encryption_key @encryption_key end |
#execution_environment ⇒ String
Optional. The execution environment being used to host this Task.
Corresponds to the JSON property executionEnvironment
3930 3931 3932 |
# File 'lib/google/apis/run_v2/classes.rb', line 3930 def execution_environment @execution_environment end |
#gpu_zonal_redundancy_disabled ⇒ Boolean Also known as: gpu_zonal_redundancy_disabled?
Optional. True if GPU zonal redundancy is disabled on this task template.
Corresponds to the JSON property gpuZonalRedundancyDisabled
3935 3936 3937 |
# File 'lib/google/apis/run_v2/classes.rb', line 3935 def gpu_zonal_redundancy_disabled @gpu_zonal_redundancy_disabled end |
#max_retries ⇒ Fixnum
Number of retries allowed per Task, before marking this Task failed. Defaults
to 3.
Corresponds to the JSON property maxRetries
3942 3943 3944 |
# File 'lib/google/apis/run_v2/classes.rb', line 3942 def max_retries @max_retries end |
#node_selector ⇒ Google::Apis::RunV2::GoogleCloudRunV2NodeSelector
Hardware constraints configuration.
Corresponds to the JSON property nodeSelector
3947 3948 3949 |
# File 'lib/google/apis/run_v2/classes.rb', line 3947 def node_selector @node_selector end |
#service_account ⇒ String
Optional. 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
3955 3956 3957 |
# File 'lib/google/apis/run_v2/classes.rb', line 3955 def service_account @service_account end |
#timeout ⇒ String
Optional. 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
3963 3964 3965 |
# File 'lib/google/apis/run_v2/classes.rb', line 3963 def timeout @timeout end |
#volumes ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2Volume>
Optional. A list of Volumes to make available to containers.
Corresponds to the JSON property volumes
3968 3969 3970 |
# File 'lib/google/apis/run_v2/classes.rb', line 3968 def volumes @volumes end |
#vpc_access ⇒ Google::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
3974 3975 3976 |
# File 'lib/google/apis/run_v2/classes.rb', line 3974 def vpc_access @vpc_access end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 |
# File 'lib/google/apis/run_v2/classes.rb', line 3981 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) @gpu_zonal_redundancy_disabled = args[:gpu_zonal_redundancy_disabled] if args.key?(:gpu_zonal_redundancy_disabled) @max_retries = args[:max_retries] if args.key?(:max_retries) @node_selector = args[:node_selector] if args.key?(:node_selector) @service_account = 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 |