Class: Google::Apis::CloudtasksV2beta3::Task
- Inherits:
-
Object
- Object
- Google::Apis::CloudtasksV2beta3::Task
- Defined in:
- generated/google/apis/cloudtasks_v2beta3/classes.rb,
generated/google/apis/cloudtasks_v2beta3/representations.rb,
generated/google/apis/cloudtasks_v2beta3/representations.rb
Overview
A unit of scheduled work.
Instance Attribute Summary collapse
-
#app_engine_http_request ⇒ Google::Apis::CloudtasksV2beta3::AppEngineHttpRequest
App Engine HTTP request.
-
#create_time ⇒ String
Output only.
-
#dispatch_count ⇒ Fixnum
Output only.
-
#first_attempt ⇒ Google::Apis::CloudtasksV2beta3::Attempt
The status of a task attempt.
-
#last_attempt ⇒ Google::Apis::CloudtasksV2beta3::Attempt
The status of a task attempt.
-
#name ⇒ String
Optionally caller-specified in CreateTask.
-
#response_count ⇒ Fixnum
Output only.
-
#schedule_time ⇒ String
The time when the task is scheduled to be attempted.
-
#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
1344 1345 1346 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1344 def initialize(**args) update!(**args) end |
Instance Attribute Details
#app_engine_http_request ⇒ Google::Apis::CloudtasksV2beta3::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_queue 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_uri 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 error503
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
1280 1281 1282 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1280 def app_engine_http_request @app_engine_http_request 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
1286 1287 1288 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1286 def create_time @create_time end |
#dispatch_count ⇒ Fixnum
Output only. The number of attempts dispatched.
This count includes tasks which have been dispatched but haven't
received a response.
Corresponds to the JSON property dispatchCount
1293 1294 1295 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1293 def dispatch_count @dispatch_count end |
#first_attempt ⇒ Google::Apis::CloudtasksV2beta3::Attempt
The status of a task attempt.
Corresponds to the JSON property firstAttempt
1298 1299 1300 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1298 def first_attempt @first_attempt end |
#last_attempt ⇒ Google::Apis::CloudtasksV2beta3::Attempt
The status of a task attempt.
Corresponds to the JSON property lastAttempt
1303 1304 1305 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1303 def last_attempt @last_attempt end |
#name ⇒ String
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 projectsLOCATION_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 propertyname
1324 1325 1326 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1324 def name @name end |
#response_count ⇒ Fixnum
Output only. The number of attempts which have received a response.
Corresponds to the JSON property responseCount
1329 1330 1331 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1329 def response_count @response_count end |
#schedule_time ⇒ String
The time when the task is scheduled to be attempted.
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
1336 1337 1338 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1336 def schedule_time @schedule_time end |
#view ⇒ String
Output only. The view specifies which subset of the Task has
been returned.
Corresponds to the JSON property view
1342 1343 1344 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1342 def view @view end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 |
# File 'generated/google/apis/cloudtasks_v2beta3/classes.rb', line 1349 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) @dispatch_count = args[:dispatch_count] if args.key?(:dispatch_count) @first_attempt = args[:first_attempt] if args.key?(:first_attempt) @last_attempt = args[:last_attempt] if args.key?(:last_attempt) @name = args[:name] if args.key?(:name) @response_count = args[:response_count] if args.key?(:response_count) @schedule_time = args[:schedule_time] if args.key?(:schedule_time) @view = args[:view] if args.key?(:view) end |