Class: Google::Cloud::Tasks::V2beta2::Task
- Inherits:
-
Object
- Object
- Google::Cloud::Tasks::V2beta2::Task
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/tasks/v2beta2/task.rb
Overview
A unit of scheduled work.
Defined Under Namespace
Modules: View
Instance Attribute Summary collapse
-
#app_engine_http_request ⇒ ::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest
App Engine HTTP request that is sent to the task's target.
-
#create_time ⇒ ::Google::Protobuf::Timestamp
Output only.
-
#http_request ⇒ ::Google::Cloud::Tasks::V2beta2::HttpRequest
HTTP request that is sent to the task's target.
-
#name ⇒ ::String
Optionally caller-specified in CreateTask.
-
#pull_message ⇒ ::Google::Cloud::Tasks::V2beta2::PullMessage
LeaseTasks to process the task.
-
#schedule_time ⇒ ::Google::Protobuf::Timestamp
The time when the task is scheduled to be attempted.
-
#status ⇒ ::Google::Cloud::Tasks::V2beta2::TaskStatus
Output only.
-
#view ⇒ ::Google::Cloud::Tasks::V2beta2::Task::View
Output only.
Instance Attribute Details
#app_engine_http_request ⇒ ::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest
Returns App Engine HTTP request that is sent to the task's target. Can be set only if app_engine_http_target is set on the queue.
An App Engine task is a task that has AppEngineHttpRequest set.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'proto_docs/google/cloud/tasks/v2beta2/task.rb', line 98 class Task include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} # data. # # When a task is returned in a response, not all # information is retrieved by default because some data, such as # payloads, might be desirable to return only when needed because # of its large size or because of the sensitivity of data that it # contains. module View # Unspecified. Defaults to BASIC. VIEW_UNSPECIFIED = 0 # The basic view omits fields which can be large or can contain # sensitive data. # # This view does not include the # ([payload in # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] # and [payload in # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These # payloads are desirable to return only when needed, because they can be # large and because of the sensitivity of the data that you choose to store # in it. BASIC = 1 # All information is returned. # # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} # requires `cloudtasks.tasks.fullView` [Google # IAM](https://cloud.google.com/iam/) permission on the # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. FULL = 2 end end |
#create_time ⇒ ::Google::Protobuf::Timestamp
Returns Output only. The time that the task was created.
create_time
will be truncated to the nearest second.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'proto_docs/google/cloud/tasks/v2beta2/task.rb', line 98 class Task include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} # data. # # When a task is returned in a response, not all # information is retrieved by default because some data, such as # payloads, might be desirable to return only when needed because # of its large size or because of the sensitivity of data that it # contains. module View # Unspecified. Defaults to BASIC. VIEW_UNSPECIFIED = 0 # The basic view omits fields which can be large or can contain # sensitive data. # # This view does not include the # ([payload in # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] # and [payload in # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These # payloads are desirable to return only when needed, because they can be # large and because of the sensitivity of the data that you choose to store # in it. BASIC = 1 # All information is returned. # # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} # requires `cloudtasks.tasks.fullView` [Google # IAM](https://cloud.google.com/iam/) permission on the # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. FULL = 2 end end |
#http_request ⇒ ::Google::Cloud::Tasks::V2beta2::HttpRequest
Returns HTTP request that is sent to the task's target.
An HTTP task is a task that has HttpRequest set.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'proto_docs/google/cloud/tasks/v2beta2/task.rb', line 98 class Task include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} # data. # # When a task is returned in a response, not all # information is retrieved by default because some data, such as # payloads, might be desirable to return only when needed because # of its large size or because of the sensitivity of data that it # contains. module View # Unspecified. Defaults to BASIC. VIEW_UNSPECIFIED = 0 # The basic view omits fields which can be large or can contain # sensitive data. # # This view does not include the # ([payload in # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] # and [payload in # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These # payloads are desirable to return only when needed, because they can be # large and because of the sensitivity of the data that you choose to store # in it. BASIC = 1 # All information is returned. # # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} # requires `cloudtasks.tasks.fullView` [Google # IAM](https://cloud.google.com/iam/) permission on the # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. FULL = 2 end end |
#name ⇒ ::String
Returns 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::Google::Cloud::Location::Locations::Client#list_locations
. 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.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'proto_docs/google/cloud/tasks/v2beta2/task.rb', line 98 class Task include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} # data. # # When a task is returned in a response, not all # information is retrieved by default because some data, such as # payloads, might be desirable to return only when needed because # of its large size or because of the sensitivity of data that it # contains. module View # Unspecified. Defaults to BASIC. VIEW_UNSPECIFIED = 0 # The basic view omits fields which can be large or can contain # sensitive data. # # This view does not include the # ([payload in # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] # and [payload in # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These # payloads are desirable to return only when needed, because they can be # large and because of the sensitivity of the data that you choose to store # in it. BASIC = 1 # All information is returned. # # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} # requires `cloudtasks.tasks.fullView` [Google # IAM](https://cloud.google.com/iam/) permission on the # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. FULL = 2 end end |
#pull_message ⇒ ::Google::Cloud::Tasks::V2beta2::PullMessage
Returns LeaseTasks to process the task. Can be set only if pull_target is set on the queue.
A pull task is a task that has PullMessage set.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'proto_docs/google/cloud/tasks/v2beta2/task.rb', line 98 class Task include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} # data. # # When a task is returned in a response, not all # information is retrieved by default because some data, such as # payloads, might be desirable to return only when needed because # of its large size or because of the sensitivity of data that it # contains. module View # Unspecified. Defaults to BASIC. VIEW_UNSPECIFIED = 0 # The basic view omits fields which can be large or can contain # sensitive data. # # This view does not include the # ([payload in # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] # and [payload in # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These # payloads are desirable to return only when needed, because they can be # large and because of the sensitivity of the data that you choose to store # in it. BASIC = 1 # All information is returned. # # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} # requires `cloudtasks.tasks.fullView` [Google # IAM](https://cloud.google.com/iam/) permission on the # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. FULL = 2 end end |
#schedule_time ⇒ ::Google::Protobuf::Timestamp
Returns 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.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'proto_docs/google/cloud/tasks/v2beta2/task.rb', line 98 class Task include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} # data. # # When a task is returned in a response, not all # information is retrieved by default because some data, such as # payloads, might be desirable to return only when needed because # of its large size or because of the sensitivity of data that it # contains. module View # Unspecified. Defaults to BASIC. VIEW_UNSPECIFIED = 0 # The basic view omits fields which can be large or can contain # sensitive data. # # This view does not include the # ([payload in # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] # and [payload in # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These # payloads are desirable to return only when needed, because they can be # large and because of the sensitivity of the data that you choose to store # in it. BASIC = 1 # All information is returned. # # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} # requires `cloudtasks.tasks.fullView` [Google # IAM](https://cloud.google.com/iam/) permission on the # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. FULL = 2 end end |
#status ⇒ ::Google::Cloud::Tasks::V2beta2::TaskStatus
Returns Output only. The task status.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'proto_docs/google/cloud/tasks/v2beta2/task.rb', line 98 class Task include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} # data. # # When a task is returned in a response, not all # information is retrieved by default because some data, such as # payloads, might be desirable to return only when needed because # of its large size or because of the sensitivity of data that it # contains. module View # Unspecified. Defaults to BASIC. VIEW_UNSPECIFIED = 0 # The basic view omits fields which can be large or can contain # sensitive data. # # This view does not include the # ([payload in # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] # and [payload in # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These # payloads are desirable to return only when needed, because they can be # large and because of the sensitivity of the data that you choose to store # in it. BASIC = 1 # All information is returned. # # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} # requires `cloudtasks.tasks.fullView` [Google # IAM](https://cloud.google.com/iam/) permission on the # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. FULL = 2 end end |
#view ⇒ ::Google::Cloud::Tasks::V2beta2::Task::View
Returns Output only. The view specifies which subset of the Task has been returned.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'proto_docs/google/cloud/tasks/v2beta2/task.rb', line 98 class Task include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} # data. # # When a task is returned in a response, not all # information is retrieved by default because some data, such as # payloads, might be desirable to return only when needed because # of its large size or because of the sensitivity of data that it # contains. module View # Unspecified. Defaults to BASIC. VIEW_UNSPECIFIED = 0 # The basic view omits fields which can be large or can contain # sensitive data. # # This view does not include the # ([payload in # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] # and [payload in # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These # payloads are desirable to return only when needed, because they can be # large and because of the sensitivity of the data that you choose to store # in it. BASIC = 1 # All information is returned. # # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} # requires `cloudtasks.tasks.fullView` [Google # IAM](https://cloud.google.com/iam/) permission on the # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. FULL = 2 end end |