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

github.OrganizationRoleTeam

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

    Manage an association between an organization role and a team.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = new github.OrganizationRoleTeam("example", {
        roleId: 1234,
        teamSlug: "example-team",
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.OrganizationRoleTeam("example",
        role_id=1234,
        team_slug="example-team")
    
    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.NewOrganizationRoleTeam(ctx, "example", &github.OrganizationRoleTeamArgs{
    			RoleId:   pulumi.Int(1234),
    			TeamSlug: pulumi.String("example-team"),
    		})
    		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 = new Github.OrganizationRoleTeam("example", new()
        {
            RoleId = 1234,
            TeamSlug = "example-team",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.OrganizationRoleTeam;
    import com.pulumi.github.OrganizationRoleTeamArgs;
    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 OrganizationRoleTeam("example", OrganizationRoleTeamArgs.builder()
                .roleId(1234)
                .teamSlug("example-team")
                .build());
    
        }
    }
    
    resources:
      example:
        type: github:OrganizationRoleTeam
        properties:
          roleId: 1234
          teamSlug: example-team
    

    Create OrganizationRoleTeam Resource

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

    Constructor syntax

    new OrganizationRoleTeam(name: string, args: OrganizationRoleTeamArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationRoleTeam(resource_name: str,
                             args: OrganizationRoleTeamArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationRoleTeam(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             role_id: Optional[int] = None,
                             team_slug: Optional[str] = None)
    func NewOrganizationRoleTeam(ctx *Context, name string, args OrganizationRoleTeamArgs, opts ...ResourceOption) (*OrganizationRoleTeam, error)
    public OrganizationRoleTeam(string name, OrganizationRoleTeamArgs args, CustomResourceOptions? opts = null)
    public OrganizationRoleTeam(String name, OrganizationRoleTeamArgs args)
    public OrganizationRoleTeam(String name, OrganizationRoleTeamArgs args, CustomResourceOptions options)
    
    type: github:OrganizationRoleTeam
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OrganizationRoleTeamArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OrganizationRoleTeamArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OrganizationRoleTeamArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationRoleTeamArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationRoleTeamArgs
    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 organizationRoleTeamResource = new Github.OrganizationRoleTeam("organizationRoleTeamResource", new()
    {
        RoleId = 0,
        TeamSlug = "string",
    });
    
    example, err := github.NewOrganizationRoleTeam(ctx, "organizationRoleTeamResource", &github.OrganizationRoleTeamArgs{
    	RoleId:   pulumi.Int(0),
    	TeamSlug: pulumi.String("string"),
    })
    
    var organizationRoleTeamResource = new OrganizationRoleTeam("organizationRoleTeamResource", OrganizationRoleTeamArgs.builder()
        .roleId(0)
        .teamSlug("string")
        .build());
    
    organization_role_team_resource = github.OrganizationRoleTeam("organizationRoleTeamResource",
        role_id=0,
        team_slug="string")
    
    const organizationRoleTeamResource = new github.OrganizationRoleTeam("organizationRoleTeamResource", {
        roleId: 0,
        teamSlug: "string",
    });
    
    type: github:OrganizationRoleTeam
    properties:
        roleId: 0
        teamSlug: string
    

    OrganizationRoleTeam 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 OrganizationRoleTeam resource accepts the following input properties:

    RoleId int
    The ID of the organization role.
    TeamSlug string
    The slug of the team name.
    RoleId int
    The ID of the organization role.
    TeamSlug string
    The slug of the team name.
    roleId Integer
    The ID of the organization role.
    teamSlug String
    The slug of the team name.
    roleId number
    The ID of the organization role.
    teamSlug string
    The slug of the team name.
    role_id int
    The ID of the organization role.
    team_slug str
    The slug of the team name.
    roleId Number
    The ID of the organization role.
    teamSlug String
    The slug of the team name.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing OrganizationRoleTeam Resource

    Get an existing OrganizationRoleTeam 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?: OrganizationRoleTeamState, opts?: CustomResourceOptions): OrganizationRoleTeam
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            role_id: Optional[int] = None,
            team_slug: Optional[str] = None) -> OrganizationRoleTeam
    func GetOrganizationRoleTeam(ctx *Context, name string, id IDInput, state *OrganizationRoleTeamState, opts ...ResourceOption) (*OrganizationRoleTeam, error)
    public static OrganizationRoleTeam Get(string name, Input<string> id, OrganizationRoleTeamState? state, CustomResourceOptions? opts = null)
    public static OrganizationRoleTeam get(String name, Output<String> id, OrganizationRoleTeamState state, CustomResourceOptions options)
    resources:  _:    type: github:OrganizationRoleTeam    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    RoleId int
    The ID of the organization role.
    TeamSlug string
    The slug of the team name.
    RoleId int
    The ID of the organization role.
    TeamSlug string
    The slug of the team name.
    roleId Integer
    The ID of the organization role.
    teamSlug String
    The slug of the team name.
    roleId number
    The ID of the organization role.
    teamSlug string
    The slug of the team name.
    role_id int
    The ID of the organization role.
    team_slug str
    The slug of the team name.
    roleId Number
    The ID of the organization role.
    teamSlug String
    The slug of the team name.

    Import

    An organization role team association can be imported using the role ID and the team slug separated by a :.

    $ pulumi import github:index/organizationRoleTeam:OrganizationRoleTeam example "1234:example-team"
    

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

    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