1. Packages
  2. GitHub
  3. API Docs
  4. getOrganizationCustomRole
GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi

github.getOrganizationCustomRole

Explore with Pulumi AI

github logo
GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi

    Use this data source to retrieve information about a custom role in a GitHub Organization.

    Note: Custom roles are currently only available in GitHub Enterprise Cloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getOrganizationCustomRole({
        name: "example",
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_organization_custom_role(name="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.LookupOrganizationCustomRole(ctx, &github.LookupOrganizationCustomRoleArgs{
    			Name: "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.GetOrganizationCustomRole.Invoke(new()
        {
            Name = "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.GetOrganizationCustomRoleArgs;
    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.getOrganizationCustomRole(GetOrganizationCustomRoleArgs.builder()
                .name("example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: github:getOrganizationCustomRole
          Arguments:
            name: example
    

    Using getOrganizationCustomRole

    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 getOrganizationCustomRole(args: GetOrganizationCustomRoleArgs, opts?: InvokeOptions): Promise<GetOrganizationCustomRoleResult>
    function getOrganizationCustomRoleOutput(args: GetOrganizationCustomRoleOutputArgs, opts?: InvokeOptions): Output<GetOrganizationCustomRoleResult>
    def get_organization_custom_role(name: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetOrganizationCustomRoleResult
    def get_organization_custom_role_output(name: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationCustomRoleResult]
    func LookupOrganizationCustomRole(ctx *Context, args *LookupOrganizationCustomRoleArgs, opts ...InvokeOption) (*LookupOrganizationCustomRoleResult, error)
    func LookupOrganizationCustomRoleOutput(ctx *Context, args *LookupOrganizationCustomRoleOutputArgs, opts ...InvokeOption) LookupOrganizationCustomRoleResultOutput

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

    public static class GetOrganizationCustomRole 
    {
        public static Task<GetOrganizationCustomRoleResult> InvokeAsync(GetOrganizationCustomRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationCustomRoleResult> Invoke(GetOrganizationCustomRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrganizationCustomRoleResult> getOrganizationCustomRole(GetOrganizationCustomRoleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: github:index/getOrganizationCustomRole:getOrganizationCustomRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the custom role.
    Name string
    The name of the custom role.
    name String
    The name of the custom role.
    name string
    The name of the custom role.
    name str
    The name of the custom role.
    name String
    The name of the custom role.

    getOrganizationCustomRole Result

    The following output properties are available:

    BaseRole string
    The system role from which the role inherits permissions.
    Description string
    The description for the custom role.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Permissions List<string>
    A list of additional permissions included in this role.
    BaseRole string
    The system role from which the role inherits permissions.
    Description string
    The description for the custom role.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Permissions []string
    A list of additional permissions included in this role.
    baseRole String
    The system role from which the role inherits permissions.
    description String
    The description for the custom role.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    permissions List<String>
    A list of additional permissions included in this role.
    baseRole string
    The system role from which the role inherits permissions.
    description string
    The description for the custom role.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    permissions string[]
    A list of additional permissions included in this role.
    base_role str
    The system role from which the role inherits permissions.
    description str
    The description for the custom role.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    permissions Sequence[str]
    A list of additional permissions included in this role.
    baseRole String
    The system role from which the role inherits permissions.
    description String
    The description for the custom role.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    permissions List<String>
    A list of additional permissions included in this role.

    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.2.2 published on Tuesday, Jun 18, 2024 by Pulumi