GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi
github.getTeam
Explore with Pulumi AI
Use this data source to retrieve information about a GitHub team.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getTeam({
    slug: "example",
});
import pulumi
import pulumi_github as github
example = github.get_team(slug="example")
package main
import (
	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := github.LookupTeam(ctx, &github.LookupTeamArgs{
			Slug: "example",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() => 
{
    var example = Github.GetTeam.Invoke(new()
    {
        Slug = "example",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.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 example = GithubFunctions.getTeam(GetTeamArgs.builder()
            .slug("example")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: github:getTeam
      arguments:
        slug: example
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>def get_team(membership_type: Optional[str] = None,
             results_per_page: Optional[int] = None,
             slug: Optional[str] = None,
             summary_only: Optional[bool] = None,
             opts: Optional[InvokeOptions] = None) -> GetTeamResult
def get_team_output(membership_type: Optional[pulumi.Input[str]] = None,
             results_per_page: Optional[pulumi.Input[int]] = None,
             slug: Optional[pulumi.Input[str]] = None,
             summary_only: Optional[pulumi.Input[bool]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetTeamResult]func LookupTeam(ctx *Context, args *LookupTeamArgs, opts ...InvokeOption) (*LookupTeamResult, error)
func LookupTeamOutput(ctx *Context, args *LookupTeamOutputArgs, opts ...InvokeOption) LookupTeamResultOutput> 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)
}public static CompletableFuture<GetTeamResult> getTeam(GetTeamArgs args, InvokeOptions options)
public static Output<GetTeamResult> getTeam(GetTeamArgs args, InvokeOptions options)
fn::invoke:
  function: github:index/getTeam:getTeam
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Slug string
 - The team slug.
 - Membership
Type string - Type of membership to be requested to fill the list of members. Can be either "all" or "immediate". Default: "all"
 - Results
Per intPage  - Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to 
100. - Summary
Only bool - Exclude the members and repositories of the team from the returned result. Defaults to 
false. 
- Slug string
 - The team slug.
 - Membership
Type string - Type of membership to be requested to fill the list of members. Can be either "all" or "immediate". Default: "all"
 - Results
Per intPage  - Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to 
100. - Summary
Only bool - Exclude the members and repositories of the team from the returned result. Defaults to 
false. 
- slug String
 - The team slug.
 - membership
Type String - Type of membership to be requested to fill the list of members. Can be either "all" or "immediate". Default: "all"
 - results
Per IntegerPage  - Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to 
100. - summary
Only Boolean - Exclude the members and repositories of the team from the returned result. Defaults to 
false. 
- slug string
 - The team slug.
 - membership
Type string - Type of membership to be requested to fill the list of members. Can be either "all" or "immediate". Default: "all"
 - results
Per numberPage  - Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to 
100. - summary
Only boolean - Exclude the members and repositories of the team from the returned result. Defaults to 
false. 
- slug str
 - The team slug.
 - membership_
type str - Type of membership to be requested to fill the list of members. Can be either "all" or "immediate". Default: "all"
 - results_
per_ intpage  - Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to 
100. - summary_
only bool - Exclude the members and repositories of the team from the returned result. Defaults to 
false. 
- slug String
 - The team slug.
 - membership
Type String - Type of membership to be requested to fill the list of members. Can be either "all" or "immediate". Default: "all"
 - results
Per NumberPage  - Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to 
100. - summary
Only Boolean - Exclude the members and repositories of the team from the returned result. Defaults to 
false. 
getTeam Result
The following output properties are available:
- Description string
 - the team's description.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Members List<string>
 - List of team members (list of GitHub usernames). Not returned if 
summary_only = true - Name string
 - the team's full name.
 - Node
Id string - the Node ID of the team.
 - Permission string
 - the team's permission level.
 - Privacy string
 - the team's privacy type.
 - Repositories List<string>
 - List of team repositories (list of repo names). Not returned if 
summary_only = true - Repositories
Detaileds List<GetTeam Repositories Detailed>  - List of team repositories (list of 
repo_idandrole_name). Not returned ifsummary_only = true - Slug string
 - Membership
Type string - Results
Per intPage  - Summary
Only bool 
- Description string
 - the team's description.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Members []string
 - List of team members (list of GitHub usernames). Not returned if 
summary_only = true - Name string
 - the team's full name.
 - Node
Id string - the Node ID of the team.
 - Permission string
 - the team's permission level.
 - Privacy string
 - the team's privacy type.
 - Repositories []string
 - List of team repositories (list of repo names). Not returned if 
summary_only = true - Repositories
Detaileds []GetTeam Repositories Detailed  - List of team repositories (list of 
repo_idandrole_name). Not returned ifsummary_only = true - Slug string
 - Membership
Type string - Results
Per intPage  - Summary
Only bool 
- description String
 - the team's description.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - members List<String>
 - List of team members (list of GitHub usernames). Not returned if 
summary_only = true - name String
 - the team's full name.
 - node
Id String - the Node ID of the team.
 - permission String
 - the team's permission level.
 - privacy String
 - the team's privacy type.
 - repositories List<String>
 - List of team repositories (list of repo names). Not returned if 
summary_only = true - repositories
Detaileds List<GetTeam Repositories Detailed>  - List of team repositories (list of 
repo_idandrole_name). Not returned ifsummary_only = true - slug String
 - membership
Type String - results
Per IntegerPage  - summary
Only Boolean 
- description string
 - the team's description.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - members string[]
 - List of team members (list of GitHub usernames). Not returned if 
summary_only = true - name string
 - the team's full name.
 - node
Id string - the Node ID of the team.
 - permission string
 - the team's permission level.
 - privacy string
 - the team's privacy type.
 - repositories string[]
 - List of team repositories (list of repo names). Not returned if 
summary_only = true - repositories
Detaileds GetTeam Repositories Detailed[]  - List of team repositories (list of 
repo_idandrole_name). Not returned ifsummary_only = true - slug string
 - membership
Type string - results
Per numberPage  - summary
Only boolean 
- description str
 - the team's description.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - members Sequence[str]
 - List of team members (list of GitHub usernames). Not returned if 
summary_only = true - name str
 - the team's full name.
 - node_
id str - the Node ID of the team.
 - permission str
 - the team's permission level.
 - privacy str
 - the team's privacy type.
 - repositories Sequence[str]
 - List of team repositories (list of repo names). Not returned if 
summary_only = true - repositories_
detaileds Sequence[GetTeam Repositories Detailed]  - List of team repositories (list of 
repo_idandrole_name). Not returned ifsummary_only = true - slug str
 - membership_
type str - results_
per_ intpage  - summary_
only bool 
- description String
 - the team's description.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - members List<String>
 - List of team members (list of GitHub usernames). Not returned if 
summary_only = true - name String
 - the team's full name.
 - node
Id String - the Node ID of the team.
 - permission String
 - the team's permission level.
 - privacy String
 - the team's privacy type.
 - repositories List<String>
 - List of team repositories (list of repo names). Not returned if 
summary_only = true - repositories
Detaileds List<Property Map> - List of team repositories (list of 
repo_idandrole_name). Not returned ifsummary_only = true - slug String
 - membership
Type String - results
Per NumberPage  - summary
Only Boolean 
Supporting Types
GetTeamRepositoriesDetailed   
Package Details
- Repository
 - GitHub pulumi/pulumi-github
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
githubTerraform Provider.