1. Packages
  2. Prefect Provider
  3. API Docs
  4. getTeam
prefect 2.24.1 published on Tuesday, Apr 15, 2025 by prefecthq

prefect.getTeam

Explore with Pulumi AI

prefect 2.24.1 published on Tuesday, Apr 15, 2025 by prefecthq

Get information about an existing Team by their name.
Use this data source to obtain team IDs to manage Workspace Access.
For more information, see manage teams.

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

Example Usage

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

const myTeam = prefect.getTeam({
    name: "my-team",
});
Copy
import pulumi
import pulumi_prefect as prefect

my_team = prefect.get_team(name="my-team")
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.LookupTeam(ctx, &prefect.LookupTeamArgs{
			Name: pulumi.StringRef("my-team"),
		}, 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 myTeam = Prefect.GetTeam.Invoke(new()
    {
        Name = "my-team",
    });

});
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.GetTeamArgs;
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 myTeam = PrefectFunctions.getTeam(GetTeamArgs.builder()
            .name("my-team")
            .build());

    }
}
Copy
variables:
  myTeam:
    fn::invoke:
      function: prefect:getTeam
      arguments:
        name: my-team
Copy

Using getTeam

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 getTeam(args: GetTeamArgs, opts?: InvokeOptions): Promise<GetTeamResult>
function getTeamOutput(args: GetTeamOutputArgs, opts?: InvokeOptions): Output<GetTeamResult>
Copy
def get_team(account_id: Optional[str] = None,
             name: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetTeamResult
def get_team_output(account_id: Optional[pulumi.Input[str]] = None,
             name: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetTeamResult]
Copy
func LookupTeam(ctx *Context, args *LookupTeamArgs, opts ...InvokeOption) (*LookupTeamResult, error)
func LookupTeamOutput(ctx *Context, args *LookupTeamOutputArgs, opts ...InvokeOption) LookupTeamResultOutput
Copy

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

public static class GetTeam 
{
    public static Task<GetTeamResult> InvokeAsync(GetTeamArgs args, InvokeOptions? opts = null)
    public static Output<GetTeamResult> Invoke(GetTeamInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTeamResult> getTeam(GetTeamArgs args, InvokeOptions options)
public static Output<GetTeamResult> getTeam(GetTeamArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: prefect:index/getTeam:getTeam
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountId string
Account ID (UUID), defaults to the account set in the provider
Name string
Name of Team
AccountId string
Account ID (UUID), defaults to the account set in the provider
Name string
Name of Team
accountId String
Account ID (UUID), defaults to the account set in the provider
name String
Name of Team
accountId string
Account ID (UUID), defaults to the account set in the provider
name string
Name of Team
account_id str
Account ID (UUID), defaults to the account set in the provider
name str
Name of Team
accountId String
Account ID (UUID), defaults to the account set in the provider
name String
Name of Team

getTeam Result

The following output properties are available:

Created string
Date and time of the team creation in RFC 3339 format
Description string
Description of team
Id string
Team ID (UUID)
Name string
Name of Team
Updated string
Date and time that the team was last updated in RFC 3339 format
AccountId string
Account ID (UUID), defaults to the account set in the provider
Created string
Date and time of the team creation in RFC 3339 format
Description string
Description of team
Id string
Team ID (UUID)
Name string
Name of Team
Updated string
Date and time that the team was last updated in RFC 3339 format
AccountId string
Account ID (UUID), defaults to the account set in the provider
created String
Date and time of the team creation in RFC 3339 format
description String
Description of team
id String
Team ID (UUID)
name String
Name of Team
updated String
Date and time that the team was last updated in RFC 3339 format
accountId String
Account ID (UUID), defaults to the account set in the provider
created string
Date and time of the team creation in RFC 3339 format
description string
Description of team
id string
Team ID (UUID)
name string
Name of Team
updated string
Date and time that the team was last updated in RFC 3339 format
accountId string
Account ID (UUID), defaults to the account set in the provider
created str
Date and time of the team creation in RFC 3339 format
description str
Description of team
id str
Team ID (UUID)
name str
Name of Team
updated str
Date and time that the team was last updated in RFC 3339 format
account_id str
Account ID (UUID), defaults to the account set in the provider
created String
Date and time of the team creation in RFC 3339 format
description String
Description of team
id String
Team ID (UUID)
name String
Name of Team
updated String
Date and time that the team was last updated in RFC 3339 format
accountId String
Account ID (UUID), defaults to the account 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.1 published on Tuesday, Apr 15, 2025 by prefecthq