- gcloud alpha tasks lease - leases a list of tasks and displays them
gcloud alpha tasks lease --lease-duration=LEASE_DURATION --queue=QUEUE [--oldest-tag | --tag=TAG] [--filter=EXPRESSION] [--limit=LIMIT; default=1000] [--sort-by=[FIELD,...]] [--uri] [GCLOUD_WIDE_FLAG ...]
(ALPHA) Each task returned from this command will have its schedule time
The number of seconds for the desired new lease duration for all tasks leased,
starting from now. The maximum lease duration is 1 week.
The queue the tasks belong to.
At most one of these may be specified:
Only lease tasks which have the same tag as the task with the oldest schedule
A tag to filter each task to be leased. If a task has the tag and the task is
available to be leased, then it is listed and leased.
- At most one of these may be specified:
LIST COMMAND FLAGS
Apply a Boolean filter EXPRESSION to each resource item to be listed. If
the expression evaluates True, then that item is listed. For more details
and examples of filter expressions, run $ gcloud topic filters. This flag
interacts with other flags that are applied in this order: --flatten,
--sort-by, --filter, --limit.
- --limit=LIMIT; default=1000
The maximum number of tasks to lease. The maximum that can be requested is 1000.
Comma-separated list of resource field key names to sort by. The default order
is ascending. Prefix a field with ``~'' for descending order on that field. This
flag interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter, --limit.
Print a list of resource URIs instead of the default output.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support