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 |
Required. The location name in which the queue will be created. For example:
|
body |
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.v2.projects.locations.queues.create args: parent: ... body: appEngineRoutingOverride: instance: ... service: ... version: ... rateLimits: maxConcurrentDispatches: ... maxDispatchesPerSecond: ... retryConfig: maxAttempts: ... maxBackoff: ... maxDoublings: ... maxRetryDuration: ... minBackoff: ... stackdriverLoggingConfig: samplingRatio: ... result: createResult
JSON
[ { "create": { "call": "googleapis.cloudtasks.v2.projects.locations.queues.create", "args": { "parent": "...", "body": { "appEngineRoutingOverride": { "instance": "...", "service": "...", "version": "..." }, "rateLimits": { "maxConcurrentDispatches": "...", "maxDispatchesPerSecond": "..." }, "retryConfig": { "maxAttempts": "...", "maxBackoff": "...", "maxDoublings": "...", "maxRetryDuration": "...", "minBackoff": "..." }, "stackdriverLoggingConfig": { "samplingRatio": "..." } } }, "result": "createResult" } } ]