blob: 4d91b56485e36f85366c5479475abbf8292cc29b [file] [log] [blame]
{
"clientLibrary": {
"name": "cloud.google.com/go/cloudtasks/apiv2beta2",
"version": "1.5.0",
"language": "GO",
"apis": [
{
"id": "google.cloud.tasks.v2beta2",
"version": "v2beta2"
}
]
},
"snippets": [
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync",
"title": "cloudtasks AcknowledgeTask Sample",
"description": "AcknowledgeTask acknowledges a pull task.\n\nThe worker, that is, the entity that\nleased this task must call this method\nto indicate that the work associated with the task has finished.\n\nThe worker must acknowledge a task within the\nlease_duration or the lease\nwill expire and the task will become available to be leased\nagain. After the task is acknowledged, it will not be returned\nby a later LeaseTasks,\nGetTask, or\nListTasks.",
"file": "Client/AcknowledgeTask/main.go",
"language": "GO",
"clientMethod": {
"shortName": "AcknowledgeTask",
"fullName": "google.cloud.tasks.v2beta2.Client.AcknowledgeTask",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.AcknowledgeTaskRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "AcknowledgeTask",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 50,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync",
"title": "cloudtasks CancelLease Sample",
"description": "CancelLease cancel a pull task’s lease.\n\nThe worker can use this method to cancel a task’s lease by\nsetting its schedule_time to now. This will\nmake the task available to be leased to the next caller of\nLeaseTasks.",
"file": "Client/CancelLease/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CancelLease",
"fullName": "google.cloud.tasks.v2beta2.Client.CancelLease",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.CancelLeaseRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Task",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "CancelLease",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.CancelLease",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync",
"title": "cloudtasks CreateQueue Sample",
"description": "CreateQueue creates a queue.\n\nQueues created with this method allow tasks to live for a maximum of 31\ndays. After a task is 31 days old, the task will be deleted regardless of whether\nit was dispatched or not.\n\nWARNING: Using this method may have unintended side effects if you are\nusing an App Engine queue.yaml or queue.xml file to manage your queues.\nRead\nOverview of Queue Management and\nqueue.yaml (at https: //cloud.google.com/tasks/docs/queue-yaml) before using\nthis method.",
"file": "Client/CreateQueue/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateQueue",
"fullName": "google.cloud.tasks.v2beta2.Client.CreateQueue",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.CreateQueueRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Queue",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "CreateQueue",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.CreateQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync",
"title": "cloudtasks CreateTask Sample",
"description": "CreateTask creates a task and adds it to a queue.\n\nTasks cannot be updated after creation; there is no UpdateTask command.\n\n\tFor [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is\n\t100KB.\n\n\tFor [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB.",
"file": "Client/CreateTask/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateTask",
"fullName": "google.cloud.tasks.v2beta2.Client.CreateTask",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.CreateTaskRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Task",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "CreateTask",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.CreateTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync",
"title": "cloudtasks DeleteQueue Sample",
"description": "DeleteQueue deletes a queue.\n\nThis command will delete the queue even if it has tasks in it.\n\nNote: If you delete a queue, a queue with the same name can’t be created\nfor 7 days.\n\nWARNING: Using this method may have unintended side effects if you are\nusing an App Engine queue.yaml or queue.xml file to manage your queues.\nRead\nOverview of Queue Management and\nqueue.yaml (at https: //cloud.google.com/tasks/docs/queue-yaml) before using\nthis method.",
"file": "Client/DeleteQueue/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteQueue",
"fullName": "google.cloud.tasks.v2beta2.Client.DeleteQueue",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.DeleteQueueRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "DeleteQueue",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 50,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync",
"title": "cloudtasks DeleteTask Sample",
"description": "DeleteTask deletes a task.\n\nA task can be deleted if it is scheduled or dispatched. A task\ncannot be deleted if it has completed successfully or permanently\nfailed.",
"file": "Client/DeleteTask/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteTask",
"fullName": "google.cloud.tasks.v2beta2.Client.DeleteTask",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.DeleteTaskRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "DeleteTask",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.DeleteTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 50,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync",
"title": "cloudtasks GetIamPolicy Sample",
"description": "GetIamPolicy gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n\tcloudtasks.queues.getIamPolicy",
"file": "Client/GetIamPolicy/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetIamPolicy",
"fullName": "google.cloud.tasks.v2beta2.Client.GetIamPolicy",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.GetIamPolicyRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "iampb.Policy",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "GetIamPolicy",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.GetIamPolicy",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync",
"title": "cloudtasks GetQueue Sample",
"description": "GetQueue gets a queue.",
"file": "Client/GetQueue/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetQueue",
"fullName": "google.cloud.tasks.v2beta2.Client.GetQueue",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.GetQueueRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Queue",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "GetQueue",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.GetQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync",
"title": "cloudtasks GetTask Sample",
"description": "GetTask gets a task.",
"file": "Client/GetTask/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetTask",
"fullName": "google.cloud.tasks.v2beta2.Client.GetTask",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.GetTaskRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Task",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "GetTask",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.GetTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync",
"title": "cloudtasks LeaseTasks Sample",
"description": "LeaseTasks leases tasks from a pull queue for\nlease_duration.\n\nThis method is invoked by the worker to obtain a lease. The\nworker must acknowledge the task via\nAcknowledgeTask after they have\nperformed the work associated with the task.\n\nThe payload is intended to store data that\nthe worker needs to perform the work associated with the task. To\nreturn the payloads in the response, set\nresponse_view to\nFULL.\n\nA maximum of 10 qps of LeaseTasks\nrequests are allowed per\nqueue. RESOURCE_EXHAUSTED\nis returned when this limit is\nexceeded. RESOURCE_EXHAUSTED\nis also returned when\nmax_tasks_dispatched_per_second\nis exceeded.",
"file": "Client/LeaseTasks/main.go",
"language": "GO",
"clientMethod": {
"shortName": "LeaseTasks",
"fullName": "google.cloud.tasks.v2beta2.Client.LeaseTasks",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.LeaseTasksRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.LeaseTasksResponse",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "LeaseTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync",
"title": "cloudtasks ListQueues Sample",
"description": "ListQueues lists queues.\n\nQueues are returned in lexicographical order.",
"file": "Client/ListQueues/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListQueues",
"fullName": "google.cloud.tasks.v2beta2.Client.ListQueues",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.ListQueuesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "QueueIterator",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "ListQueues",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.ListQueues",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 59,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync",
"title": "cloudtasks ListTasks Sample",
"description": "ListTasks lists the tasks in a queue.\n\nBy default, only the BASIC view is retrieved\ndue to performance considerations;\nresponse_view controls the\nsubset of information which is returned.\n\nThe tasks may be returned in any order. The ordering may change at any\ntime.",
"file": "Client/ListTasks/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListTasks",
"fullName": "google.cloud.tasks.v2beta2.Client.ListTasks",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.ListTasksRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "TaskIterator",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "ListTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.ListTasks",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 59,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync",
"title": "cloudtasks PauseQueue Sample",
"description": "PauseQueue pauses the queue.\n\nIf a queue is paused then the system will stop dispatching tasks\nuntil the queue is resumed via\nResumeQueue. Tasks can still be added\nwhen the queue is paused. A queue is paused if its\nstate is PAUSED.",
"file": "Client/PauseQueue/main.go",
"language": "GO",
"clientMethod": {
"shortName": "PauseQueue",
"fullName": "google.cloud.tasks.v2beta2.Client.PauseQueue",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.PauseQueueRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Queue",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "PauseQueue",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.PauseQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync",
"title": "cloudtasks PurgeQueue Sample",
"description": "PurgeQueue purges a queue by deleting all of its tasks.\n\nAll tasks created before this method is called are permanently deleted.\n\nPurge operations can take up to one minute to take effect. Tasks\nmight be dispatched before the purge takes effect. A purge is irreversible.",
"file": "Client/PurgeQueue/main.go",
"language": "GO",
"clientMethod": {
"shortName": "PurgeQueue",
"fullName": "google.cloud.tasks.v2beta2.Client.PurgeQueue",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.PurgeQueueRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Queue",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "PurgeQueue",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync",
"title": "cloudtasks RenewLease Sample",
"description": "RenewLease renew the current lease of a pull task.\n\nThe worker can use this method to extend the lease by a new\nduration, starting from now. The new task lease will be\nreturned in the task’s schedule_time.",
"file": "Client/RenewLease/main.go",
"language": "GO",
"clientMethod": {
"shortName": "RenewLease",
"fullName": "google.cloud.tasks.v2beta2.Client.RenewLease",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.RenewLeaseRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Task",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "RenewLease",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.RenewLease",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync",
"title": "cloudtasks ResumeQueue Sample",
"description": "ResumeQueue resume a queue.\n\nThis method resumes a queue after it has been\nPAUSED or\nDISABLED. The state of a queue is stored\nin the queue’s state; after calling this method it\nwill be set to RUNNING.\n\nWARNING: Resuming many high-QPS queues at the same time can\nlead to target overloading. If you are resuming high-QPS\nqueues, follow the 500/50/5 pattern described in\nManaging Cloud Tasks Scaling\nRisks (at https: //cloud.google.com/tasks/docs/manage-cloud-task-scaling).",
"file": "Client/ResumeQueue/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ResumeQueue",
"fullName": "google.cloud.tasks.v2beta2.Client.ResumeQueue",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.ResumeQueueRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Queue",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "ResumeQueue",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync",
"title": "cloudtasks RunTask Sample",
"description": "RunTask forces a task to run now.\n\nWhen this method is called, Cloud Tasks will dispatch the task, even if\nthe task is already running, the queue has reached its RateLimits or\nis PAUSED.\n\nThis command is meant to be used for manual debugging. For\nexample, RunTask can be used to retry a failed\ntask after a fix has been made or to manually force a task to be\ndispatched now.\n\nThe dispatched task is returned. That is, the task that is returned\ncontains the status after the task is dispatched but\nbefore the task is received by its target.\n\nIf Cloud Tasks receives a successful response from the task’s\ntarget, then the task will be deleted; otherwise the task’s\nschedule_time will be reset to the time that\nRunTask was called plus the retry delay specified\nin the queue’s RetryConfig.\n\nRunTask returns\nNOT_FOUND when it is called on a\ntask that has already succeeded or permanently failed.\n\nRunTask cannot be called on a\n[pull task][google.cloud.tasks.v2beta2.PullMessage].",
"file": "Client/RunTask/main.go",
"language": "GO",
"clientMethod": {
"shortName": "RunTask",
"fullName": "google.cloud.tasks.v2beta2.Client.RunTask",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.RunTaskRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Task",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "RunTask",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.RunTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync",
"title": "cloudtasks SetIamPolicy Sample",
"description": "SetIamPolicy sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nNote: The Cloud Console does not check queue-level IAM permissions yet.\nProject-level permissions are required to use the Cloud Console.\n\nAuthorization requires the following\nGoogle IAM (at https: //cloud.google.com/iam) permission on the specified\nresource parent: \n\n\tcloudtasks.queues.setIamPolicy",
"file": "Client/SetIamPolicy/main.go",
"language": "GO",
"clientMethod": {
"shortName": "SetIamPolicy",
"fullName": "google.cloud.tasks.v2beta2.Client.SetIamPolicy",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.SetIamPolicyRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "iampb.Policy",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "SetIamPolicy",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.SetIamPolicy",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync",
"title": "cloudtasks TestIamPermissions Sample",
"description": "TestIamPermissions returns permissions that a caller has on a Queue.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay “fail open” without warning.",
"file": "Client/TestIamPermissions/main.go",
"language": "GO",
"clientMethod": {
"shortName": "TestIamPermissions",
"fullName": "google.cloud.tasks.v2beta2.Client.TestIamPermissions",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.TestIamPermissionsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "iampb.TestIamPermissionsResponse",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "TestIamPermissions",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.TestIamPermissions",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync",
"title": "cloudtasks UpdateQueue Sample",
"description": "UpdateQueue updates a queue.\n\nThis method creates the queue if it does not exist and updates\nthe queue if it does exist.\n\nQueues created with this method allow tasks to live for a maximum of 31\ndays. After a task is 31 days old, the task will be deleted regardless of whether\nit was dispatched or not.\n\nWARNING: Using this method may have unintended side effects if you are\nusing an App Engine queue.yaml or queue.xml file to manage your queues.\nRead\nOverview of Queue Management and\nqueue.yaml (at https: //cloud.google.com/tasks/docs/queue-yaml) before using\nthis method.",
"file": "Client/UpdateQueue/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateQueue",
"fullName": "google.cloud.tasks.v2beta2.Client.UpdateQueue",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "cloudtaskspb.UpdateQueueRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "cloudtaskspb.Queue",
"client": {
"shortName": "Client",
"fullName": "google.cloud.tasks.v2beta2.Client"
},
"method": {
"shortName": "UpdateQueue",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta2.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
}
]
}