1. Packages
  2. Github Provider
  3. API Docs
  4. getOrganizationRoleTeams
GitHub v6.8.0 published on Thursday, Oct 23, 2025 by Pulumi

github.getOrganizationRoleTeams

Get Started
github logo
GitHub v6.8.0 published on Thursday, Oct 23, 2025 by Pulumi

    Lookup all teams assigned to a custom organization role.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getOrganizationRoleTeams({
        roleId: 1234,
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_organization_role_teams(role_id=1234)
    
    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.GetOrganizationRoleTeams(ctx, &github.GetOrganizationRoleTeamsArgs{
    			RoleId: 1234,
    		}, 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.GetOrganizationRoleTeams.Invoke(new()
        {
            RoleId = 1234,
        });
    
    });
    
    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.GetOrganizationRoleTeamsArgs;
    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.getOrganizationRoleTeams(GetOrganizationRoleTeamsArgs.builder()
                .roleId(1234)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: github:getOrganizationRoleTeams
          arguments:
            roleId: 1234
    

    Nested Schema for teams

    Read-Only

    • team_id (Number) The ID of the team.
    • slug (String) The Slug of the team name.
    • name (String) The name of the team.
    • permission (String) The permission that the team will have for its repositories.

    Using getOrganizationRoleTeams

    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 getOrganizationRoleTeams(args: GetOrganizationRoleTeamsArgs, opts?: InvokeOptions): Promise<GetOrganizationRoleTeamsResult>
    function getOrganizationRoleTeamsOutput(args: GetOrganizationRoleTeamsOutputArgs, opts?: InvokeOptions): Output<GetOrganizationRoleTeamsResult>
    def get_organization_role_teams(role_id: Optional[int] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetOrganizationRoleTeamsResult
    def get_organization_role_teams_output(role_id: Optional[pulumi.Input[int]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationRoleTeamsResult]
    func GetOrganizationRoleTeams(ctx *Context, args *GetOrganizationRoleTeamsArgs, opts ...InvokeOption) (*GetOrganizationRoleTeamsResult, error)
    func GetOrganizationRoleTeamsOutput(ctx *Context, args *GetOrganizationRoleTeamsOutputArgs, opts ...InvokeOption) GetOrganizationRoleTeamsResultOutput

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

    public static class GetOrganizationRoleTeams 
    {
        public static Task<GetOrganizationRoleTeamsResult> InvokeAsync(GetOrganizationRoleTeamsArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationRoleTeamsResult> Invoke(GetOrganizationRoleTeamsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrganizationRoleTeamsResult> getOrganizationRoleTeams(GetOrganizationRoleTeamsArgs args, InvokeOptions options)
    public static Output<GetOrganizationRoleTeamsResult> getOrganizationRoleTeams(GetOrganizationRoleTeamsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: github:index/getOrganizationRoleTeams:getOrganizationRoleTeams
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RoleId int
    The ID of the organization role.
    RoleId int
    The ID of the organization role.
    roleId Integer
    The ID of the organization role.
    roleId number
    The ID of the organization role.
    role_id int
    The ID of the organization role.
    roleId Number
    The ID of the organization role.

    getOrganizationRoleTeams Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId int
    The ID of the organization role.
    Teams List<GetOrganizationRoleTeamsTeam>
    (Set of Object, see schema) Teams assigned to the organization role.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId int
    The ID of the organization role.
    Teams []GetOrganizationRoleTeamsTeam
    (Set of Object, see schema) Teams assigned to the organization role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleId Integer
    The ID of the organization role.
    teams List<GetOrganizationRoleTeamsTeam>
    (Set of Object, see schema) Teams assigned to the organization role.
    id string
    The provider-assigned unique ID for this managed resource.
    roleId number
    The ID of the organization role.
    teams GetOrganizationRoleTeamsTeam[]
    (Set of Object, see schema) Teams assigned to the organization role.
    id str
    The provider-assigned unique ID for this managed resource.
    role_id int
    The ID of the organization role.
    teams Sequence[GetOrganizationRoleTeamsTeam]
    (Set of Object, see schema) Teams assigned to the organization role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleId Number
    The ID of the organization role.
    teams List<Property Map>
    (Set of Object, see schema) Teams assigned to the organization role.

    Supporting Types

    GetOrganizationRoleTeamsTeam

    Name string
    The name of the team.
    Permission string
    The permission that the team will have for its repositories.
    Slug string
    The Slug of the team name.
    TeamId int
    The ID of the team.
    Name string
    The name of the team.
    Permission string
    The permission that the team will have for its repositories.
    Slug string
    The Slug of the team name.
    TeamId int
    The ID of the team.
    name String
    The name of the team.
    permission String
    The permission that the team will have for its repositories.
    slug String
    The Slug of the team name.
    teamId Integer
    The ID of the team.
    name string
    The name of the team.
    permission string
    The permission that the team will have for its repositories.
    slug string
    The Slug of the team name.
    teamId number
    The ID of the team.
    name str
    The name of the team.
    permission str
    The permission that the team will have for its repositories.
    slug str
    The Slug of the team name.
    team_id int
    The ID of the team.
    name String
    The name of the team.
    permission String
    The permission that the team will have for its repositories.
    slug String
    The Slug of the team name.
    teamId Number
    The ID of the team.

    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.8.0 published on Thursday, Oct 23, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate