Method: googleapis.cloudtasks.v2.projects.locations.queues.patch

Updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist. 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
name

string

Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID * PROJECT_ID can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects * LOCATION_ID is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * QUEUE_ID can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.

updateMask

string (FieldMask format)

A mask used to specify which fields of the queue are being updated. If empty, then all fields will be updated.

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

- patch:
    call: googleapis.cloudtasks.v2.projects.locations.queues.patch
    args:
        name: ...
        updateMask: ...
        body:
            appEngineRoutingOverride:
                instance: ...
                service: ...
                version: ...
            rateLimits:
                maxConcurrentDispatches: ...
                maxDispatchesPerSecond: ...
            retryConfig:
                maxAttempts: ...
                maxBackoff: ...
                maxDoublings: ...
                maxRetryDuration: ...
                minBackoff: ...
            stackdriverLoggingConfig:
                samplingRatio: ...
    result: patchResult

JSON

[
  {
    "patch": {
      "call": "googleapis.cloudtasks.v2.projects.locations.queues.patch",
      "args": {
        "name": "...",
        "updateMask": "...",
        "body": {
          "appEngineRoutingOverride": {
            "instance": "...",
            "service": "...",
            "version": "..."
          },
          "rateLimits": {
            "maxConcurrentDispatches": "...",
            "maxDispatchesPerSecond": "..."
          },
          "retryConfig": {
            "maxAttempts": "...",
            "maxBackoff": "...",
            "maxDoublings": "...",
            "maxRetryDuration": "...",
            "minBackoff": "..."
          },
          "stackdriverLoggingConfig": {
            "samplingRatio": "..."
          }
        }
      },
      "result": "patchResult"
    }
  }
]