1. Packages
  2. GitHub
  3. API Docs
  4. getEnterprise
GitHub v6.3.0 published on Monday, Sep 16, 2024 by Pulumi

github.getEnterprise

Explore with Pulumi AI

github logo
GitHub v6.3.0 published on Monday, Sep 16, 2024 by Pulumi

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

    Example Usage

    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")
    
    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.GetEnterprise(ctx, &github.GetEnterpriseArgs{
    			Slug: "example-co",
    		}, 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.GetEnterprise.Invoke(new()
        {
            Slug = "example-co",
        });
    
    });
    
    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());
    
        }
    }
    
    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)
    // Output-based functions aren't available in Java yet
    
    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.
    DatabaseId int
    The database ID of the enterprise.
    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.
    DatabaseId int
    The database ID of the enterprise.
    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.
    databaseId Integer
    The database ID of the enterprise.
    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.
    databaseId number
    The database ID of the enterprise.
    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.
    database_id int
    The database ID of the enterprise.
    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.
    databaseId Number
    The database ID of the enterprise.
    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
    GitHub v6.3.0 published on Monday, Sep 16, 2024 by Pulumi