ProjectsLocationsQueues
class ProjectsLocationsQueues extends Resource (View source)
The "queues" collection of methods.
Typical usage is:
$cloudtasksService = new Google\Service\CloudTasks(...);
$queues = $cloudtasksService->projects_locations_queues;
Methods
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. (queues.create)
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. (queues.delete)
Gets the access control policy for a Queue. Returns an empty policy if the
resource exists and does not have a policy set. Authorization requires the
following Google IAM permission on the
specified resource parent: * cloudtasks.queues.getIamPolicy
(queues.getIamPolicy)
Lists queues. Queues are returned in lexicographical order.
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. (queues.patch)
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.
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. (queues.purge)
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. (queues.resume)
Sets the access control policy for a Queue. Replaces any existing policy.
Returns permissions that a caller has on a Queue. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Details
Queue
create(string $parent, Queue $postBody, array $optParams = [])
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. (queues.create)
CloudtasksEmpty
delete(string $name, array $optParams = [])
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. (queues.delete)
Queue
get(string $name, array $optParams = [])
Gets a queue. (queues.get)
Policy
getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])
Gets the access control policy for a Queue. Returns an empty policy if the
resource exists and does not have a policy set. Authorization requires the
following Google IAM permission on the
specified resource parent: * cloudtasks.queues.getIamPolicy
(queues.getIamPolicy)
ListQueuesResponse
listProjectsLocationsQueues(string $parent, array $optParams = [])
Lists queues. Queues are returned in lexicographical order.
(queues.listProjectsLocationsQueues)
Queue
patch(string $name, Queue $postBody, array $optParams = [])
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. (queues.patch)
Queue
pause(string $name, PauseQueueRequest $postBody, array $optParams = [])
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.
(queues.pause)
Queue
purge(string $name, PurgeQueueRequest $postBody, array $optParams = [])
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. (queues.purge)
Queue
resume(string $name, ResumeQueueRequest $postBody, array $optParams = [])
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. (queues.resume)
Policy
setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])
Sets the access control policy for a Queue. Replaces any existing policy.
Note: The Cloud Console does not check queue-level IAM permissions yet.
Project-level permissions are required to use the Cloud Console.
Authorization requires the following Google
IAM permission on the specified resource
parent: * cloudtasks.queues.setIamPolicy
(queues.setIamPolicy)
TestIamPermissionsResponse
testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])
Returns permissions that a caller has on a Queue. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. (queues.testIamPermissions)