Class: Google::Apis::RunV2::GoogleCloudRunV2Task

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

Task represents a single run of a container to completion.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2Task

Returns a new instance of GoogleCloudRunV2Task.



1826
1827
1828
# File 'lib/google/apis/run_v2/classes.rb', line 1826

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

Instance Attribute Details

#annotationsHash<String,String>

KRM-style annotations for the resource. Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


1650
1651
1652
# File 'lib/google/apis/run_v2/classes.rb', line 1650

def annotations
  @annotations
end

#completion_timeString

Output only. Represents time when the Task was completed. It is not guaranteed to be set in happens-before order across separate operations. Corresponds to the JSON property completionTime

Returns:

  • (String)


1656
1657
1658
# File 'lib/google/apis/run_v2/classes.rb', line 1656

def completion_time
  @completion_time
end

#conditionsArray<Google::Apis::RunV2::GoogleCloudRunV2Condition>

Output only. The Condition of this Task, containing its readiness status, and detailed error information in case it did not reach the desired state. Corresponds to the JSON property conditions



1662
1663
1664
# File 'lib/google/apis/run_v2/classes.rb', line 1662

def conditions
  @conditions
end

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

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



1667
1668
1669
# File 'lib/google/apis/run_v2/classes.rb', line 1667

def containers
  @containers
end

#create_timeString

Output only. Represents time when the task was created by the job controller. It is not guaranteed to be set in happens-before order across separate operations. Corresponds to the JSON property createTime

Returns:

  • (String)


1674
1675
1676
# File 'lib/google/apis/run_v2/classes.rb', line 1674

def create_time
  @create_time
end

#delete_timeString

Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request. Corresponds to the JSON property deleteTime

Returns:

  • (String)


1680
1681
1682
# File 'lib/google/apis/run_v2/classes.rb', line 1680

def delete_time
  @delete_time
end

#encryption_keyString

Output only. 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)


1687
1688
1689
# File 'lib/google/apis/run_v2/classes.rb', line 1687

def encryption_key
  @encryption_key
end

#etagString

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. Corresponds to the JSON property etag

Returns:

  • (String)


1693
1694
1695
# File 'lib/google/apis/run_v2/classes.rb', line 1693

def etag
  @etag
end

#executionString

Output only. The name of the parent Execution. Corresponds to the JSON property execution

Returns:

  • (String)


1698
1699
1700
# File 'lib/google/apis/run_v2/classes.rb', line 1698

def execution
  @execution
end

#execution_environmentString

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

Returns:

  • (String)


1703
1704
1705
# File 'lib/google/apis/run_v2/classes.rb', line 1703

def execution_environment
  @execution_environment
end

#expire_timeString

Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request. Corresponds to the JSON property expireTime

Returns:

  • (String)


1709
1710
1711
# File 'lib/google/apis/run_v2/classes.rb', line 1709

def expire_time
  @expire_time
end

#generationFixnum

Output only. A number that monotonically increases every time the user modifies the desired state. Corresponds to the JSON property generation

Returns:

  • (Fixnum)


1715
1716
1717
# File 'lib/google/apis/run_v2/classes.rb', line 1715

def generation
  @generation
end

#indexFixnum

Output only. Index of the Task, unique per execution, and beginning at 0. Corresponds to the JSON property index

Returns:

  • (Fixnum)


1720
1721
1722
# File 'lib/google/apis/run_v2/classes.rb', line 1720

def index
  @index
end

#jobString

Output only. The name of the parent Job. Corresponds to the JSON property job

Returns:

  • (String)


1725
1726
1727
# File 'lib/google/apis/run_v2/classes.rb', line 1725

def job
  @job
end

#labelsHash<String,String>

KRM-style labels for the resource. User-provided labels are shared with Google' s billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https: //cloud.google.com/resource-manager/docs/creating-managing-labels or https:// cloud.google.com/run/docs/configuring/labels Cloud Run will populate some labels with 'run.googleapis.com' or 'serving.knative.dev' namespaces. Those labels are read-only, and user changes will not be preserved. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1736
1737
1738
# File 'lib/google/apis/run_v2/classes.rb', line 1736

def labels
  @labels
end

#last_attempt_resultGoogle::Apis::RunV2::GoogleCloudRunV2TaskAttemptResult

Result of a task attempt. Corresponds to the JSON property lastAttemptResult



1741
1742
1743
# File 'lib/google/apis/run_v2/classes.rb', line 1741

def last_attempt_result
  @last_attempt_result
end

#launch_stageString

Set the launch stage to a preview stage on write to allow use of preview features in that stage. On read, describes whether the resource uses preview features. Launch Stages are defined at Google Cloud Platform Launch Stages. Corresponds to the JSON property launchStage

Returns:

  • (String)


1749
1750
1751
# File 'lib/google/apis/run_v2/classes.rb', line 1749

def launch_stage
  @launch_stage
end

#max_retriesFixnum

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

