Google_Service_CloudTasks_Resource_ProjectsLocationsQueuesTasks
extends Google_Service_Resource
in package
The "tasks" collection of methods.
Typical usage is:
$cloudtasksService = new Google_Service_CloudTasks(...);
$tasks = $cloudtasksService->tasks;
Table of Contents
- $client : Google_Client
- $methods : array<string|int, mixed>
- $resourceName : string
- $rootUrl : string
- $serviceName : string
- $servicePath : string
- $stackParameters : mixed
- __construct() : mixed
- call() : Google_Http_Request|expectedClass
- TODO: This function needs simplifying.
- create() : Google_Service_CloudTasks_Task
- Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * The maximum task size is 100KB.
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_CloudTasks_CloudtasksEmpty
- Deletes a task. A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has executed successfully or permanently failed.
- get() : Google_Service_CloudTasks_Task
- Gets a task. (tasks.get)
- listProjectsLocationsQueuesTasks() : Google_Service_CloudTasks_ListTasksResponse
- Lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response_view controls the subset of information which is returned. The tasks may be returned in any order. The ordering may change at any time. (tasks.listProjectsLocationsQueuesTasks)
- run() : Google_Service_CloudTasks_Task
- Forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED. This command is meant to be used for manual debugging. For example, RunTask can be used to retry a failed task after a fix has been made or to manually force a task to be dispatched now. The dispatched task is returned. That is, the task that is returned contains the status after the task is dispatched but before the task is received by its target. If Cloud Tasks receives a successful response from the task's target, then the task will be deleted; otherwise the task's schedule_time will be reset to the time that RunTask was called plus the retry delay specified in the queue's RetryConfig. RunTask returns NOT_FOUND when it is called on a task that has already succeeded or permanently failed. (tasks.run)
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$serviceName
private
string
$serviceName
$servicePath
private
string
$servicePath
$stackParameters
private
mixed
$stackParameters
= array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))
Methods
__construct()
public
__construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
- $service : mixed
- $serviceName : mixed
- $resourceName : mixed
- $resource : mixed
Return values
mixed —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
Return values
Google_Http_Request|expectedClass —create()
Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * The maximum task size is 100KB.
public
create(string $parent, Google_Service_CloudTasks_CreateTaskRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudTasks_Task
(tasks.create)
Parameters
- $parent : string
-
Required. The queue name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_IDThe queue must already exist. - $postBody : Google_Service_CloudTasks_CreateTaskRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudTasks_Task —createRequestUri()
Parse/expand request parameters and create a fully qualified request uri.
public
createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
- $restPath : string
- $params : array<string|int, mixed>
Tags
Return values
string —$requestUrl
delete()
Deletes a task. A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has executed successfully or permanently failed.
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudTasks_CloudtasksEmpty
(tasks.delete)
Parameters
- $name : string
-
Required. The task name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudTasks_CloudtasksEmpty —get()
Gets a task. (tasks.get)
public
get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudTasks_Task
Parameters
- $name : string
-
Required. The task name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_CloudTasks_Task —listProjectsLocationsQueuesTasks()
Lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response_view controls the subset of information which is returned. The tasks may be returned in any order. The ordering may change at any time. (tasks.listProjectsLocationsQueuesTasks)
public
listProjectsLocationsQueuesTasks(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudTasks_ListTasksResponse
Parameters
- $parent : string
-
Required. The queue name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_CloudTasks_ListTasksResponse —run()
Forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED. This command is meant to be used for manual debugging. For example, RunTask can be used to retry a failed task after a fix has been made or to manually force a task to be dispatched now. The dispatched task is returned. That is, the task that is returned contains the status after the task is dispatched but before the task is received by its target. If Cloud Tasks receives a successful response from the task's target, then the task will be deleted; otherwise the task's schedule_time will be reset to the time that RunTask was called plus the retry delay specified in the queue's RetryConfig. RunTask returns NOT_FOUND when it is called on a task that has already succeeded or permanently failed. (tasks.run)
public
run(string $name, Google_Service_CloudTasks_RunTaskRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudTasks_Task
Parameters
- $name : string
-
Required. The task name. For example:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID - $postBody : Google_Service_CloudTasks_RunTaskRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudTasks_Task —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed