prefect.getWorkPool
Explore with Pulumi AI
Get information about an existing Work Pool by name.
Use this data source to obtain Work Pool-specific attributes.
For more information, see configure dynamic infrastructure with work pools.
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 myPool = prefect.getWorkPool({
    name: "my-work-pool",
});
import pulumi
import pulumi_prefect as prefect
my_pool = prefect.get_work_pool(name="my-work-pool")
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.LookupWorkPool(ctx, &prefect.LookupWorkPoolArgs{
			Name: pulumi.StringRef("my-work-pool"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Prefect = Pulumi.Prefect;
return await Deployment.RunAsync(() => 
{
    var myPool = Prefect.GetWorkPool.Invoke(new()
    {
        Name = "my-work-pool",
    });
});
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.GetWorkPoolArgs;
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 myPool = PrefectFunctions.getWorkPool(GetWorkPoolArgs.builder()
            .name("my-work-pool")
            .build());
    }
}
variables:
  myPool:
    fn::invoke:
      function: prefect:getWorkPool
      arguments:
        name: my-work-pool
Using getWorkPool
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 getWorkPool(args: GetWorkPoolArgs, opts?: InvokeOptions): Promise<GetWorkPoolResult>
function getWorkPoolOutput(args: GetWorkPoolOutputArgs, opts?: InvokeOptions): Output<GetWorkPoolResult>def get_work_pool(account_id: Optional[str] = None,
                  concurrency_limit: Optional[float] = None,
                  default_queue_id: Optional[str] = None,
                  description: Optional[str] = None,
                  id: Optional[str] = None,
                  name: Optional[str] = None,
                  workspace_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetWorkPoolResult
def get_work_pool_output(account_id: Optional[pulumi.Input[str]] = None,
                  concurrency_limit: Optional[pulumi.Input[float]] = None,
                  default_queue_id: Optional[pulumi.Input[str]] = None,
                  description: Optional[pulumi.Input[str]] = None,
                  id: Optional[pulumi.Input[str]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  workspace_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetWorkPoolResult]func LookupWorkPool(ctx *Context, args *LookupWorkPoolArgs, opts ...InvokeOption) (*LookupWorkPoolResult, error)
func LookupWorkPoolOutput(ctx *Context, args *LookupWorkPoolOutputArgs, opts ...InvokeOption) LookupWorkPoolResultOutput> Note: This function is named LookupWorkPool in the Go SDK.
public static class GetWorkPool 
{
    public static Task<GetWorkPoolResult> InvokeAsync(GetWorkPoolArgs args, InvokeOptions? opts = null)
    public static Output<GetWorkPoolResult> Invoke(GetWorkPoolInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetWorkPoolResult> getWorkPool(GetWorkPoolArgs args, InvokeOptions options)
public static Output<GetWorkPoolResult> getWorkPool(GetWorkPoolArgs args, InvokeOptions options)
fn::invoke:
  function: prefect:index/getWorkPool:getWorkPool
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AccountId string
- Account ID (UUID), defaults to the account set in the provider
- ConcurrencyLimit double
- The concurrency limit applied to this work pool
- DefaultQueue stringId 
- The ID (UUID) of the default queue associated with this work pool
- Description string
- Description of the work pool
- Id string
- Work pool ID (UUID)
- Name string
- Name of the work pool
- WorkspaceId string
- Workspace ID (UUID), defaults to the workspace set in the provider
- AccountId string
- Account ID (UUID), defaults to the account set in the provider
- ConcurrencyLimit float64
- The concurrency limit applied to this work pool
- DefaultQueue stringId 
- The ID (UUID) of the default queue associated with this work pool
- Description string
- Description of the work pool
- Id string
- Work pool ID (UUID)
- Name string
- Name of the work pool
- WorkspaceId string
- Workspace ID (UUID), defaults to the workspace set in the provider
- accountId String
- Account ID (UUID), defaults to the account set in the provider
- concurrencyLimit Double
- The concurrency limit applied to this work pool
- defaultQueue StringId 
- The ID (UUID) of the default queue associated with this work pool
- description String
- Description of the work pool
- id String
- Work pool ID (UUID)
- name String
- Name of the work pool
- workspaceId String
- Workspace ID (UUID), defaults to the workspace set in the provider
- accountId string
- Account ID (UUID), defaults to the account set in the provider
- concurrencyLimit number
- The concurrency limit applied to this work pool
- defaultQueue stringId 
- The ID (UUID) of the default queue associated with this work pool
- description string
- Description of the work pool
- id string
- Work pool ID (UUID)
- name string
- Name of the work pool
- workspaceId string
- Workspace ID (UUID), defaults to the workspace set in the provider
- account_id str
- Account ID (UUID), defaults to the account set in the provider
- concurrency_limit float
- The concurrency limit applied to this work pool
- default_queue_ strid 
- The ID (UUID) of the default queue associated with this work pool
- description str
- Description of the work pool
- id str
- Work pool ID (UUID)
- name str
- Name of the work pool
- workspace_id str
- Workspace ID (UUID), defaults to the workspace set in the provider
- accountId String
- Account ID (UUID), defaults to the account set in the provider
- concurrencyLimit Number
- The concurrency limit applied to this work pool
- defaultQueue StringId 
- The ID (UUID) of the default queue associated with this work pool
- description String
- Description of the work pool
- id String
- Work pool ID (UUID)
- name String
- Name of the work pool
- workspaceId String
- Workspace ID (UUID), defaults to the workspace set in the provider
getWorkPool Result
The following output properties are available:
- BaseJob stringTemplate 
- The base job template for the work pool, as a JSON string
- ConcurrencyLimit double
- The concurrency limit applied to this work pool
- Created string
- Date and time of the work pool creation in RFC 3339 format
- DefaultQueue stringId 
- The ID (UUID) of the default queue associated with this work pool
- Description string
- Description of the work pool
- Id string
- Work pool ID (UUID)
- Name string
- Name of the work pool
- Paused bool
- Whether this work pool is paused
- Type string
- Type of the work pool
- Updated string
- Date and time that the work pool was last updated in RFC 3339 format
- 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
- BaseJob stringTemplate 
- The base job template for the work pool, as a JSON string
- ConcurrencyLimit float64
- The concurrency limit applied to this work pool
- Created string
- Date and time of the work pool creation in RFC 3339 format
- DefaultQueue stringId 
- The ID (UUID) of the default queue associated with this work pool
- Description string
- Description of the work pool
- Id string
- Work pool ID (UUID)
- Name string
- Name of the work pool
- Paused bool
- Whether this work pool is paused
- Type string
- Type of the work pool
- Updated string
- Date and time that the work pool was last updated in RFC 3339 format
- 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
- baseJob StringTemplate 
- The base job template for the work pool, as a JSON string
- concurrencyLimit Double
- The concurrency limit applied to this work pool
- created String
- Date and time of the work pool creation in RFC 3339 format
- defaultQueue StringId 
- The ID (UUID) of the default queue associated with this work pool
- description String
- Description of the work pool
- id String
- Work pool ID (UUID)
- name String
- Name of the work pool
- paused Boolean
- Whether this work pool is paused
- type String
- Type of the work pool
- updated String
- Date and time that the work pool was last updated in RFC 3339 format
- 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
- baseJob stringTemplate 
- The base job template for the work pool, as a JSON string
- concurrencyLimit number
- The concurrency limit applied to this work pool
- created string
- Date and time of the work pool creation in RFC 3339 format
- defaultQueue stringId 
- The ID (UUID) of the default queue associated with this work pool
- description string
- Description of the work pool
- id string
- Work pool ID (UUID)
- name string
- Name of the work pool
- paused boolean
- Whether this work pool is paused
- type string
- Type of the work pool
- updated string
- Date and time that the work pool was last updated in RFC 3339 format
- 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
- base_job_ strtemplate 
- The base job template for the work pool, as a JSON string
- concurrency_limit float
- The concurrency limit applied to this work pool
- created str
- Date and time of the work pool creation in RFC 3339 format
- default_queue_ strid 
- The ID (UUID) of the default queue associated with this work pool
- description str
- Description of the work pool
- id str
- Work pool ID (UUID)
- name str
- Name of the work pool
- paused bool
- Whether this work pool is paused
- type str
- Type of the work pool
- updated str
- Date and time that the work pool was last updated in RFC 3339 format
- 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
- baseJob StringTemplate 
- The base job template for the work pool, as a JSON string
- concurrencyLimit Number
- The concurrency limit applied to this work pool
- created String
- Date and time of the work pool creation in RFC 3339 format
- defaultQueue StringId 
- The ID (UUID) of the default queue associated with this work pool
- description String
- Description of the work pool
- id String
- Work pool ID (UUID)
- name String
- Name of the work pool
- paused Boolean
- Whether this work pool is paused
- type String
- Type of the work pool
- updated String
- Date and time that the work pool was last updated in RFC 3339 format
- 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 prefectTerraform Provider.