Class: Google::Apis::CloudtasksV2beta2::Queue
- Inherits:
-
Object
- Object
- Google::Apis::CloudtasksV2beta2::Queue
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudtasks_v2beta2/classes.rb,
lib/google/apis/cloudtasks_v2beta2/representations.rb,
lib/google/apis/cloudtasks_v2beta2/representations.rb
Overview
A queue is a container of related tasks. Queues are configured to manage how those tasks are dispatched. Configurable properties include rate limits, retry options, target types, and others.
Instance Attribute Summary collapse
-
#app_engine_http_target ⇒ Google::Apis::CloudtasksV2beta2::AppEngineHttpTarget
App Engine HTTP target.
-
#name ⇒ String
Caller-specified and required in CreateQueue, after which it becomes output only.
-
#pull_target ⇒ Google::Apis::CloudtasksV2beta2::PullTarget
Pull target.
-
#purge_time ⇒ String
Output only.
-
#rate_limits ⇒ Google::Apis::CloudtasksV2beta2::RateLimits
Rate limits.
-
#retry_config ⇒ Google::Apis::CloudtasksV2beta2::RetryConfig
Retry config.
-
#state ⇒ String
Output only.
-
#stats ⇒ Google::Apis::CloudtasksV2beta2::QueueStats
Statistics for a queue.
-
#task_ttl ⇒ String
The maximum amount of time that a task will be retained in this queue.
-
#tombstone_ttl ⇒ String
The task tombstone time to live (TTL).
Instance Method Summary collapse
-
#initialize(**args) ⇒ Queue
constructor
A new instance of Queue.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Queue
Returns a new instance of Queue.
1043 1044 1045 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 1043 def initialize(**args) update!(**args) end |
Instance Attribute Details
#app_engine_http_target ⇒ Google::Apis::CloudtasksV2beta2::AppEngineHttpTarget
App Engine HTTP target. The task will be delivered to the App Engine
application hostname specified by its AppEngineHttpTarget and
AppEngineHttpRequest. The documentation for AppEngineHttpRequest explains how
the task's host URL is constructed. Using AppEngineHttpTarget requires
appengine.applications.get Google IAM permission for the project and the following scope:
https://www.googleapis.com/auth/cloud-platform
Corresponds to the JSON property appEngineHttpTarget
963 964 965 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 963 def app_engine_http_target @app_engine_http_target end |
#name ⇒ String
Caller-specified and required in CreateQueue, after which it becomes output
only. The queue name. The queue name must have the following format: projects/
PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue'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.
Corresponds to the JSON property name
978 979 980 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 978 def name @name end |
#pull_target ⇒ Google::Apis::CloudtasksV2beta2::PullTarget
Pull target.
Corresponds to the JSON property pullTarget
983 984 985 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 983 def pull_target @pull_target end |
#purge_time ⇒ String
Output only. The last time this queue was purged. All tasks that were created
before this time were purged. A queue can be purged using PurgeQueue, the App
Engine Task Queue SDK, or the Cloud Console. Purge time will be truncated to the nearest
microsecond. Purge time will be unset if the queue has never been purged.
Corresponds to the JSON property purgeTime
993 994 995 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 993 def purge_time @purge_time end |
#rate_limits ⇒ Google::Apis::CloudtasksV2beta2::RateLimits
Rate limits. This message determines the maximum rate that tasks can be
dispatched by a queue, regardless of whether the dispatch is a first task
attempt or a retry. Note: The debugging command, RunTask, will run a task even
if the queue has reached its RateLimits.
Corresponds to the JSON property rateLimits
1001 1002 1003 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 1001 def rate_limits @rate_limits end |
#retry_config ⇒ Google::Apis::CloudtasksV2beta2::RetryConfig
Retry config. These settings determine how a failed task attempt is retried.
Corresponds to the JSON property retryConfig
1006 1007 1008 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 1006 def retry_config @retry_config end |
#state ⇒ String
Output only. The state of the queue. state can only be changed by called
PauseQueue, ResumeQueue, or uploading queue.yaml/xml. UpdateQueue cannot be used to
change state.
Corresponds to the JSON property state
1014 1015 1016 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 1014 def state @state end |
#stats ⇒ Google::Apis::CloudtasksV2beta2::QueueStats
Statistics for a queue.
Corresponds to the JSON property stats
1019 1020 1021 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 1019 def stats @stats end |
#task_ttl ⇒ String
The maximum amount of time that a task will be retained in this queue. Queues
created by Cloud Tasks have a default task_ttl of 31 days. After a task has
lived for task_ttl, the task will be deleted regardless of whether it was
dispatched or not. The task_ttl for queues created via queue.yaml/xml is
equal to the maximum duration because there is a storage quota for these queues. To view the maximum
valid duration, see the documentation for Duration.
Corresponds to the JSON property taskTtl
1030 1031 1032 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 1030 def task_ttl @task_ttl end |
#tombstone_ttl ⇒ String
The task tombstone time to live (TTL). After a task is deleted or completed,
the task's tombstone is retained for the length of time specified by
tombstone_ttl. The tombstone is used by task de-duplication; another task
with the same name can't be created until the tombstone has expired. For more
information about task de-duplication, see the documentation for
CreateTaskRequest. Queues created by Cloud Tasks have a default tombstone_ttl
of 1 hour.
Corresponds to the JSON property tombstoneTtl
1041 1042 1043 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 1041 def tombstone_ttl @tombstone_ttl end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
# File 'lib/google/apis/cloudtasks_v2beta2/classes.rb', line 1048 def update!(**args) @app_engine_http_target = args[:app_engine_http_target] if args.key?(:app_engine_http_target) @name = args[:name] if args.key?(:name) @pull_target = args[:pull_target] if args.key?(:pull_target) @purge_time = args[:purge_time] if args.key?(:purge_time) @rate_limits = args[:rate_limits] if args.key?(:rate_limits) @retry_config = args[:retry_config] if args.key?(:retry_config) @state = args[:state] if args.key?(:state) @stats = args[:stats] if args.key?(:stats) @task_ttl = args[:task_ttl] if args.key?(:task_ttl) @tombstone_ttl = args[:tombstone_ttl] if args.key?(:tombstone_ttl) end |