Class ProjectsResource.LocationsResource.QueuesResource
The "queues" collection of methods.
Inherited Members
Namespace: Google.Apis.CloudTasks.v2beta2
Assembly: Google.Apis.CloudTasks.v2beta2.dll
Syntax
public class ProjectsResource.LocationsResource.QueuesResource
Constructors
QueuesResource(IClientService)
Constructs a new resource.
Declaration
public QueuesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
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. |
string | parent | Required. The location name in which the queue will be created. For example:
|
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, 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.
Declaration
public virtual ProjectsResource.LocationsResource.QueuesResource.DeleteRequest Delete(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The queue name. For example: |
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 |
---|---|---|
string | name | Required. The resource name of the queue. For example:
|
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. |
string | resource | REQUIRED: The resource for which the policy is being requested. See Resource names 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 |
---|---|---|
string | parent | Required. The location name. For example: |
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. |
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:
|
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. |
string | name | Required. The queue name. For example: |
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. |
string | name | Required. The queue name. For example: |
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. |
string | name | Required. The queue name. For example: |
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. |
string | resource | REQUIRED: The resource for which the policy is being specified. See Resource names 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. |
string | resource | REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.QueuesResource.TestIamPermissionsRequest |