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:
- Account
Id string - Account ID (UUID), defaults to the account set in the provider
 - Concurrency
Limit double - The concurrency limit applied to this work pool
 - Default
Queue 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
 - Workspace
Id string - Workspace ID (UUID), defaults to the workspace set in the provider
 
- Account
Id string - Account ID (UUID), defaults to the account set in the provider
 - Concurrency
Limit float64 - The concurrency limit applied to this work pool
 - Default
Queue 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
 - Workspace
Id string - Workspace ID (UUID), defaults to the workspace set in the provider
 
- account
Id String - Account ID (UUID), defaults to the account set in the provider
 - concurrency
Limit Double - The concurrency limit applied to this work pool
 - default
Queue 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
 - workspace
Id String - Workspace ID (UUID), defaults to the workspace set in the provider
 
- account
Id string - Account ID (UUID), defaults to the account set in the provider
 - concurrency
Limit number - The concurrency limit applied to this work pool
 - default
Queue 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
 - workspace
Id 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
 
- account
Id String - Account ID (UUID), defaults to the account set in the provider
 - concurrency
Limit Number - The concurrency limit applied to this work pool
 - default
Queue 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
 - workspace
Id String - Workspace ID (UUID), defaults to the workspace set in the provider
 
getWorkPool Result
The following output properties are available:
- Base
Job stringTemplate  - The base job template for the work pool, as a JSON string
 - Concurrency
Limit double - The concurrency limit applied to this work pool
 - Created string
 - Date and time of the work pool creation in RFC 3339 format
 - Default
Queue 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
 - Account
Id string - Account ID (UUID), defaults to the account set in the provider
 - Workspace
Id string - Workspace ID (UUID), defaults to the workspace set in the provider
 
- Base
Job stringTemplate  - The base job template for the work pool, as a JSON string
 - Concurrency
Limit float64 - The concurrency limit applied to this work pool
 - Created string
 - Date and time of the work pool creation in RFC 3339 format
 - Default
Queue 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
 - Account
Id string - Account ID (UUID), defaults to the account set in the provider
 - Workspace
Id string - Workspace ID (UUID), defaults to the workspace set in the provider
 
- base
Job StringTemplate  - The base job template for the work pool, as a JSON string
 - concurrency
Limit Double - The concurrency limit applied to this work pool
 - created String
 - Date and time of the work pool creation in RFC 3339 format
 - default
Queue 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
 - account
Id String - Account ID (UUID), defaults to the account set in the provider
 - workspace
Id String - Workspace ID (UUID), defaults to the workspace set in the provider
 
- base
Job stringTemplate  - The base job template for the work pool, as a JSON string
 - concurrency
Limit number - The concurrency limit applied to this work pool
 - created string
 - Date and time of the work pool creation in RFC 3339 format
 - default
Queue 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
 - account
Id string - Account ID (UUID), defaults to the account set in the provider
 - workspace
Id 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
 
- base
Job StringTemplate  - The base job template for the work pool, as a JSON string
 - concurrency
Limit Number - The concurrency limit applied to this work pool
 - created String
 - Date and time of the work pool creation in RFC 3339 format
 - default
Queue 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
 - account
Id String - Account ID (UUID), defaults to the account set in the provider
 - workspace
Id 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.