1. Packages
  2. Github Provider
  3. API Docs
  4. getTeam
GitHub v6.11.0 published on Wednesday, Jan 21, 2026 by Pulumi
github logo
GitHub v6.11.0 published on Wednesday, Jan 21, 2026 by Pulumi

    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 dictionary

    The following arguments are supported:

    Slug string
    The team slug.
    MembershipType string
    Type of membership to be requested to fill the list of members. Can be either all (default) or immediate.
    ResultsPerPage int
    (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 (defaults to 100).

    Deprecated: This is deprecated and will be removed in a future release.

    SummaryOnly bool
    Exclude the members and repositories of the team from the returned result. Defaults to false.
    Slug string
    The team slug.
    MembershipType string
    Type of membership to be requested to fill the list of members. Can be either all (default) or immediate.
    ResultsPerPage int
    (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 (defaults to 100).

    Deprecated: This is deprecated and will be removed in a future release.

    SummaryOnly bool
    Exclude the members and repositories of the team from the returned result. Defaults to false.
    slug String
    The team slug.
    membershipType String
    Type of membership to be requested to fill the list of members. Can be either all (default) or immediate.
    resultsPerPage Integer
    (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 (defaults to 100).

    Deprecated: This is deprecated and will be removed in a future release.

    summaryOnly Boolean
    Exclude the members and repositories of the team from the returned result. Defaults to false.
    slug string
    The team slug.
    membershipType string
    Type of membership to be requested to fill the list of members. Can be either all (default) or immediate.
    resultsPerPage number
    (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 (defaults to 100).

    Deprecated: This is deprecated and will be removed in a future release.

    summaryOnly 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 (default) or immediate.
    results_per_page int
    (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 (defaults to 100).

    Deprecated: This is deprecated and will be removed in a future release.

    summary_only bool
    Exclude the members and repositories of the team from the returned result. Defaults to false.
    slug String
    The team slug.
    membershipType String
    Type of membership to be requested to fill the list of members. Can be either all (default) or immediate.
    resultsPerPage Number
    (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 (defaults to 100).

    Deprecated: This is deprecated and will be removed in a future release.

    summaryOnly 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
    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 </span>= true.
    Name string
    Team's full name.
    NodeId string
    Node ID of the team.
    NotificationSetting string
    Teams's notification setting. Can be either notifications_enabled or notifications_disabled.
    Permission string
    (DEPRECATED) The permission that new repositories will be added to the team with when none is specified.

    Deprecated: Closing down notice.

    Privacy string
    Team's privacy type. Can either be closed or secret.
    Repositories List<string>
    (DEPRECATED) List of team repositories (list of repo names). Not returned if summary_only </span>= true.

    Deprecated: Use repositories_detailed instead.

    RepositoriesDetaileds List<GetTeamRepositoriesDetailed>
    List of team repositories (each item comprises of repo_id, repo_name & role_name). Not returned if summary_only </span>= true.
    Slug string
    MembershipType string
    ResultsPerPage int

    Deprecated: This is deprecated and will be removed in a future release.

    SummaryOnly bool
    Description string
    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 </span>= true.
    Name string
    Team's full name.
    NodeId string
    Node ID of the team.
    NotificationSetting string
    Teams's notification setting. Can be either notifications_enabled or notifications_disabled.
    Permission string
    (DEPRECATED) The permission that new repositories will be added to the team with when none is specified.

    Deprecated: Closing down notice.

    Privacy string
    Team's privacy type. Can either be closed or secret.
    Repositories []string
    (DEPRECATED) List of team repositories (list of repo names). Not returned if summary_only </span>= true.

    Deprecated: Use repositories_detailed instead.

    RepositoriesDetaileds []GetTeamRepositoriesDetailed
    List of team repositories (each item comprises of repo_id, repo_name & role_name). Not returned if summary_only </span>= true.
    Slug string
    MembershipType string
    ResultsPerPage int

    Deprecated: This is deprecated and will be removed in a future release.

    SummaryOnly bool
    description String
    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 </span>= true.
    name String
    Team's full name.
    nodeId String
    Node ID of the team.
    notificationSetting String
    Teams's notification setting. Can be either notifications_enabled or notifications_disabled.
    permission String
    (DEPRECATED) The permission that new repositories will be added to the team with when none is specified.

    Deprecated: Closing down notice.

    privacy String
    Team's privacy type. Can either be closed or secret.
    repositories List<String>
    (DEPRECATED) List of team repositories (list of repo names). Not returned if summary_only </span>= true.

    Deprecated: Use repositories_detailed instead.

    repositoriesDetaileds List<GetTeamRepositoriesDetailed>
    List of team repositories (each item comprises of repo_id, repo_name & role_name). Not returned if summary_only </span>= true.
    slug String
    membershipType String
    resultsPerPage Integer

    Deprecated: This is deprecated and will be removed in a future release.

    summaryOnly Boolean
    description string
    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 </span>= true.
    name string
    Team's full name.
    nodeId string
    Node ID of the team.
    notificationSetting string
    Teams's notification setting. Can be either notifications_enabled or notifications_disabled.
    permission string
    (DEPRECATED) The permission that new repositories will be added to the team with when none is specified.

    Deprecated: Closing down notice.

    privacy string
    Team's privacy type. Can either be closed or secret.
    repositories string[]
    (DEPRECATED) List of team repositories (list of repo names). Not returned if summary_only </span>= true.

    Deprecated: Use repositories_detailed instead.

    repositoriesDetaileds GetTeamRepositoriesDetailed[]
    List of team repositories (each item comprises of repo_id, repo_name & role_name). Not returned if summary_only </span>= true.
    slug string
    membershipType string
    resultsPerPage number

    Deprecated: This is deprecated and will be removed in a future release.

    summaryOnly boolean
    description str
    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 </span>= true.
    name str
    Team's full name.
    node_id str
    Node ID of the team.
    notification_setting str
    Teams's notification setting. Can be either notifications_enabled or notifications_disabled.
    permission str
    (DEPRECATED) The permission that new repositories will be added to the team with when none is specified.

    Deprecated: Closing down notice.

    privacy str
    Team's privacy type. Can either be closed or secret.
    repositories Sequence[str]
    (DEPRECATED) List of team repositories (list of repo names). Not returned if summary_only </span>= true.

    Deprecated: Use repositories_detailed instead.

    repositories_detaileds Sequence[GetTeamRepositoriesDetailed]
    List of team repositories (each item comprises of repo_id, repo_name & role_name). Not returned if summary_only </span>= true.
    slug str
    membership_type str
    results_per_page int

    Deprecated: This is deprecated and will be removed in a future release.

    summary_only bool
    description String
    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 </span>= true.
    name String
    Team's full name.
    nodeId String
    Node ID of the team.
    notificationSetting String
    Teams's notification setting. Can be either notifications_enabled or notifications_disabled.
    permission String
    (DEPRECATED) The permission that new repositories will be added to the team with when none is specified.

    Deprecated: Closing down notice.

    privacy String
    Team's privacy type. Can either be closed or secret.
    repositories List<String>
    (DEPRECATED) List of team repositories (list of repo names). Not returned if summary_only </span>= true.

    Deprecated: Use repositories_detailed instead.

    repositoriesDetaileds List<Property Map>
    List of team repositories (each item comprises of repo_id, repo_name & role_name). Not returned if summary_only </span>= true.
    slug String
    membershipType String
    resultsPerPage Number

    Deprecated: This is deprecated and will be removed in a future release.

    summaryOnly Boolean

    Supporting Types

    GetTeamRepositoriesDetailed

    RepoId int
    RepoName string
    RoleName string
    RepoId int
    RepoName string
    RoleName string
    repoId Integer
    repoName String
    roleName String
    repoId number
    repoName string
    roleName string
    repoId Number
    repoName String
    roleName String

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.11.0 published on Wednesday, Jan 21, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate