blob: 9e2af1825814f8a9c2c192d7d52ef89bbc8feb88 [file] [log] [blame]
{
"clientLibrary": {
"name": "cloud.google.com/go/cloudtasks/apiv2beta3",
"version": "1.5.0",
"language": "GO",
"apis": [
{
"id": "google.cloud.tasks.v2beta3",
"version": "v2beta3"
}
]
},
"snippets": [
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "CreateQueue",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.CreateQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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\tThe maximum task size is 100KB.",
"file": "Client/CreateTask/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateTask",
"fullName": "google.cloud.tasks.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "CreateTask",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.CreateTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "DeleteQueue",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 50,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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 executed successfully or permanently\nfailed.",
"file": "Client/DeleteTask/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteTask",
"fullName": "google.cloud.tasks.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "DeleteTask",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.DeleteTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 50,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "GetIamPolicy",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.GetIamPolicy",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "GetQueue",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.GetQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "GetTask",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.GetTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "ListQueues",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.ListQueues",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 59,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "ListTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.ListTasks",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 59,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "PauseQueue",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.PauseQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "PurgeQueue",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "ResumeQueue",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.",
"file": "Client/RunTask/main.go",
"language": "GO",
"clientMethod": {
"shortName": "RunTask",
"fullName": "google.cloud.tasks.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "RunTask",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.RunTask",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "SetIamPolicy",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.SetIamPolicy",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "TestIamPermissions",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.TestIamPermissions",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
},
{
"regionTag": "cloudtasks_v2beta3_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.v2beta3.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.v2beta3.Client"
},
"method": {
"shortName": "UpdateQueue",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue",
"service": {
"shortName": "CloudTasks",
"fullName": "google.cloud.tasks.v2beta3.CloudTasks"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 52,
"type": "FULL"
}
]
}
]
}