1. Packages
  2. GitHub
  3. API Docs
  4. getOrganization
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

github.getOrganization

Explore with Pulumi AI

github logo
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getOrganization({
        name: "github",
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_organization(name="github")
    
    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.GetOrganization(ctx, &github.GetOrganizationArgs{
    			Name: "github",
    		}, 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.GetOrganization.Invoke(new()
        {
            Name = "github",
        });
    
    });
    
    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 example = GithubFunctions.getOrganization(GetOrganizationArgs.builder()
                .name("github")
                .build());
    
        }
    }
    
    variables:
      example:
        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(ignore_archived_repos: Optional[bool] = None,
                         name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetOrganizationResult
    def get_organization_output(ignore_archived_repos: Optional[pulumi.Input[bool]] = None,
                         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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: github:index/getOrganization:getOrganization
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The organization's public profile name
    IgnoreArchivedRepos bool
    Whether or not to include archived repos in the repositories list
    Name string
    The organization's public profile name
    IgnoreArchivedRepos bool
    Whether or not to include archived repos in the repositories list
    name String
    The organization's public profile name
    ignoreArchivedRepos Boolean
    Whether or not to include archived repos in the repositories list
    name string
    The organization's public profile name
    ignoreArchivedRepos boolean
    Whether or not to include archived repos in the repositories list
    name str
    The organization's public profile name
    ignore_archived_repos bool
    Whether or not to include archived repos in the repositories list
    name String
    The organization's public profile name
    ignoreArchivedRepos Boolean
    Whether or not to include archived repos in the repositories list

    getOrganization Result

    The following output properties are available:

    AdvancedSecurityEnabledForNewRepositories bool
    Whether advanced security is enabled for new repositories.
    DefaultRepositoryPermission string
    Default permission level members have for organization repositories.
    DependabotAlertsEnabledForNewRepositories bool
    Whether Dependabot alerts is automatically enabled for new repositories.
    DependabotSecurityUpdatesEnabledForNewRepositories bool
    Whether Dependabot security updates is automatically enabled for new repositories.
    DependencyGraphEnabledForNewRepositories bool
    Whether dependency graph is automatically enabled for new repositories.
    Description string
    The organization account description
    Id string
    The provider-assigned unique ID for this managed resource.
    Login string
    The members login
    Members List<string>
    Deprecated: use users instead by replacing github_organization.example.members to github_organization.example.users[*].login which will give you the same value, expect this field to be removed in next major version

    Deprecated: Use users instead by replacing github_organization.example.members to github_organization.example.users[*].login. Expect this field to be removed in next major version.

    MembersAllowedRepositoryCreationType string
    The type of repository allowed to be created by members of the organization. Can be one of ALL, PUBLIC, PRIVATE, NONE.
    MembersCanCreateInternalRepositories bool
    Whether organization members can create internal repositories.
    MembersCanCreatePages bool
    Whether organization members can create pages sites.
    MembersCanCreatePrivatePages bool
    Whether organization members can create private pages sites.
    MembersCanCreatePrivateRepositories bool
    Whether organization members can create private repositories.
    MembersCanCreatePublicPages bool
    Whether organization members can create public pages sites.
    MembersCanCreatePublicRepositories bool
    Whether organization members can create public repositories.
    MembersCanCreateRepositories bool
    Whether non-admin organization members can create repositories.
    MembersCanForkPrivateRepositories bool
    Whether organization members can create private repository forks.
    Name string
    The organization's public profile name
    NodeId string
    GraphQL global node ID for use with the v4 API
    Orgname string
    The organization's name as used in URLs and the API
    Plan string
    The organization account plan name
    Repositories List<string>
    (list) A list of the full names of the repositories in the organization formatted as owner/name strings
    SecretScanningEnabledForNewRepositories bool
    Whether secret scanning is automatically enabled for new repositories.
    SecretScanningPushProtectionEnabledForNewRepositories bool
    Whether secret scanning push protection is automatically enabled for new repositories.
    TwoFactorRequirementEnabled bool
    Whether two-factor authentication is required for all members of the organization.
    Users List<ImmutableDictionary<string, string>>
    (list) A list with the members of the organization with following fields:
    WebCommitSignoffRequired bool
    Whether organization members must sign all commits.
    IgnoreArchivedRepos bool
    AdvancedSecurityEnabledForNewRepositories bool
    Whether advanced security is enabled for new repositories.
    DefaultRepositoryPermission string
    Default permission level members have for organization repositories.
    DependabotAlertsEnabledForNewRepositories bool
    Whether Dependabot alerts is automatically enabled for new repositories.
    DependabotSecurityUpdatesEnabledForNewRepositories bool
    Whether Dependabot security updates is automatically enabled for new repositories.
    DependencyGraphEnabledForNewRepositories bool
    Whether dependency graph is automatically enabled for new repositories.
    Description string
    The organization account description
    Id string
    The provider-assigned unique ID for this managed resource.
    Login string
    The members login
    Members []string
    Deprecated: use users instead by replacing github_organization.example.members to github_organization.example.users[*].login which will give you the same value, expect this field to be removed in next major version

    Deprecated: Use users instead by replacing github_organization.example.members to github_organization.example.users[*].login. Expect this field to be removed in next major version.

    MembersAllowedRepositoryCreationType string
    The type of repository allowed to be created by members of the organization. Can be one of ALL, PUBLIC, PRIVATE, NONE.
    MembersCanCreateInternalRepositories bool
    Whether organization members can create internal repositories.
    MembersCanCreatePages bool
    Whether organization members can create pages sites.
    MembersCanCreatePrivatePages bool
    Whether organization members can create private pages sites.
    MembersCanCreatePrivateRepositories bool
    Whether organization members can create private repositories.
    MembersCanCreatePublicPages bool
    Whether organization members can create public pages sites.
    MembersCanCreatePublicRepositories bool
    Whether organization members can create public repositories.
    MembersCanCreateRepositories bool
    Whether non-admin organization members can create repositories.
    MembersCanForkPrivateRepositories bool
    Whether organization members can create private repository forks.
    Name string
    The organization's public profile name
    NodeId string
    GraphQL global node ID for use with the v4 API
    Orgname string
    The organization's name as used in URLs and the API
    Plan string
    The organization account plan name
    Repositories []string
    (list) A list of the full names of the repositories in the organization formatted as owner/name strings
    SecretScanningEnabledForNewRepositories bool
    Whether secret scanning is automatically enabled for new repositories.
    SecretScanningPushProtectionEnabledForNewRepositories bool
    Whether secret scanning push protection is automatically enabled for new repositories.
    TwoFactorRequirementEnabled bool
    Whether two-factor authentication is required for all members of the organization.
    Users []map[string]string
    (list) A list with the members of the organization with following fields:
    WebCommitSignoffRequired bool
    Whether organization members must sign all commits.
    IgnoreArchivedRepos bool
    advancedSecurityEnabledForNewRepositories Boolean
    Whether advanced security is enabled for new repositories.
    defaultRepositoryPermission String
    Default permission level members have for organization repositories.
    dependabotAlertsEnabledForNewRepositories Boolean
    Whether Dependabot alerts is automatically enabled for new repositories.
    dependabotSecurityUpdatesEnabledForNewRepositories Boolean
    Whether Dependabot security updates is automatically enabled for new repositories.
    dependencyGraphEnabledForNewRepositories Boolean
    Whether dependency graph is automatically enabled for new repositories.
    description String
    The organization account description
    id String
    The provider-assigned unique ID for this managed resource.
    login String
    The members login
    members List<String>
    Deprecated: use users instead by replacing github_organization.example.members to github_organization.example.users[*].login which will give you the same value, expect this field to be removed in next major version

    Deprecated: Use users instead by replacing github_organization.example.members to github_organization.example.users[*].login. Expect this field to be removed in next major version.

    membersAllowedRepositoryCreationType String
    The type of repository allowed to be created by members of the organization. Can be one of ALL, PUBLIC, PRIVATE, NONE.
    membersCanCreateInternalRepositories Boolean
    Whether organization members can create internal repositories.
    membersCanCreatePages Boolean
    Whether organization members can create pages sites.
    membersCanCreatePrivatePages Boolean
    Whether organization members can create private pages sites.
    membersCanCreatePrivateRepositories Boolean
    Whether organization members can create private repositories.
    membersCanCreatePublicPages Boolean
    Whether organization members can create public pages sites.
    membersCanCreatePublicRepositories Boolean
    Whether organization members can create public repositories.
    membersCanCreateRepositories Boolean
    Whether non-admin organization members can create repositories.
    membersCanForkPrivateRepositories Boolean
    Whether organization members can create private repository forks.
    name String
    The organization's public profile name
    nodeId String
    GraphQL global node ID for use with the v4 API
    orgname String
    The organization's name as used in URLs and the API
    plan String
    The organization account plan name
    repositories List<String>
    (list) A list of the full names of the repositories in the organization formatted as owner/name strings
    secretScanningEnabledForNewRepositories Boolean
    Whether secret scanning is automatically enabled for new repositories.
    secretScanningPushProtectionEnabledForNewRepositories Boolean
    Whether secret scanning push protection is automatically enabled for new repositories.
    twoFactorRequirementEnabled Boolean
    Whether two-factor authentication is required for all members of the organization.
    users List<Map<String,String>>
    (list) A list with the members of the organization with following fields:
    webCommitSignoffRequired Boolean
    Whether organization members must sign all commits.
    ignoreArchivedRepos Boolean
    advancedSecurityEnabledForNewRepositories boolean
    Whether advanced security is enabled for new repositories.
    defaultRepositoryPermission string
    Default permission level members have for organization repositories.
    dependabotAlertsEnabledForNewRepositories boolean
    Whether Dependabot alerts is automatically enabled for new repositories.
    dependabotSecurityUpdatesEnabledForNewRepositories boolean
    Whether Dependabot security updates is automatically enabled for new repositories.
    dependencyGraphEnabledForNewRepositories boolean
    Whether dependency graph is automatically enabled for new repositories.
    description string
    The organization account description
    id string
    The provider-assigned unique ID for this managed resource.
    login string
    The members login
    members string[]
    Deprecated: use users instead by replacing github_organization.example.members to github_organization.example.users[*].login which will give you the same value, expect this field to be removed in next major version

    Deprecated: Use users instead by replacing github_organization.example.members to github_organization.example.users[*].login. Expect this field to be removed in next major version.

    membersAllowedRepositoryCreationType string
    The type of repository allowed to be created by members of the organization. Can be one of ALL, PUBLIC, PRIVATE, NONE.
    membersCanCreateInternalRepositories boolean
    Whether organization members can create internal repositories.
    membersCanCreatePages boolean
    Whether organization members can create pages sites.
    membersCanCreatePrivatePages boolean
    Whether organization members can create private pages sites.
    membersCanCreatePrivateRepositories boolean
    Whether organization members can create private repositories.
    membersCanCreatePublicPages boolean
    Whether organization members can create public pages sites.
    membersCanCreatePublicRepositories boolean
    Whether organization members can create public repositories.
    membersCanCreateRepositories boolean
    Whether non-admin organization members can create repositories.
    membersCanForkPrivateRepositories boolean
    Whether organization members can create private repository forks.
    name string
    The organization's public profile name
    nodeId string
    GraphQL global node ID for use with the v4 API
    orgname string
    The organization's name as used in URLs and the API
    plan string
    The organization account plan name
    repositories string[]
    (list) A list of the full names of the repositories in the organization formatted as owner/name strings
    secretScanningEnabledForNewRepositories boolean
    Whether secret scanning is automatically enabled for new repositories.
    secretScanningPushProtectionEnabledForNewRepositories boolean
    Whether secret scanning push protection is automatically enabled for new repositories.
    twoFactorRequirementEnabled boolean
    Whether two-factor authentication is required for all members of the organization.
    users {[key: string]: string}[]
    (list) A list with the members of the organization with following fields:
    webCommitSignoffRequired boolean
    Whether organization members must sign all commits.
    ignoreArchivedRepos boolean
    advanced_security_enabled_for_new_repositories bool
    Whether advanced security is enabled for new repositories.
    default_repository_permission str
    Default permission level members have for organization repositories.
    dependabot_alerts_enabled_for_new_repositories bool
    Whether Dependabot alerts is automatically enabled for new repositories.
    dependabot_security_updates_enabled_for_new_repositories bool
    Whether Dependabot security updates is automatically enabled for new repositories.
    dependency_graph_enabled_for_new_repositories bool
    Whether dependency graph is automatically enabled for new repositories.
    description str
    The organization account description
    id str
    The provider-assigned unique ID for this managed resource.
    login str
    The members login
    members Sequence[str]
    Deprecated: use users instead by replacing github_organization.example.members to github_organization.example.users[*].login which will give you the same value, expect this field to be removed in next major version

    Deprecated: Use users instead by replacing github_organization.example.members to github_organization.example.users[*].login. Expect this field to be removed in next major version.

    members_allowed_repository_creation_type str
    The type of repository allowed to be created by members of the organization. Can be one of ALL, PUBLIC, PRIVATE, NONE.
    members_can_create_internal_repositories bool
    Whether organization members can create internal repositories.
    members_can_create_pages bool
    Whether organization members can create pages sites.
    members_can_create_private_pages bool
    Whether organization members can create private pages sites.
    members_can_create_private_repositories bool
    Whether organization members can create private repositories.
    members_can_create_public_pages bool
    Whether organization members can create public pages sites.
    members_can_create_public_repositories bool
    Whether organization members can create public repositories.
    members_can_create_repositories bool
    Whether non-admin organization members can create repositories.
    members_can_fork_private_repositories bool
    Whether organization members can create private repository forks.
    name str
    The organization's public profile name
    node_id str
    GraphQL global node ID for use with the v4 API
    orgname str
    The organization's name as used in URLs and the API
    plan str
    The organization account plan name
    repositories Sequence[str]
    (list) A list of the full names of the repositories in the organization formatted as owner/name strings
    secret_scanning_enabled_for_new_repositories bool
    Whether secret scanning is automatically enabled for new repositories.
    secret_scanning_push_protection_enabled_for_new_repositories bool
    Whether secret scanning push protection is automatically enabled for new repositories.
    two_factor_requirement_enabled bool
    Whether two-factor authentication is required for all members of the organization.
    users Sequence[Mapping[str, str]]
    (list) A list with the members of the organization with following fields:
    web_commit_signoff_required bool
    Whether organization members must sign all commits.
    ignore_archived_repos bool
    advancedSecurityEnabledForNewRepositories Boolean
    Whether advanced security is enabled for new repositories.
    defaultRepositoryPermission String
    Default permission level members have for organization repositories.
    dependabotAlertsEnabledForNewRepositories Boolean
    Whether Dependabot alerts is automatically enabled for new repositories.
    dependabotSecurityUpdatesEnabledForNewRepositories Boolean
    Whether Dependabot security updates is automatically enabled for new repositories.
    dependencyGraphEnabledForNewRepositories Boolean
    Whether dependency graph is automatically enabled for new repositories.
    description String
    The organization account description
    id String
    The provider-assigned unique ID for this managed resource.
    login String
    The members login
    members List<String>
    Deprecated: use users instead by replacing github_organization.example.members to github_organization.example.users[*].login which will give you the same value, expect this field to be removed in next major version

    Deprecated: Use users instead by replacing github_organization.example.members to github_organization.example.users[*].login. Expect this field to be removed in next major version.

    membersAllowedRepositoryCreationType String
    The type of repository allowed to be created by members of the organization. Can be one of ALL, PUBLIC, PRIVATE, NONE.
    membersCanCreateInternalRepositories Boolean
    Whether organization members can create internal repositories.
    membersCanCreatePages Boolean
    Whether organization members can create pages sites.
    membersCanCreatePrivatePages Boolean
    Whether organization members can create private pages sites.
    membersCanCreatePrivateRepositories Boolean
    Whether organization members can create private repositories.
    membersCanCreatePublicPages Boolean
    Whether organization members can create public pages sites.
    membersCanCreatePublicRepositories Boolean
    Whether organization members can create public repositories.
    membersCanCreateRepositories Boolean
    Whether non-admin organization members can create repositories.
    membersCanForkPrivateRepositories Boolean
    Whether organization members can create private repository forks.
    name String
    The organization's public profile name
    nodeId String
    GraphQL global node ID for use with the v4 API
    orgname String
    The organization's name as used in URLs and the API
    plan String
    The organization account plan name
    repositories List<String>
    (list) A list of the full names of the repositories in the organization formatted as owner/name strings
    secretScanningEnabledForNewRepositories Boolean
    Whether secret scanning is automatically enabled for new repositories.
    secretScanningPushProtectionEnabledForNewRepositories Boolean
    Whether secret scanning push protection is automatically enabled for new repositories.
    twoFactorRequirementEnabled Boolean
    Whether two-factor authentication is required for all members of the organization.
    users List<Map<String>>
    (list) A list with the members of the organization with following fields:
    webCommitSignoffRequired Boolean
    Whether organization members must sign all commits.
    ignoreArchivedRepos Boolean

    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.1.0 published on Monday, Mar 11, 2024 by Pulumi