Class ProjectsResource.LocationsResource.QueuesResource.TasksResource.LeaseRequest
Leases tasks from a pull queue for lease_duration. This method is invoked by the worker to obtain a lease. The worker must acknowledge the task via AcknowledgeTask after they have performed the work associated with the task. The payload is intended to store data that the worker needs to perform the work associated with the task. To return the payloads in the response, set response_view to FULL. A maximum of 10 qps of LeaseTasks requests are allowed per queue. RESOURCE_EXHAUSTED is returned when this limit is exceeded. RESOURCE_EXHAUSTED is also returned when max_tasks_dispatched_per_second is exceeded.
Inheritance
Inherited Members
Namespace: Google.Apis.CloudTasks.v2beta2
Assembly: Google.Apis.CloudTasks.v2beta2.dll
Syntax
public class ProjectsResource.LocationsResource.QueuesResource.TasksResource.LeaseRequest : CloudTasksBaseServiceRequest<LeaseTasksResponse>, IClientServiceRequest<LeaseTasksResponse>, IClientServiceRequest
Constructors
LeaseRequest(IClientService, LeaseTasksRequest, string)
Constructs a new Lease request.
Declaration
public LeaseRequest(IClientService service, LeaseTasksRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
LeaseTasksRequest | body | |
string | parent |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Parent
Required. The queue name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID
Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
Type | Description |
---|---|
string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes Lease parameter list.
Declaration
protected override void InitParameters()