Class: Google::Apis::CloudtasksV2beta2::Task
- Inherits:
-
Object
- Object
- Google::Apis::CloudtasksV2beta2::Task
- 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
-
#app_engine_http_request ⇒ Google::Apis::CloudtasksV2beta2::AppEngineHttpRequest
App Engine HTTP request.
-
#app_engine_task_target ⇒ Google::Apis::CloudtasksV2beta2::AppEngineTaskTarget
Deprecated.
-
#create_time ⇒ String
Output only.
-
#name ⇒ String
The task name.
-
#pull_message ⇒ Google::Apis::CloudtasksV2beta2::PullMessage
The pull message contains data that can be used by the caller of CloudTasks.PullTasks to process the task.
-
#pull_task_target ⇒ Google::Apis::CloudtasksV2beta2::PullTaskTarget
Deprecated.
-
#schedule_time ⇒ String
The time when the task is scheduled to be attempted.
-
#task_status ⇒ Google::Apis::CloudtasksV2beta2::TaskStatus
Status of the task.
-
#view ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Task
constructor
A new instance of Task.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ Task
Returns a new instance of Task
1611 1612 1613 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1611 def initialize(**args) update!(**args) end |
Instance Attribute Details
#app_engine_http_request ⇒ Google::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
Queue.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, AppEngineHttpTarget.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 =
AppEngineRouting.host+
AppEngineHttpRequest.relative_url The task will be sent to a task handler by an HTTP request using the specified AppEngineHttpRequest.http_method (for example POST, HTTP GET, etc). The task attempt has succeeded if the task handler returns an HTTP response code in the range [200 - 299]. Error 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 propertyappEngineHttpRequest
1542 1543 1544 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1542 def app_engine_http_request @app_engine_http_request end |
#app_engine_task_target ⇒ Google::Apis::CloudtasksV2beta2::AppEngineTaskTarget
Deprecated. Use AppEngineHttpRequest.
Corresponds to the JSON property appEngineTaskTarget
1547 1548 1549 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1547 def app_engine_task_target @app_engine_task_target end |
#create_time ⇒ String
Output only.
The time that the task was created.
create_time
will be truncated to the nearest second.
Corresponds to the JSON property createTime
1554 1555 1556 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1554 def create_time @create_time end |
#name ⇒ String
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 uppercase and lowercase letters, numbers, hyphens, colons, and periods; that is, it must match the regular expression:[a-zA-Z\\d-:\\.]+
.QUEUE_ID
can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression:[a-zA-Z\\d-]+
. The maximum length is 100 characters.TASK_ID
contain uppercase and lowercase letters, numbers, underscores, and hyphens; that is, it must match the regular expression:[a-zA-Z\\d_-]+
. The maximum length is 500 characters. Optionally caller-specified in CreateTaskRequest. Corresponds to the JSON propertyname
1573 1574 1575 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1573 def name @name end |
#pull_message ⇒ Google::Apis::CloudtasksV2beta2::PullMessage
The pull message contains data that can be used by the caller of
CloudTasks.PullTasks to process the task.
This proto can only be used for tasks in a queue which has
Queue.pull_target set.
Corresponds to the JSON property pullMessage
1581 1582 1583 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1581 def @pull_message end |
#pull_task_target ⇒ Google::Apis::CloudtasksV2beta2::PullTaskTarget
Deprecated. Use PullMessage.
Corresponds to the JSON property pullTaskTarget
1586 1587 1588 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1586 def pull_task_target @pull_task_target end |
#schedule_time ⇒ String
The time when the task is scheduled to be attempted.
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 PullTasksRequest.lease_duration.
For App Engine queues, this is when the task will be attempted or retried.
schedule_time
will be truncated to the nearest microsecond.
Corresponds to the JSON property scheduleTime
1597 1598 1599 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1597 def schedule_time @schedule_time end |
#task_status ⇒ Google::Apis::CloudtasksV2beta2::TaskStatus
Status of the task.
Corresponds to the JSON property taskStatus
1602 1603 1604 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1602 def task_status @task_status end |
#view ⇒ String
Output only.
The view specifies which subset of the Task has been
returned.
Corresponds to the JSON property view
1609 1610 1611 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1609 def view @view end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1616 def update!(**args) @app_engine_http_request = args[:app_engine_http_request] if args.key?(:app_engine_http_request) @app_engine_task_target = args[:app_engine_task_target] if args.key?(:app_engine_task_target) @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) @pull_task_target = args[:pull_task_target] if args.key?(:pull_task_target) @schedule_time = args[:schedule_time] if args.key?(:schedule_time) @task_status = args[:task_status] if args.key?(:task_status) @view = args[:view] if args.key?(:view) end |