1. Packages
  2. Github Provider
  3. API Docs
  4. getEnterprise
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.getEnterprise

Explore with Pulumi AI

GitHub v6.7.0 published on Friday, Feb 28, 2025 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",
});
Copy
import pulumi
import pulumi_github as github

example = github.get_enterprise(slug="example-co")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: github:getEnterprise
      arguments:
        slug: example-co
Copy

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>
Copy
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]
Copy
func GetEnterprise(ctx *Context, args *GetEnterpriseArgs, opts ...InvokeOption) (*GetEnterpriseResult, error)
func GetEnterpriseOutput(ctx *Context, args *GetEnterpriseOutputArgs, opts ...InvokeOption) GetEnterpriseResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetEnterpriseResult> getEnterprise(GetEnterpriseArgs args, InvokeOptions options)
public static Output<GetEnterpriseResult> getEnterprise(GetEnterpriseArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: github:index/getEnterprise:getEnterprise
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Slug This property is required. string
The URL slug identifying the enterprise.
Slug This property is required. string
The URL slug identifying the enterprise.
slug This property is required. String
The URL slug identifying the enterprise.
slug This property is required. string
The URL slug identifying the enterprise.
slug This property is required. str
The URL slug identifying the enterprise.
slug This property is required. 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 v6.7.0 published on Friday, Feb 28, 2025 by Pulumi