Show / Hide Table of Contents

Class ProjectsResource.LocationsResource.QueuesResource

The "queues" collection of methods.

Inheritance
System.Object
ProjectsResource.LocationsResource.QueuesResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.CloudTasks.v2beta2
Assembly: Google.Apis.CloudTasks.v2beta2.dll
Syntax
public class QueuesResource

Constructors

QueuesResource(IClientService)

Constructs a new resource.

Declaration
public QueuesResource(IClientService service)
Parameters
Type Name Description
Google.Apis.Services.IClientService service

Properties

Tasks

Gets the Tasks resource.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.TasksResource Tasks { get; }
Property Value
Type Description
ProjectsResource.LocationsResource.QueuesResource.TasksResource

Methods

Create(Queue, String)

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.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.CreateRequest Create(Queue body, string parent)
Parameters
Type Name Description
Queue body

The body of the request.

System.String parent

Required. The location name in which the queue will be created. For example: projects/PROJECT_ID/locations/LOCATION_ID The list of allowed locations can be obtained by calling Cloud Tasks' implementation of ListLocations.

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.CreateRequest

Delete(String)

Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can't be created for 7 days. 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.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
System.String name

Required. The queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.DeleteRequest

Get(String)

Gets a queue.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.GetRequest Get(string name)
Parameters
Type Name Description
System.String name

Required. The resource name of the queue. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.GetRequest

GetIamPolicy(GetIamPolicyRequest, String)

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

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.GetIamPolicyRequest GetIamPolicy(GetIamPolicyRequest body, string resource)
Parameters
Type Name Description
GetIamPolicyRequest body

The body of the request.

System.String resource

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.GetIamPolicyRequest

List(String)

Lists queues. Queues are returned in lexicographical order.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.ListRequest List(string parent)
Parameters
Type Name Description
System.String parent

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.ListRequest

Patch(Queue, String)

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.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.PatchRequest Patch(Queue body, string name)
Parameters
Type Name Description
Queue body

The body of the request.

System.String name

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.
Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.PatchRequest

Pause(PauseQueueRequest, String)

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.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.PauseRequest Pause(PauseQueueRequest body, string name)
Parameters
Type Name Description
PauseQueueRequest body

The body of the request.

System.String name

Required. The queue name. For example: projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.PauseRequest

Purge(PurgeQueueRequest, String)

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.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.PurgeRequest Purge(PurgeQueueRequest body, string name)
Parameters
Type Name Description
PurgeQueueRequest body

The body of the request.

System.String name

Required. The queue name. For example: projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.PurgeRequest

Resume(ResumeQueueRequest, String)

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.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.ResumeRequest Resume(ResumeQueueRequest body, string name)
Parameters
Type Name Description
ResumeQueueRequest body

The body of the request.

System.String name

Required. The queue name. For example: projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.ResumeRequest

SetIamPolicy(SetIamPolicyRequest, String)

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

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
Type Name Description
SetIamPolicyRequest body

The body of the request.

System.String resource

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.SetIamPolicyRequest

TestIamPermissions(TestIamPermissionsRequest, String)

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.

Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
Type Name Description
TestIamPermissionsRequest body

The body of the request.

System.String resource

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.QueuesResource.TestIamPermissionsRequest
In This Article
Back to top