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

github.getOrganizationRoles

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

    Lookup all custom roles in an organization.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getOrganizationRoles({});
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_organization_roles()
    
    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.GetOrganizationRoles(ctx, map[string]interface{}{}, 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.GetOrganizationRoles.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.GithubFunctions;
    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.getOrganizationRoles(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: github:getOrganizationRoles
          arguments: {}
    

    Nested Schema for roles

    Read-Only

    • role_id (Number) The ID of the organization role.
    • name (String) The name of the organization role.
    • description (String) The description of the organization role.
    • source (String) The source of this role; one of Predefined, Organization, or Enterprise.
    • base_role (String) The system role from which this role inherits permissions.
    • permissions (Set of String) The permissions included in this role.

    Using getOrganizationRoles

    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 getOrganizationRoles(opts?: InvokeOptions): Promise<GetOrganizationRolesResult>
    function getOrganizationRolesOutput(opts?: InvokeOptions): Output<GetOrganizationRolesResult>
    def get_organization_roles(opts: Optional[InvokeOptions] = None) -> GetOrganizationRolesResult
    def get_organization_roles_output(opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationRolesResult]
    func GetOrganizationRoles(ctx *Context, opts ...InvokeOption) (*GetOrganizationRolesResult, error)
    func GetOrganizationRolesOutput(ctx *Context, opts ...InvokeOption) GetOrganizationRolesResultOutput

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

    public static class GetOrganizationRoles 
    {
        public static Task<GetOrganizationRolesResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetOrganizationRolesResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrganizationRolesResult> getOrganizationRoles(InvokeOptions options)
    public static Output<GetOrganizationRolesResult> getOrganizationRoles(InvokeOptions options)
    
    fn::invoke:
      function: github:index/getOrganizationRoles:getOrganizationRoles
      arguments:
        # arguments dictionary

    getOrganizationRoles Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Roles List<GetOrganizationRolesRole>
    (Set of Object, see schema) Available organization roles.
    Id string
    The provider-assigned unique ID for this managed resource.
    Roles []GetOrganizationRolesRole
    (Set of Object, see schema) Available organization roles.
    id String
    The provider-assigned unique ID for this managed resource.
    roles List<GetOrganizationRolesRole>
    (Set of Object, see schema) Available organization roles.
    id string
    The provider-assigned unique ID for this managed resource.
    roles GetOrganizationRolesRole[]
    (Set of Object, see schema) Available organization roles.
    id str
    The provider-assigned unique ID for this managed resource.
    roles Sequence[GetOrganizationRolesRole]
    (Set of Object, see schema) Available organization roles.
    id String
    The provider-assigned unique ID for this managed resource.
    roles List<Property Map>
    (Set of Object, see schema) Available organization roles.

    Supporting Types

    GetOrganizationRolesRole

    BaseRole string
    The system role from which this role inherits permissions.
    Description string
    The description of the organization role.
    Name string
    The name of the organization role.
    Permissions List<string>
    A list of permissions included in this role.
    RoleId int
    The ID of the organization role.
    Source string
    The source of this role; one of Predefined, Organization, or Enterprise.
    BaseRole string
    The system role from which this role inherits permissions.
    Description string
    The description of the organization role.
    Name string
    The name of the organization role.
    Permissions []string
    A list of permissions included in this role.
    RoleId int
    The ID of the organization role.
    Source string
    The source of this role; one of Predefined, Organization, or Enterprise.
    baseRole String
    The system role from which this role inherits permissions.
    description String
    The description of the organization role.
    name String
    The name of the organization role.
    permissions List<String>
    A list of permissions included in this role.
    roleId Integer
    The ID of the organization role.
    source String
    The source of this role; one of Predefined, Organization, or Enterprise.
    baseRole string
    The system role from which this role inherits permissions.
    description string
    The description of the organization role.
    name string
    The name of the organization role.
    permissions string[]
    A list of permissions included in this role.
    roleId number
    The ID of the organization role.
    source string
    The source of this role; one of Predefined, Organization, or Enterprise.
    base_role str
    The system role from which this role inherits permissions.
    description str
    The description of the organization role.
    name str
    The name of the organization role.
    permissions Sequence[str]
    A list of permissions included in this role.
    role_id int
    The ID of the organization role.
    source str
    The source of this role; one of Predefined, Organization, or Enterprise.
    baseRole String
    The system role from which this role inherits permissions.
    description String
    The description of the organization role.
    name String
    The name of the organization role.
    permissions List<String>
    A list of permissions included in this role.
    roleId Number
    The ID of the organization role.
    source String
    The source of this role; one of Predefined, Organization, or Enterprise.

    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