Class: Google::Apis::CloudtasksV2beta2::Task

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudtasks_v2beta2/classes.rb,
generated/google/apis/cloudtasks_v2beta2/representations.rb,
generated/google/apis/cloudtasks_v2beta2/representations.rb

Overview

A unit of scheduled work.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Task

Returns a new instance of Task



1633
1634
1635
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1633

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

Instance Attribute Details

#app_engine_http_requestGoogle::Apis::CloudtasksV2beta2::AppEngineHttpRequest

App Engine HTTP request. The message defines the HTTP request that is sent to an App Engine app when the task is dispatched. This proto can only be used for tasks in a queue which has app_engine_http_target set. Using AppEngineHttpRequest requires appengine.applications.get Google IAM permission for the project and the following scope: https://www.googleapis.com/auth/cloud-platform The task will be delivered to the App Engine app which belongs to the same project as the queue. For more information, see How Requests are Routed and how routing is affected by dispatch files. The AppEngineRouting used to construct the URL that the task is delivered to can be set at the queue-level or task-level:

  • If set, app_engine_routing_override is used for all tasks in the queue, no matter what the setting is for the task-level app_engine_routing. The url that the task will be sent to is:
  • url = host + relative_url The task attempt has succeeded if the app's request handler returns an HTTP response code in the range [200 - 299]. 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code or a failure to receive a response before the deadline is a failed attempt. Corresponds to the JSON property appEngineHttpRequest


1574
1575
1576
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1574

def app_engine_http_request
  @app_engine_http_request
end

#create_timeString

Output only. The time that the task was created. create_time will be truncated to the nearest second. Corresponds to the JSON property createTime

Returns:

  • (String)


1580
1581
1582
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1580

def create_time
  @create_time
end

#nameString

Optionally caller-specified in CreateTask. The task name. The task name must have the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

  • PROJECT_ID can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects
  • LOCATION_ID is the canonical ID for the task's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/.
  • QUEUE_ID can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.
  • TASK_ID can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters. Corresponds to the JSON property name

Returns:

  • (String)


1601
1602
1603
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1601

def name
  @name
end

#pull_messageGoogle::Apis::CloudtasksV2beta2::PullMessage

The pull message contains data that can be used by the caller of LeaseTasks to process the task. This proto can only be used for tasks in a queue which has pull_target set. Corresponds to the JSON property pullMessage



1609
1610
1611
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1609

def pull_message
  @pull_message
end

#schedule_timeString

The time when the task is scheduled to be attempted. For App Engine queues, this is when the task will be attempted or retried. For pull queues, this is the time when the task is available to be leased; if a task is currently leased, this is the time when the current lease expires, that is, the time that the task was leased plus the lease_duration. schedule_time will be truncated to the nearest microsecond. Corresponds to the JSON property scheduleTime

Returns:

  • (String)


1620
1621
1622
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1620

def schedule_time
  @schedule_time
end

#statusGoogle::Apis::CloudtasksV2beta2::TaskStatus

Status of the task. Corresponds to the JSON property status



1625
1626
1627
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1625

def status
  @status
end

#viewString

Output only. The view specifies which subset of the Task has been returned. Corresponds to the JSON property view

Returns:

  • (String)


1631
1632
1633
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1631

def view
  @view
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1638
1639
1640
1641
1642
1643
1644
1645
1646
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1638

def update!(**args)
  @app_engine_http_request = args[:app_engine_http_request] if args.key?(:app_engine_http_request)
  @create_time = args[:create_time] if args.key?(:create_time)
  @name = args[:name] if args.key?(:name)
  @pull_message = args[:pull_message] if args.key?(:pull_message)
  @schedule_time = args[:schedule_time] if args.key?(:schedule_time)
  @status = args[:status] if args.key?(:status)
  @view = args[:view] if args.key?(:view)
end