Class: Google::Apis::CloudtasksV2beta3::Queue
- Inherits:
-
Object
- Object
- Google::Apis::CloudtasksV2beta3::Queue
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudtasks_v2beta3/classes.rb,
lib/google/apis/cloudtasks_v2beta3/representations.rb,
lib/google/apis/cloudtasks_v2beta3/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, queue types, and others.
Instance Attribute Summary collapse
-
#app_engine_http_queue ⇒ Google::Apis::CloudtasksV2beta3::AppEngineHttpQueue
App Engine HTTP queue.
-
#http_target ⇒ Google::Apis::CloudtasksV2beta3::HttpTarget
HTTP target.
-
#name ⇒ String
Caller-specified and required in CreateQueue, after which it becomes output only.
-
#purge_time ⇒ String
Output only.
-
#rate_limits ⇒ Google::Apis::CloudtasksV2beta3::RateLimits
Rate limits.
-
#retry_config ⇒ Google::Apis::CloudtasksV2beta3::RetryConfig
Retry config.
-
#stackdriver_logging_config ⇒ Google::Apis::CloudtasksV2beta3::StackdriverLoggingConfig
Configuration options for writing logs to Stackdriver Logging.
-
#state ⇒ String
Output only.
-
#stats ⇒ Google::Apis::CloudtasksV2beta3::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).
-
#type ⇒ String
Immutable.
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.
1369 1370 1371 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1369 def initialize(**args) update!(**args) end |
Instance Attribute Details
#app_engine_http_queue ⇒ Google::Apis::CloudtasksV2beta3::AppEngineHttpQueue
App Engine HTTP queue. The task will be delivered to the App Engine
application hostname specified by its AppEngineHttpQueue and
AppEngineHttpRequest. The documentation for AppEngineHttpRequest explains how
the task's host URL is constructed. Using AppEngineHttpQueue 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 appEngineHttpQueue
1268 1269 1270 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1268 def app_engine_http_queue @app_engine_http_queue end |
#http_target ⇒ Google::Apis::CloudtasksV2beta3::HttpTarget
HTTP target. When specified as a Queue, all the tasks with [HttpRequest] will
be overridden according to the target.
Corresponds to the JSON property httpTarget
1274 1275 1276 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1274 def http_target @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
1289 1290 1291 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1289 def name @name 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
1299 1300 1301 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1299 def purge_time @purge_time end |
#rate_limits ⇒ Google::Apis::CloudtasksV2beta3::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
1307 1308 1309 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1307 def rate_limits @rate_limits end |
#retry_config ⇒ Google::Apis::CloudtasksV2beta3::RetryConfig
Retry config. These settings determine when a failed task attempt is retried.
Corresponds to the JSON property retryConfig
1312 1313 1314 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1312 def retry_config @retry_config end |
#stackdriver_logging_config ⇒ Google::Apis::CloudtasksV2beta3::StackdriverLoggingConfig
Configuration options for writing logs to Stackdriver Logging.
Corresponds to the JSON property stackdriverLoggingConfig
1318 1319 1320 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1318 def stackdriver_logging_config @stackdriver_logging_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
1326 1327 1328 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1326 def state @state end |
#stats ⇒ Google::Apis::CloudtasksV2beta3::QueueStats
Statistics for a queue.
Corresponds to the JSON property stats
1331 1332 1333 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1331 def stats @stats end |
#task_ttl ⇒ String
The maximum amount of time that a task will be retained in this queue. After a
task has lived for task_ttl
, the task will be deleted regardless of whether
it was dispatched or not. The minimum value is 10 days. The maximum value is
10 years. The value must be given as a string that indicates the length of
time (in seconds) followed by s
(for "seconds"). For more information on the
format, see the documentation for Duration. Queues created by Cloud Tasks have a
default task_ttl
of 31 days. . Queues created by queue.yaml/xml have a fixed
task_ttl
of the maximum duration, because there is a storage quota for these queues.
Corresponds to the JSON property taskTtl
1345 1346 1347 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1345 def task_ttl @task_ttl end |
#tombstone_ttl ⇒ String
The task tombstone time to live (TTL). After a task is deleted or executed,
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. The minimum value is 1 hour. The maximum value is 9 days.
The value must be given as a string that indicates the length of time (in
seconds) followed by s
(for "seconds"). For more information on the format,
see the documentation for Duration. Queues created by Cloud Tasks have a default
tombstone_ttl
of 1 hour.
Corresponds to the JSON property tombstoneTtl
1360 1361 1362 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1360 def tombstone_ttl @tombstone_ttl end |
#type ⇒ String
Immutable. The type of a queue (push or pull). Queue.type
is an immutable
property of the queue that is set at the queue creation time. When left
unspecified, the default value of PUSH
is selected.
Corresponds to the JSON property type
1367 1368 1369 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1367 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'lib/google/apis/cloudtasks_v2beta3/classes.rb', line 1374 def update!(**args) @app_engine_http_queue = args[:app_engine_http_queue] if args.key?(:app_engine_http_queue) @http_target = args[:http_target] if args.key?(:http_target) @name = args[:name] if args.key?(:name) @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) @stackdriver_logging_config = args[:stackdriver_logging_config] if args.key?(:stackdriver_logging_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) @type = args[:type] if args.key?(:type) end |