Class: Google::Cloud::Batch::V1::TaskSpec

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/batch/v1/task.rb

Overview

Spec of a task

Defined Under Namespace

Classes: EnvironmentsEntry

Instance Attribute Summary collapse

Instance Attribute Details

#compute_resource::Google::Cloud::Batch::V1::ComputeResource

Returns ComputeResource requirements.

Returns:



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 252

class TaskSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class EnvironmentsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#environment::Google::Cloud::Batch::V1::Environment

Returns Environment variables to set before running the Task.

Returns:



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 252

class TaskSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class EnvironmentsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#environments::Google::Protobuf::Map{::String => ::String}

Returns Environment variables to set before running the Task. You can set up to 100 environments.

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

    Environment variables to set before running the Task. You can set up to 100 environments.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 252

class TaskSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class EnvironmentsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#lifecycle_policies::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>

Returns Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will execute. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

Returns:

  • (::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>)

    Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will execute. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 252

class TaskSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class EnvironmentsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#max_retry_count::Integer

Returns Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].

Returns:

  • (::Integer)

    Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 252

class TaskSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class EnvironmentsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#max_run_duration::Google::Protobuf::Duration

Returns Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

Returns:



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 252

class TaskSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class EnvironmentsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#runnables::Array<::Google::Cloud::Batch::V1::Runnable>

Returns The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag.

Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

Returns:

  • (::Array<::Google::Cloud::Batch::V1::Runnable>)

    The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag.

    Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 252

class TaskSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class EnvironmentsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#volumes::Array<::Google::Cloud::Batch::V1::Volume>

Returns Volumes to mount before running Tasks using this TaskSpec.

Returns:



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 252

class TaskSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class EnvironmentsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end