queues
Creates, updates, deletes, gets or lists a queues
resource.
Overview
Name | queues |
Type | Resource |
Id | google.cloudtasks.queues |
Fields
Name | Datatype | Description |
---|---|---|
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. |
appEngineRoutingOverride | object | App Engine Routing. Defines routing characteristics specific to App Engine - service, version, and instance. For more information about services, versions, and instances see An Overview of App Engine, Microservices Architecture on Google App Engine, App Engine Standard request routing, and App Engine Flex request routing. Using AppEngineRouting requires appengine.applications.get Google IAM permission for the project and the following scope: https://www.googleapis.com/auth/cloud-platform |
httpTarget | object | HTTP target. When specified as a Queue, all the tasks with [HttpRequest] will be overridden according to the target. |
purgeTime | 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. |
rateLimits | object | 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. |
retryConfig | object | Retry config. These settings determine when a failed task attempt is retried. |
stackdriverLoggingConfig | object | Configuration options for writing logs to Stackdriver Logging. |
state | string | Output only. The state of the queue. state can only be changed by calling PauseQueue, ResumeQueue, or uploading queue.yaml/xml. UpdateQueue cannot be used to change state . |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, queuesId | Gets a queue. |
list | SELECT | locationsId, projectsId | Lists queues. Queues are returned in lexicographical order. |
create | INSERT | locationsId, projectsId | Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine queue.yaml or queue.xml file to manage your queues. Read Overview of Queue Management and queue.yaml before using this method. |
delete | DELETE | locationsId, projectsId, queuesId | Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, you may be prevented from creating a new queue with the same name as the deleted queue for a tombstone window of up to 3 days. During this window, the CreateQueue operation may appear to recreate the queue, but this can be misleading. If you attempt to create a queue with the same name as one that is in the tombstone window, run GetQueue to confirm that the queue creation was successful. If GetQueue returns 200 response code, your queue was successfully created with the name of the previously deleted queue. Otherwise, your queue did not successfully recreate. WARNING: Using this method may have unintended side effects if you are using an App Engine queue.yaml or queue.xml file to manage your queues. Read Overview of Queue Management and queue.yaml before using this method. |
patch | UPDATE | locationsId, projectsId, queuesId | Updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine queue.yaml or queue.xml file to manage your queues. Read Overview of Queue Management and queue.yaml before using this method. |
pause | EXEC | locationsId, projectsId, queuesId | Pauses the queue. If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue. Tasks can still be added when the queue is paused. A queue is paused if its state is PAUSED. |
purge | EXEC | locationsId, projectsId, queuesId | Purges a queue by deleting all of its tasks. All tasks created before this method is called are permanently deleted. Purge operations can take up to one minute to take effect. Tasks might be dispatched before the purge takes effect. A purge is irreversible. |
resume | EXEC | locationsId, projectsId, queuesId | Resume a queue. This method resumes a queue after it has been PAUSED or DISABLED. The state of a queue is stored in the queue's state; after calling this method it will be set to RUNNING. WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If you are resuming high-QPS queues, follow the 500/50/5 pattern described in Managing Cloud Tasks Scaling Risks. |
SELECT
examples
Lists queues. Queues are returned in lexicographical order.
SELECT
name,
appEngineRoutingOverride,
httpTarget,
purgeTime,
rateLimits,
retryConfig,
stackdriverLoggingConfig,
state
FROM google.cloudtasks.queues
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new queues
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.cloudtasks.queues (
locationsId,
projectsId,
name,
appEngineRoutingOverride,
httpTarget,
rateLimits,
retryConfig,
state,
purgeTime,
stackdriverLoggingConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ appEngineRoutingOverride }}',
'{{ httpTarget }}',
'{{ rateLimits }}',
'{{ retryConfig }}',
'{{ state }}',
'{{ purgeTime }}',
'{{ stackdriverLoggingConfig }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: appEngineRoutingOverride
value:
- name: service
value: string
- name: version
value: string
- name: instance
value: string
- name: host
value: string
- name: httpTarget
value:
- name: uriOverride
value:
- name: scheme
value: string
- name: host
value: string
- name: port
value: string
- name: pathOverride
value:
- name: path
value: string
- name: queryOverride
value:
- name: queryParams
value: string
- name: uriOverrideEnforceMode
value: string
- name: httpMethod
value: string
- name: headerOverrides
value:
- - name: header
value:
- name: key
value: string
- name: value
value: string
- name: oauthToken
value:
- name: serviceAccountEmail
value: string
- name: scope
value: string
- name: oidcToken
value:
- name: serviceAccountEmail
value: string
- name: audience
value: string
- name: rateLimits
value:
- name: maxDispatchesPerSecond
value: number
- name: maxBurstSize
value: integer
- name: maxConcurrentDispatches
value: integer
- name: retryConfig
value:
- name: maxAttempts
value: integer
- name: maxRetryDuration
value: string
- name: minBackoff
value: string
- name: maxBackoff
value: string
- name: maxDoublings
value: integer
- name: state
value: string
- name: purgeTime
value: string
- name: stackdriverLoggingConfig
value:
- name: samplingRatio
value: number
UPDATE
example
Updates a queues
resource.
/*+ update */
UPDATE google.cloudtasks.queues
SET
name = '{{ name }}',
appEngineRoutingOverride = '{{ appEngineRoutingOverride }}',
httpTarget = '{{ httpTarget }}',
rateLimits = '{{ rateLimits }}',
retryConfig = '{{ retryConfig }}',
state = '{{ state }}',
purgeTime = '{{ purgeTime }}',
stackdriverLoggingConfig = '{{ stackdriverLoggingConfig }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND queuesId = '{{ queuesId }}';
DELETE
example
Deletes the specified queues
resource.
/*+ delete */
DELETE FROM google.cloudtasks.queues
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND queuesId = '{{ queuesId }}';