Class: Google::Cloud::Tasks::V2beta2::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb

Overview

A unit of scheduled work.

Defined Under Namespace

Modules: View

Instance Attribute Summary collapse

Instance Attribute Details

#app_engine_http_requestGoogle::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.

Returns:



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb', line 79

class Task
  # 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
    # ({Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest payload in AppEngineHttpRequest} and
    # {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload in PullMessage}). 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_timeGoogle::Protobuf::Timestamp

Returns Output only. The time that the task was created.

+create_time+ will be truncated to the nearest second.

Returns:

  • (Google::Protobuf::Timestamp)

    Output only. The time that the task was created.

    +create_time+ will be truncated to the nearest second.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb', line 79

class Task
  # 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
    # ({Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest payload in AppEngineHttpRequest} and
    # {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload in PullMessage}). 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

#nameString

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 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.

Returns:

  • (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 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.


79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb', line 79

class Task
  # 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
    # ({Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest payload in AppEngineHttpRequest} and
    # {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload in PullMessage}). 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_messageGoogle::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.

Returns:



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb', line 79

class Task
  # 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
    # ({Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest payload in AppEngineHttpRequest} and
    # {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload in PullMessage}). 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_timeGoogle::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.

Returns:

  • (Google::Protobuf::Timestamp)

    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.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb', line 79

class Task
  # 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
    # ({Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest payload in AppEngineHttpRequest} and
    # {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload in PullMessage}). 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

#statusGoogle::Cloud::Tasks::V2beta2::TaskStatus

Returns Output only. The task status.

Returns:



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb', line 79

class Task
  # 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
    # ({Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest payload in AppEngineHttpRequest} and
    # {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload in PullMessage}). 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

#viewGoogle::Cloud::Tasks::V2beta2::Task::View

Returns Output only. The view specifies which subset of the Task has been returned.

Returns:



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb', line 79

class Task
  # 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
    # ({Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest payload in AppEngineHttpRequest} and
    # {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload in PullMessage}). 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