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

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

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Github.GetEnterprise.Invoke(new()
        {
            Slug = "example-co",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v5/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := github.GetEnterprise(ctx, &github.GetEnterpriseArgs{
    			Slug: "example-co",
    		}, 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.GetEnterpriseArgs;
    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.getEnterprise(GetEnterpriseArgs.builder()
                .slug("example-co")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getEnterprise({
        slug: "example-co",
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_enterprise(slug="example-co")
    
    variables:
      example:
        fn::invoke:
          Function: github:getEnterprise
          Arguments:
            slug: example-co
    

    Using getEnterprise

    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 getEnterprise(args: GetEnterpriseArgs, opts?: InvokeOptions): Promise<GetEnterpriseResult>
    function getEnterpriseOutput(args: GetEnterpriseOutputArgs, opts?: InvokeOptions): Output<GetEnterpriseResult>
    def get_enterprise(slug: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetEnterpriseResult
    def get_enterprise_output(slug: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetEnterpriseResult]
    func GetEnterprise(ctx *Context, args *GetEnterpriseArgs, opts ...InvokeOption) (*GetEnterpriseResult, error)
    func GetEnterpriseOutput(ctx *Context, args *GetEnterpriseOutputArgs, opts ...InvokeOption) GetEnterpriseResultOutput

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

    public static class GetEnterprise 
    {
        public static Task<GetEnterpriseResult> InvokeAsync(GetEnterpriseArgs args, InvokeOptions? opts = null)
        public static Output<GetEnterpriseResult> Invoke(GetEnterpriseInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnterpriseResult> getEnterprise(GetEnterpriseArgs args, InvokeOptions options)
    public static Output<GetEnterpriseResult> getEnterprise(GetEnterpriseArgs args, InvokeOptions options)
    
    fn::invoke:
      function: github:index/getEnterprise:getEnterprise
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Slug string
    The URL slug identifying the enterprise.
    Slug string
    The URL slug identifying the enterprise.
    slug String
    The URL slug identifying the enterprise.
    slug string
    The URL slug identifying the enterprise.
    slug str
    The URL slug identifying the enterprise.
    slug String
    The URL slug identifying the enterprise.

    getEnterprise Result

    The following output properties are available:

    CreatedAt string
    The time the enterprise was created.
    Description string
    The description of the enterprise.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the enterprise.
    Slug string
    The URL slug identifying the enterprise.
    Url string
    The url for the enterprise.
    CreatedAt string
    The time the enterprise was created.
    Description string
    The description of the enterprise.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the enterprise.
    Slug string
    The URL slug identifying the enterprise.
    Url string
    The url for the enterprise.
    createdAt String
    The time the enterprise was created.
    description String
    The description of the enterprise.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the enterprise.
    slug String
    The URL slug identifying the enterprise.
    url String
    The url for the enterprise.
    createdAt string
    The time the enterprise was created.
    description string
    The description of the enterprise.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the enterprise.
    slug string
    The URL slug identifying the enterprise.
    url string
    The url for the enterprise.
    created_at str
    The time the enterprise was created.
    description str
    The description of the enterprise.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the enterprise.
    slug str
    The URL slug identifying the enterprise.
    url str
    The url for the enterprise.
    createdAt String
    The time the enterprise was created.
    description String
    The description of the enterprise.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the enterprise.
    slug String
    The URL slug identifying the enterprise.
    url String
    The url for the 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
    Viewing docs for GitHub v5.26.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.