Method: googleapis.cloudtasks.v2beta3.projects.locations.queues.create

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.

Arguments

Parameters
parent

string

Required. The location name in which the queue will be created. For example: projects/PROJECT_ID/locations/LOCATION_ID The list of allowed locations can be obtained by calling Cloud Tasks' implementation of ListLocations.

body

object (Queue)

Required.

Raised exceptions

Exceptions
ConnectionError In case of a network problem (such as DNS failure or refused connection).
HttpError If the response status is >= 400 (excluding 429 and 503).
TimeoutError If a long-running operation takes longer to finish than the specified timeout limit.
TypeError If an operation or function receives an argument of the wrong type.
ValueError If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout.

Response

If successful, the response contains an instance of Queue.

Subworkflow snippet

Some fields might be optional or required. To identify required fields, refer to the API documentation.

YAML

- create:
    call: googleapis.cloudtasks.v2beta3.projects.locations.queues.create
    args:
        parent: ...
        body:
            appEngineHttpQueue:
                appEngineRoutingOverride:
                    instance: ...
                    service: ...
                    version: ...
            rateLimits:
                maxBurstSize: ...
                maxConcurrentDispatches: ...
                maxDispatchesPerSecond: ...
            retryConfig:
                maxAttempts: ...
                maxBackoff: ...
                maxDoublings: ...
                maxRetryDuration: ...
                minBackoff: ...
            stackdriverLoggingConfig:
                samplingRatio: ...
            taskTtl: ...
            tombstoneTtl: ...
            type: ...
    result: createResult

JSON

[
  {
    "create": {
      "call": "googleapis.cloudtasks.v2beta3.projects.locations.queues.create",
      "args": {
        "parent": "...",
        "body": {
          "appEngineHttpQueue": {
            "appEngineRoutingOverride": {
              "instance": "...",
              "service": "...",
              "version": "..."
            }
          },
          "rateLimits": {
            "maxBurstSize": "...",
            "maxConcurrentDispatches": "...",
            "maxDispatchesPerSecond": "..."
          },
          "retryConfig": {
            "maxAttempts": "...",
            "maxBackoff": "...",
            "maxDoublings": "...",
            "maxRetryDuration": "...",
            "minBackoff": "..."
          },
          "stackdriverLoggingConfig": {
            "samplingRatio": "..."
          },
          "taskTtl": "...",
          "tombstoneTtl": "...",
          "type": "..."
        }
      },
      "result": "createResult"
    }
  }
]