1. Packages
  2. Packages
  3. Github Provider
  4. API Docs
  5. getOrganization
Viewing docs for GitHub v4.17.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
github logo
Viewing docs for GitHub v4.17.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this data source to retrieve basic information about a GitHub Organization.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Github.GetOrganization.Invoke(new()
        {
            Name = "github",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v4/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := github.GetOrganization(ctx, &GetOrganizationArgs{
    			Name: "github",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.GetOrganizationArgs;
    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 test = GithubFunctions.getOrganization(GetOrganizationArgs.builder()
                .name("github")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const test = pulumi.output(github.getOrganization({
        name: "github",
    }));
    
    import pulumi
    import pulumi_github as github
    
    test = github.get_organization(name="github")
    
    variables:
      test:
        Fn::Invoke:
          Function: github:getOrganization
          Arguments:
            name: github
    

    Using getOrganization

    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 getOrganization(args: GetOrganizationArgs, opts?: InvokeOptions): Promise<GetOrganizationResult>
    function getOrganizationOutput(args: GetOrganizationOutputArgs, opts?: InvokeOptions): Output<GetOrganizationResult>
    def get_organization(name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetOrganizationResult
    def get_organization_output(name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationResult]
    func GetOrganization(ctx *Context, args *GetOrganizationArgs, opts ...InvokeOption) (*GetOrganizationResult, error)
    func GetOrganizationOutput(ctx *Context, args *GetOrganizationOutputArgs, opts ...InvokeOption) GetOrganizationResultOutput

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

    public static class GetOrganization 
    {
        public static Task<GetOrganizationResult> InvokeAsync(GetOrganizationArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationResult> Invoke(GetOrganizationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrganizationResult> getOrganization(GetOrganizationArgs args, InvokeOptions options)
    public static Output<GetOrganizationResult> getOrganization(GetOrganizationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: github:index/getOrganization:getOrganization
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the organization account
    Name string
    The name of the organization account
    name String
    The name of the organization account
    name string
    The name of the organization account
    name str
    The name of the organization account
    name String
    The name of the organization account

    getOrganization Result

    The following output properties are available:

    Description string
    The description the organization account
    Id string
    The provider-assigned unique ID for this managed resource.
    Login string
    The login of the organization account
    Members List<string>
    (list) A list with the members of the organization
    Name string
    The name of the organization account
    NodeId string
    Orgname string
    Plan string
    The plan name for the organization account
    Repositories List<string>
    (list) A list with the repositories on the organization
    Description string
    The description the organization account
    Id string
    The provider-assigned unique ID for this managed resource.
    Login string
    The login of the organization account
    Members []string
    (list) A list with the members of the organization
    Name string
    The name of the organization account
    NodeId string
    Orgname string
    Plan string
    The plan name for the organization account
    Repositories []string
    (list) A list with the repositories on the organization
    description String
    The description the organization account
    id String
    The provider-assigned unique ID for this managed resource.
    login String
    The login of the organization account
    members List<String>
    (list) A list with the members of the organization
    name String
    The name of the organization account
    nodeId String
    orgname String
    plan String
    The plan name for the organization account
    repositories List<String>
    (list) A list with the repositories on the organization
    description string
    The description the organization account
    id string
    The provider-assigned unique ID for this managed resource.
    login string
    The login of the organization account
    members string[]
    (list) A list with the members of the organization
    name string
    The name of the organization account
    nodeId string
    orgname string
    plan string
    The plan name for the organization account
    repositories string[]
    (list) A list with the repositories on the organization
    description str
    The description the organization account
    id str
    The provider-assigned unique ID for this managed resource.
    login str
    The login of the organization account
    members Sequence[str]
    (list) A list with the members of the organization
    name str
    The name of the organization account
    node_id str
    orgname str
    plan str
    The plan name for the organization account
    repositories Sequence[str]
    (list) A list with the repositories on the organization
    description String
    The description the organization account
    id String
    The provider-assigned unique ID for this managed resource.
    login String
    The login of the organization account
    members List<String>
    (list) A list with the members of the organization
    name String
    The name of the organization account
    nodeId String
    orgname String
    plan String
    The plan name for the organization account
    repositories List<String>
    (list) A list with the repositories on the organization

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    Viewing docs for GitHub v4.17.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.