prefect.getWorkPools
Explore with Pulumi AI
Get information about an multiple Work Pools.
Use this data source to search for multiple Work Pools. Defaults to fetching all Work Pools in the Workspace.
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 allPools = prefect.getWorkPools({});
import pulumi
import pulumi_prefect as prefect
all_pools = prefect.get_work_pools()
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.GetWorkPools(ctx, &prefect.GetWorkPoolsArgs{}, 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 allPools = Prefect.GetWorkPools.Invoke();
});
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.GetWorkPoolsArgs;
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 allPools = PrefectFunctions.getWorkPools();
    }
}
variables:
  allPools:
    fn::invoke:
      function: prefect:getWorkPools
      arguments: {}
Using getWorkPools
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 getWorkPools(args: GetWorkPoolsArgs, opts?: InvokeOptions): Promise<GetWorkPoolsResult>
function getWorkPoolsOutput(args: GetWorkPoolsOutputArgs, opts?: InvokeOptions): Output<GetWorkPoolsResult>def get_work_pools(account_id: Optional[str] = None,
                   filter_anies: Optional[Sequence[str]] = None,
                   workspace_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetWorkPoolsResult
def get_work_pools_output(account_id: Optional[pulumi.Input[str]] = None,
                   filter_anies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                   workspace_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetWorkPoolsResult]func GetWorkPools(ctx *Context, args *GetWorkPoolsArgs, opts ...InvokeOption) (*GetWorkPoolsResult, error)
func GetWorkPoolsOutput(ctx *Context, args *GetWorkPoolsOutputArgs, opts ...InvokeOption) GetWorkPoolsResultOutput> Note: This function is named GetWorkPools in the Go SDK.
public static class GetWorkPools 
{
    public static Task<GetWorkPoolsResult> InvokeAsync(GetWorkPoolsArgs args, InvokeOptions? opts = null)
    public static Output<GetWorkPoolsResult> Invoke(GetWorkPoolsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetWorkPoolsResult> getWorkPools(GetWorkPoolsArgs args, InvokeOptions options)
public static Output<GetWorkPoolsResult> getWorkPools(GetWorkPoolsArgs args, InvokeOptions options)
fn::invoke:
  function: prefect:index/getWorkPools:getWorkPools
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AccountId string
- Account ID (UUID), defaults to the account set in the provider
- FilterAnies List<string>
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- 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
- FilterAnies []string
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- 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
- filterAnies List<String>
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- 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
- filterAnies string[]
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- 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
- filter_anies Sequence[str]
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- 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
- filterAnies List<String>
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- workspaceId String
- Workspace ID (UUID), defaults to the workspace set in the provider
getWorkPools Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- WorkPools List<GetWork Pools Work Pool> 
- Work pools returned by the server
- AccountId string
- Account ID (UUID), defaults to the account set in the provider
- FilterAnies List<string>
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- WorkspaceId string
- Workspace ID (UUID), defaults to the workspace set in the provider
- Id string
- The provider-assigned unique ID for this managed resource.
- WorkPools []GetWork Pools Work Pool 
- Work pools returned by the server
- AccountId string
- Account ID (UUID), defaults to the account set in the provider
- FilterAnies []string
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- WorkspaceId string
- Workspace ID (UUID), defaults to the workspace set in the provider
- id String
- The provider-assigned unique ID for this managed resource.
- workPools List<GetWork Pools Work Pool> 
- Work pools returned by the server
- accountId String
- Account ID (UUID), defaults to the account set in the provider
- filterAnies List<String>
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- workspaceId String
- Workspace ID (UUID), defaults to the workspace set in the provider
- id string
- The provider-assigned unique ID for this managed resource.
- workPools GetWork Pools Work Pool[] 
- Work pools returned by the server
- accountId string
- Account ID (UUID), defaults to the account set in the provider
- filterAnies string[]
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- workspaceId string
- Workspace ID (UUID), defaults to the workspace set in the provider
- id str
- The provider-assigned unique ID for this managed resource.
- work_pools Sequence[GetWork Pools Work Pool] 
- Work pools returned by the server
- account_id str
- Account ID (UUID), defaults to the account set in the provider
- filter_anies Sequence[str]
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- workspace_id str
- Workspace ID (UUID), defaults to the workspace set in the provider
- id String
- The provider-assigned unique ID for this managed resource.
- workPools List<Property Map>
- Work pools returned by the server
- accountId String
- Account ID (UUID), defaults to the account set in the provider
- filterAnies List<String>
- Work pool IDs (UUID) to search for (work pools with any matching UUID are returned)
- workspaceId String
- Workspace ID (UUID), defaults to the workspace set in the provider
Supporting Types
GetWorkPoolsWorkPool    
- 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
- 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
- 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
- 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
- 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
- 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
Package Details
- Repository
- prefect prefecthq/terraform-provider-prefect
- License
- Notes
- This Pulumi package is based on the prefectTerraform Provider.