Job Queue API Reference (0.26.79)
Job Queue API Reference (0.26.79)
This is archived documentation for version 0.26.79. For the current documentation, see current documentation.
Customer-hosted cloud features
Some features are only available on customer-hosted clouds. Reach out to support@anyscale.com for info.
Job Queue CLI
anyscale job-queue list
Usage
anyscale job-queue list [OPTIONS]
List job queues.
Options
--id: ID of a job queue.--name: Filter by name.--cloud: Filter by cloud.--project: Filter by project.--include-all-users/--only-mine: Include job queues not created by current user.--cluster-status: Filter by cluster status.--tag: This option can be repeated to filter by multiple tags. Tags with the same key are ORed, whereas tags with different keys are ANDed. Example: --tag team:mlops --tag team:infra --tag env:prod. Filters with team: (mlops OR infra) AND env:prod.--view: Columns view.--page-size: Items per page (max 50).--max-items: Non-interactive max items.--sort: Sort by FIELD (prefix with '-' for desc). Repeatable.--no-interactive/--interactive: Use non-interactive batch mode instead of interactive paging.--json: JSON output.
Examples
- CLI
$ anyscale job-queue list
Output
JOB QUEUES:
ID NAME CLUSTER ID CREATOR ID MAX CONCURRENCY IDLE TIMEOUT SEC CURRENT CLUSTER STATE
jq_h8fcze2qkr8wttuuvapi1hvyuc queue_3 ses_cjr7uaf1yh2ue5uzvd11p24p4u usr_we8x7d7u8hq8mj2488ed9x47n6 3 5000 Terminated
jq_v5bx9z1sd4pbxasxhdms37j4gi queue_2 ses_k86raeu6k1t6z1bvyejn3vblad usr_we8x7d7u8hq8mj2488ed9x47n6 10 5000 Terminated
jq_ni6hk66nt3194msr7hzzj9daun queue_1 ses_uhb8a9gamtarz68kcurpjh86sa usr_we8x7d7u8hq8mj2488ed9x47n6 10 5000 Terminated
anyscale job-queue update
Usage
anyscale job-queue update [OPTIONS]
Update job queue settings.
Options
--id: ID of the job queue.--max-concurrency: Max number of concurrent jobs.--idle-timeout-s: Idle timeout in seconds.--json: JSON output.
Examples
- CLI
$ anyscale job-queue update --id jq_h8fcze2qkr8wttuuvapi1hvyuc --max-concurrency 5
Output
ID : jq_h8fcze2qkr8wttuuvapi1hvyuc
USER PROVIDED ID : queue_3
NAME : queue_3
CURRENT JOB QUEUE STATE : ACTIVE
EXECUTION MODE : PRIORITY
MAX CONCURRENCY : 5
IDLE TIMEOUT SEC : 5000
CREATED AT : 2025-04-15 20:40:44
CREATOR ID : usr_we8x7d7u8hq8mj2488ed9x47n6
CREATOR EMAIL : test@anyscale.com
COMPUTE CONFIG ID : cpt_8hzsv1t4jvb6kwjhfqbfjw5i6b
CURRENT CLUSTER STATE : Terminated
CLUSTER ID : ses_cjr7uaf1yh2ue5uzvd11p24p4u
PROJECT ID : prj_7FWKGPGPaD3Q5mvk9zK2viBD
CLOUD ID : cld_kvedZWag2qA8i5BjxUevf5i7
TOTAL JOBS : 6
SUCCESSFUL JOBS : 6
FAILED JOBS : 0
ACTIVE JOBS : 0
anyscale job-queue status
Usage
anyscale job-queue status [OPTIONS]
Show job queue details.
Options
--id: ID of the job queue.--view: Columns view.--json: JSON output.
Examples
- CLI
$ anyscale job-queue status --id jq_h8fcze2qkr8wttuuvapi1hvyuc
Output
ID : jq_h8fcze2qkr8wttuuvapi1hvyuc
USER PROVIDED ID : queue_3
NAME : queue_3
CURRENT JOB QUEUE STATE : ACTIVE
EXECUTION MODE : PRIORITY
MAX CONCURRENCY : 3
IDLE TIMEOUT SEC : 5000
CREATED AT : 2025-04-15 20:40:44
CREATOR ID : usr_we8x7d7u8hq8mj2488ed9x47n6
CREATOR EMAIL : test@anyscale.com
COMPUTE CONFIG ID : cpt_8hzsv1t4jvb6kwjhfqbfjw5i6b
CURRENT CLUSTER STATE : Terminated
CLUSTER ID : ses_cjr7uaf1yh2ue5uzvd11p24p4u
PROJECT ID : prj_7FWKGPGPaD3Q5mvk9zK2viBD
CLOUD ID : cld_kvedZWag2qA8i5BjxUevf5i7
TOTAL JOBS : 6
SUCCESSFUL JOBS : 6
FAILED JOBS : 0
ACTIVE JOBS : 0
anyscale job-queue tags add
Usage
anyscale job-queue tags add [OPTIONS]
Add or update tags on a job queue.
Options
--id: ID of a job queue.--name/-n: Name of a job queue.--tag: Tag in key=value (or key:value) format. Repeat to add multiple.
Examples
- CLI
$ anyscale job-queue tags add --name my-queue --tag team=data --tag priority=high
anyscale job-queue tags remove
Usage
anyscale job-queue tags remove [OPTIONS]
Remove tags by key from a job queue.
Options
--id: ID of a job queue.--name/-n: Name of a job queue.--key: Tag key to remove. Repeatable.
Examples
- CLI
$ anyscale job-queue tags remove --name my-queue --key team --key priority
anyscale job-queue tags list
Usage
anyscale job-queue tags list [OPTIONS]
List tags for a job queue.
Options
--id: ID of a job queue.--name/-n: Name of a job queue.--json: JSON output.
Examples
- CLI
$ anyscale job-queue tags list --name my-queue --json
Job Queue SDK
anyscale.job_queue.list
List job queues or fetch a single job queue by ID.
Arguments
job_queue_id(str | None) = None: If provided, fetches only the job queue with this ID.name(str | None) = None: Filter by job queue name.creator_id(str | None) = None: Filter by the user ID of the creator.cloud(str | None) = None: Filter by cloud name.project(str | None) = None: Filter by project name.cluster_status(str | None) = None: Filter by the state of the associated cluster.tags_filter(Dict[str, List[str]] | None) = None: Filter by tags. Accepts dict[key] -> List[values] or list['key:value'] entries.page_size(int | None) = None: Number of items per API request page.max_items(int | None) = None: Maximum total number of items to return.sorting_directives(List[str] | None) = None: List of directives to sort the results.
Returns: ResultIterator[JobQueueStatus]
Examples
- Python
import anyscale
# Example: List the first 50 job queues
for jq in anyscale.job_queue.list(max_items=50):
print(jq.id, jq.name, jq.state)
anyscale.job_queue.status
Get the status and details for a specific job queue.
Arguments
job_queue_id(str): The unique ID of the job queue.
Returns: JobQueueStatus