Returns:

  • (Fixnum)


1754
1755
1756
# File 'lib/google/apis/run_v2/classes.rb', line 1754

def max_retries
  @max_retries
end

#nameString

Output only. The unique name of this Task. Corresponds to the JSON property name

Returns:

  • (String)


1759
1760
1761
# File 'lib/google/apis/run_v2/classes.rb', line 1759

def name
  @name
end

#observed_generationFixnum

Output only. The generation of this Task. See comments in Job.reconciling for additional information on reconciliation process in Cloud Run. Corresponds to the JSON property observedGeneration

Returns:

  • (Fixnum)


1765
1766
1767
# File 'lib/google/apis/run_v2/classes.rb', line 1765

def observed_generation
  @observed_generation
end

#reconcilingBoolean Also known as: reconciling?

Output only. Indicates whether the resource's reconciliation is still in progress. See comments in Job.reconciling for additional information on reconciliation process in Cloud Run. Corresponds to the JSON property reconciling

Returns:

  • (Boolean)


1772
1773
1774
# File 'lib/google/apis/run_v2/classes.rb', line 1772

def reconciling
  @reconciling
end

#retriedFixnum

Output only. The number of times this Task was retried. Tasks are retried when they fail up to the maxRetries limit. Corresponds to the JSON property retried

Returns:

  • (Fixnum)


1779
1780
1781
# File 'lib/google/apis/run_v2/classes.rb', line 1779

def retried
  @retried
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)


1787
1788
1789
# File 'lib/google/apis/run_v2/classes.rb', line 1787

def 
  @service_account
end

#start_timeString

Output only. Represents time when the task started to run. It is not guaranteed to be set in happens-before order across separate operations. Corresponds to the JSON property startTime

Returns:

  • (String)


1793
1794
1795
# File 'lib/google/apis/run_v2/classes.rb', line 1793

def start_time
  @start_time
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. Corresponds to the JSON property timeout

Returns:

  • (String)


1800
1801
1802
# File 'lib/google/apis/run_v2/classes.rb', line 1800

def timeout
  @timeout
end

#uidString

Output only. Server assigned unique identifier for the Task. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. Corresponds to the JSON property uid

Returns:

  • (String)


1806
1807
1808
# File 'lib/google/apis/run_v2/classes.rb', line 1806

def uid
  @uid
end

#update_timeString

Output only. The last-modified time. Corresponds to the JSON property updateTime

Returns:

  • (String)


1811
1812
1813
# File 'lib/google/apis/run_v2/classes.rb', line 1811

def update_time
  @update_time
end

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

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



1816
1817
1818
# File 'lib/google/apis/run_v2/classes.rb', line 1816

def volumes
  @volumes
end

#vpc_accessGoogle::Apis::RunV2::GoogleCloudRunV2VpcAccess

VPC Access settings. For more information on creating a VPC Connector, visit https://cloud.google.com/vpc/docs/configure-serverless-vpc-access For information on how to configure Cloud Run with an existing VPC Connector, visit https://cloud.google.com/run/docs/configuring/connecting-vpc Corresponds to the JSON property vpcAccess



1824
1825
1826
# File 'lib/google/apis/run_v2/classes.rb', line 1824

def vpc_access
  @vpc_access
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
# File 'lib/google/apis/run_v2/classes.rb', line 1831

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @completion_time = args[:completion_time] if args.key?(:completion_time)
  @conditions = args[:conditions] if args.key?(:conditions)
  @containers = args[:containers] if args.key?(:containers)
  @create_time = args[:create_time] if args.key?(:create_time)
  @delete_time = args[:delete_time] if args.key?(:delete_time)
  @encryption_key = args[:encryption_key] if args.key?(:encryption_key)
  @etag = args[:etag] if args.key?(:etag)
  @execution = args[:execution] if args.key?(:execution)
  @execution_environment = args[:execution_environment] if args.key?(:execution_environment)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @generation = args[:generation] if args.key?(:generation)
  @index = args[:index] if args.key?(:index)
  @job = args[:job] if args.key?(:job)
  @labels = args[:labels] if args.key?(:labels)
  @last_attempt_result = args[:last_attempt_result] if args.key?(:last_attempt_result)
  @launch_stage = args[:launch_stage] if args.key?(:launch_stage)
  @max_retries = args[:max_retries] if args.key?(:max_retries)
  @name = args[:name] if args.key?(:name)
  @observed_generation = args[:observed_generation] if args.key?(:observed_generation)
  @reconciling = args[:reconciling] if args.key?(:reconciling)
  @retried = args[:retried] if args.key?(:retried)
  @service_account = args[:service_account] if args.key?(:service_account)
  @start_time = args[:start_time] if args.key?(:start_time)
  @timeout = args[:timeout] if args.key?(:timeout)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
  @volumes = args[:volumes] if args.key?(:volumes)
  @vpc_access = args[:vpc_access] if args.key?(:vpc_access)
end