1. Packages
  2. Prefect Provider
  3. API Docs
  4. getWorkQueue
prefect 2.24.0 published on Wednesday, Apr 2, 2025 by prefecthq

prefect.getWorkQueue

Explore with Pulumi AI

prefect 2.24.0 published on Wednesday, Apr 2, 2025 by prefecthq

Get information about an existing Work Queue by name.
Use this data source to obtain Work Queue-specific attributes.
For more information, see work queues.

This feature is available in the following product plan(s): Prefect OSS, Prefect Cloud (Free), Prefect Cloud (Pro), Prefect Cloud (Enterprise).

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as prefect from "@pulumi/prefect";

const example = prefect.getWorkQueue({
    name: "my-work-pool",
    workPoolName: "my-work-queue",
    workspaceId: prefect_workspace.example.id,
});
Copy
import pulumi
import pulumi_prefect as prefect

example = prefect.get_work_queue(name="my-work-pool",
    work_pool_name="my-work-queue",
    workspace_id=prefect_workspace["example"]["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/prefect/v2/prefect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := prefect.LookupWorkQueue(ctx, &prefect.LookupWorkQueueArgs{
			Name:         pulumi.StringRef("my-work-pool"),
			WorkPoolName: "my-work-queue",
			WorkspaceId:  pulumi.StringRef(prefect_workspace.Example.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Prefect = Pulumi.Prefect;

return await Deployment.RunAsync(() => 
{
    var example = Prefect.GetWorkQueue.Invoke(new()
    {
        Name = "my-work-pool",
        WorkPoolName = "my-work-queue",
        WorkspaceId = prefect_workspace.Example.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.prefect.PrefectFunctions;
import com.pulumi.prefect.inputs.GetWorkQueueArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = PrefectFunctions.getWorkQueue(GetWorkQueueArgs.builder()
            .name("my-work-pool")
            .workPoolName("my-work-queue")
            .workspaceId(prefect_workspace.example().id())
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: prefect:getWorkQueue
      arguments:
        name: my-work-pool
        workPoolName: my-work-queue
        workspaceId: ${prefect_workspace.example.id}
Copy

Using getWorkQueue

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getWorkQueue(args: GetWorkQueueArgs, opts?: InvokeOptions): Promise<GetWorkQueueResult>
function getWorkQueueOutput(args: GetWorkQueueOutputArgs, opts?: InvokeOptions): Output<GetWorkQueueResult>
Copy
def get_work_queue(account_id: Optional[str] = None,
                   concurrency_limit: Optional[float] = None,
                   description: Optional[str] = None,
                   id: Optional[str] = None,
                   name: Optional[str] = None,
                   work_pool_name: Optional[str] = None,
                   workspace_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetWorkQueueResult
def get_work_queue_output(account_id: Optional[pulumi.Input[str]] = None,
                   concurrency_limit: Optional[pulumi.Input[float]] = None,
                   description: Optional[pulumi.Input[str]] = None,
                   id: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   work_pool_name: Optional[pulumi.Input[str]] = None,
                   workspace_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetWorkQueueResult]
Copy
func LookupWorkQueue(ctx *Context, args *LookupWorkQueueArgs, opts ...InvokeOption) (*LookupWorkQueueResult, error)
func LookupWorkQueueOutput(ctx *Context, args *LookupWorkQueueOutputArgs, opts ...InvokeOption) LookupWorkQueueResultOutput
Copy

> Note: This function is named LookupWorkQueue in the Go SDK.

public static class GetWorkQueue 
{
    public static Task<GetWorkQueueResult> InvokeAsync(GetWorkQueueArgs args, InvokeOptions? opts = null)
    public static Output<GetWorkQueueResult> Invoke(GetWorkQueueInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetWorkQueueResult> getWorkQueue(GetWorkQueueArgs args, InvokeOptions options)
public static Output<GetWorkQueueResult> getWorkQueue(GetWorkQueueArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: prefect:index/getWorkQueue:getWorkQueue
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

WorkPoolName This property is required. string
Name of the associated work pool
AccountId string
Account ID (UUID), defaults to the account set in the provider
ConcurrencyLimit double
The concurrency limit applied to this work queue
Description string
Description of the work queue
Id string
Work queue ID (UUID)
Name string
Name of the work queue
WorkspaceId string
Workspace ID (UUID), defaults to the workspace set in the provider
WorkPoolName This property is required. string
Name of the associated work pool
AccountId string
Account ID (UUID), defaults to the account set in the provider
ConcurrencyLimit float64
The concurrency limit applied to this work queue
Description string
Description of the work queue
Id string
Work queue ID (UUID)
Name string
Name of the work queue
WorkspaceId string
Workspace ID (UUID), defaults to the workspace set in the provider
workPoolName This property is required. String
Name of the associated work pool
accountId String
Account ID (UUID), defaults to the account set in the provider
concurrencyLimit Double
The concurrency limit applied to this work queue
description String
Description of the work queue
id String
Work queue ID (UUID)
name String
Name of the work queue
workspaceId String
Workspace ID (UUID), defaults to the workspace set in the provider
workPoolName This property is required. string
Name of the associated work pool
accountId string
Account ID (UUID), defaults to the account set in the provider
concurrencyLimit number
The concurrency limit applied to this work queue
description string
Description of the work queue
id string
Work queue ID (UUID)
name string
Name of the work queue
workspaceId string
Workspace ID (UUID), defaults to the workspace set in the provider
work_pool_name This property is required. str
Name of the associated work pool
account_id str
Account ID (UUID), defaults to the account set in the provider
concurrency_limit float
The concurrency limit applied to this work queue
description str
Description of the work queue
id str
Work queue ID (UUID)
name str
Name of the work queue
workspace_id str
Workspace ID (UUID), defaults to the workspace set in the provider
workPoolName This property is required. String
Name of the associated work pool
accountId String
Account ID (UUID), defaults to the account set in the provider
concurrencyLimit Number
The concurrency limit applied to this work queue
description String
Description of the work queue
id String
Work queue ID (UUID)
name String
Name of the work queue
workspaceId String
Workspace ID (UUID), defaults to the workspace set in the provider

getWorkQueue Result

The following output properties are available:

ConcurrencyLimit double
The concurrency limit applied to this work queue
Created string
Date and time of the work queue creation in RFC 3339 format
Description string
Description of the work queue
Id string
Work queue ID (UUID)
IsPaused bool
Whether this work queue is paused
Name string
Name of the work queue
Priority double
Priority of the work queue
Updated string
Date and time that the work queue was last updated in RFC 3339 format
WorkPoolName string
Name of the associated work pool
AccountId string
Account ID (UUID), defaults to the account set in the provider
WorkspaceId string
Workspace ID (UUID), defaults to the workspace set in the provider
ConcurrencyLimit float64
The concurrency limit applied to this work queue
Created string
Date and time of the work queue creation in RFC 3339 format
Description string
Description of the work queue
Id string
Work queue ID (UUID)
IsPaused bool
Whether this work queue is paused
Name string
Name of the work queue
Priority float64
Priority of the work queue
Updated string
Date and time that the work queue was last updated in RFC 3339 format
WorkPoolName string
Name of the associated work pool
AccountId string
Account ID (UUID), defaults to the account set in the provider
WorkspaceId string
Workspace ID (UUID), defaults to the workspace set in the provider
concurrencyLimit Double
The concurrency limit applied to this work queue
created String
Date and time of the work queue creation in RFC 3339 format
description String
Description of the work queue
id String
Work queue ID (UUID)
isPaused Boolean
Whether this work queue is paused
name String
Name of the work queue
priority Double
Priority of the work queue
updated String
Date and time that the work queue was last updated in RFC 3339 format
workPoolName String
Name of the associated work pool
accountId String
Account ID (UUID), defaults to the account set in the provider
workspaceId String
Workspace ID (UUID), defaults to the workspace set in the provider
concurrencyLimit number
The concurrency limit applied to this work queue
created string
Date and time of the work queue creation in RFC 3339 format
description string
Description of the work queue
id string
Work queue ID (UUID)
isPaused boolean
Whether this work queue is paused
name string
Name of the work queue
priority number
Priority of the work queue
updated string
Date and time that the work queue was last updated in RFC 3339 format
workPoolName string
Name of the associated work pool
accountId string
Account ID (UUID), defaults to the account set in the provider
workspaceId string
Workspace ID (UUID), defaults to the workspace set in the provider
concurrency_limit float
The concurrency limit applied to this work queue
created str
Date and time of the work queue creation in RFC 3339 format
description str
Description of the work queue
id str
Work queue ID (UUID)
is_paused bool
Whether this work queue is paused
name str
Name of the work queue
priority float
Priority of the work queue
updated str
Date and time that the work queue was last updated in RFC 3339 format
work_pool_name str
Name of the associated work pool
account_id str
Account ID (UUID), defaults to the account set in the provider
workspace_id str
Workspace ID (UUID), defaults to the workspace set in the provider
concurrencyLimit Number
The concurrency limit applied to this work queue
created String
Date and time of the work queue creation in RFC 3339 format
description String
Description of the work queue
id String
Work queue ID (UUID)
isPaused Boolean
Whether this work queue is paused
name String
Name of the work queue
priority Number
Priority of the work queue
updated String
Date and time that the work queue was last updated in RFC 3339 format
workPoolName String
Name of the associated work pool
accountId String
Account ID (UUID), defaults to the account set in the provider
workspaceId String
Workspace ID (UUID), defaults to the workspace set in the provider

Package Details

Repository
prefect prefecthq/terraform-provider-prefect
License
Notes
This Pulumi package is based on the prefect Terraform Provider.
prefect 2.24.0 published on Wednesday, Apr 2, 2025 by prefecthq