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

prefect.Team

Explore with Pulumi AI

The resource team represents a Prefect Team. Teams are used to organize users and their permissions. 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 example = new prefect.Team("example", {description: "My team description"});
Copy
import pulumi
import pulumi_prefect as prefect

example = prefect.Team("example", description="My team description")
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.NewTeam(ctx, "example", &prefect.TeamArgs{
			Description: pulumi.String("My team description"),
		})
		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 = new Prefect.Team("example", new()
    {
        Description = "My team description",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.prefect.Team;
import com.pulumi.prefect.TeamArgs;
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) {
        var example = new Team("example", TeamArgs.builder()
            .description("My team description")
            .build());

    }
}
Copy
resources:
  example:
    type: prefect:Team
    properties:
      description: My team description
Copy

Create Team Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Team(name: string, args?: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
         args: Optional[TeamArgs] = None,
         opts: Optional[ResourceOptions] = None)

@overload
def Team(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         account_id: Optional[str] = None,
         description: Optional[str] = None,
         name: Optional[str] = None)
func NewTeam(ctx *Context, name string, args *TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs? args = null, CustomResourceOptions? opts = null)
public Team(String name, TeamArgs args)
public Team(String name, TeamArgs args, CustomResourceOptions options)
type: prefect:Team
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TeamArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var teamResource = new Prefect.Team("teamResource", new()
{
    AccountId = "string",
    Description = "string",
    Name = "string",
});
Copy
example, err := prefect.NewTeam(ctx, "teamResource", &prefect.TeamArgs{
AccountId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var teamResource = new Team("teamResource", TeamArgs.builder()
    .accountId("string")
    .description("string")
    .name("string")
    .build());
Copy
team_resource = prefect.Team("teamResource",
    account_id="string",
    description="string",
    name="string")
Copy
const teamResource = new prefect.Team("teamResource", {
    accountId: "string",
    description: "string",
    name: "string",
});
Copy
type: prefect:Team
properties:
    accountId: string
    description: string
    name: string
Copy

Team Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Team resource accepts the following input properties:

AccountId string
Account ID (UUID)
Description string
Description of the team
Name string
Unique name of the team
AccountId string
Account ID (UUID)
Description string
Description of the team
Name string
Unique name of the team
accountId String
Account ID (UUID)
description String
Description of the team
name String
Unique name of the team
accountId string
Account ID (UUID)
description string
Description of the team
name string
Unique name of the team
account_id str
Account ID (UUID)
description str
Description of the team
name str
Unique name of the team
accountId String
Account ID (UUID)
description String
Description of the team
name String
Unique name of the team

Outputs

All input properties are implicitly available as output properties. Additionally, the Team resource produces the following output properties:

Created string
Timestamp of when the team was created (RFC3339)
Id string
The provider-assigned unique ID for this managed resource.
Updated string
Timestamp of when the team was updated (RFC3339)
Created string
Timestamp of when the team was created (RFC3339)
Id string
The provider-assigned unique ID for this managed resource.
Updated string
Timestamp of when the team was updated (RFC3339)
created String
Timestamp of when the team was created (RFC3339)
id String
The provider-assigned unique ID for this managed resource.
updated String
Timestamp of when the team was updated (RFC3339)
created string
Timestamp of when the team was created (RFC3339)
id string
The provider-assigned unique ID for this managed resource.
updated string
Timestamp of when the team was updated (RFC3339)
created str
Timestamp of when the team was created (RFC3339)
id str
The provider-assigned unique ID for this managed resource.
updated str
Timestamp of when the team was updated (RFC3339)
created String
Timestamp of when the team was created (RFC3339)
id String
The provider-assigned unique ID for this managed resource.
updated String
Timestamp of when the team was updated (RFC3339)

Look up Existing Team Resource

Get an existing Team resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        created: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        updated: Optional[str] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
public static Team get(String name, Output<String> id, TeamState state, CustomResourceOptions options)
resources:  _:    type: prefect:Team    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccountId string
Account ID (UUID)
Created string
Timestamp of when the team was created (RFC3339)
Description string
Description of the team
Name string
Unique name of the team
Updated string
Timestamp of when the team was updated (RFC3339)
AccountId string
Account ID (UUID)
Created string
Timestamp of when the team was created (RFC3339)
Description string
Description of the team
Name string
Unique name of the team
Updated string
Timestamp of when the team was updated (RFC3339)
accountId String
Account ID (UUID)
created String
Timestamp of when the team was created (RFC3339)
description String
Description of the team
name String
Unique name of the team
updated String
Timestamp of when the team was updated (RFC3339)
accountId string
Account ID (UUID)
created string
Timestamp of when the team was created (RFC3339)
description string
Description of the team
name string
Unique name of the team
updated string
Timestamp of when the team was updated (RFC3339)
account_id str
Account ID (UUID)
created str
Timestamp of when the team was created (RFC3339)
description str
Description of the team
name str
Unique name of the team
updated str
Timestamp of when the team was updated (RFC3339)
accountId String
Account ID (UUID)
created String
Timestamp of when the team was created (RFC3339)
description String
Description of the team
name String
Unique name of the team
updated String
Timestamp of when the team was updated (RFC3339)

Import

Prefect Teams can be imported via id id

$ pulumi import prefect:index/team:Team example 00000000-0000-0000-0000-000000000000
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
prefect prefecthq/terraform-provider-prefect
License
Notes
This Pulumi package is based on the prefect Terraform Provider.