1. Packages
  2. Github Provider
  3. API Docs
  4. getExternalGroups
GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi

github.getExternalGroups

Explore with Pulumi AI

github logo
GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi

    Use this data source to retrieve external groups belonging to an organization.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const exampleExternalGroups = github.getExternalGroups({});
    const localGroups = exampleExternalGroups;
    export const groups = localGroups;
    
    import pulumi
    import pulumi_github as github
    
    example_external_groups = github.get_external_groups()
    local_groups = example_external_groups
    pulumi.export("groups", local_groups)
    
    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 {
    		exampleExternalGroups, err := github.GetExternalGroups(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		localGroups := exampleExternalGroups
    		ctx.Export("groups", localGroups)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleExternalGroups = Github.GetExternalGroups.Invoke();
    
        var localGroups = exampleExternalGroups;
    
        return new Dictionary<string, object?>
        {
            ["groups"] = localGroups,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.GithubFunctions;
    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 exampleExternalGroups = GithubFunctions.getExternalGroups();
    
            final var localGroups = exampleExternalGroups.applyValue(getExternalGroupsResult -> getExternalGroupsResult);
    
            ctx.export("groups", localGroups);
        }
    }
    
    variables:
      exampleExternalGroups:
        fn::invoke:
          Function: github:getExternalGroups
          Arguments: {}
      localGroups: ${exampleExternalGroups}
    outputs:
      groups: ${localGroups}
    

    Using getExternalGroups

    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 getExternalGroups(opts?: InvokeOptions): Promise<GetExternalGroupsResult>
    function getExternalGroupsOutput(opts?: InvokeOptions): Output<GetExternalGroupsResult>
    def get_external_groups(opts: Optional[InvokeOptions] = None) -> GetExternalGroupsResult
    def get_external_groups_output(opts: Optional[InvokeOptions] = None) -> Output[GetExternalGroupsResult]
    func GetExternalGroups(ctx *Context, opts ...InvokeOption) (*GetExternalGroupsResult, error)
    func GetExternalGroupsOutput(ctx *Context, opts ...InvokeOption) GetExternalGroupsResultOutput

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

    public static class GetExternalGroups 
    {
        public static Task<GetExternalGroupsResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetExternalGroupsResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetExternalGroupsResult> getExternalGroups(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: github:index/getExternalGroups:getExternalGroups
      arguments:
        # arguments dictionary

    getExternalGroups Result

    The following output properties are available:

    ExternalGroups List<GetExternalGroupsExternalGroup>
    an array of external groups belonging to the organization. Each group consists of the fields documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    ExternalGroups []GetExternalGroupsExternalGroup
    an array of external groups belonging to the organization. Each group consists of the fields documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    externalGroups List<GetExternalGroupsExternalGroup>
    an array of external groups belonging to the organization. Each group consists of the fields documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    externalGroups GetExternalGroupsExternalGroup[]
    an array of external groups belonging to the organization. Each group consists of the fields documented below.
    id string
    The provider-assigned unique ID for this managed resource.
    external_groups Sequence[GetExternalGroupsExternalGroup]
    an array of external groups belonging to the organization. Each group consists of the fields documented below.
    id str
    The provider-assigned unique ID for this managed resource.
    externalGroups List<Property Map>
    an array of external groups belonging to the organization. Each group consists of the fields documented below.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    GetExternalGroupsExternalGroup

    GroupId int
    the ID of the group.
    GroupName string
    the name of the group.
    UpdatedAt string
    the date the group was last updated.
    GroupId int
    the ID of the group.
    GroupName string
    the name of the group.
    UpdatedAt string
    the date the group was last updated.
    groupId Integer
    the ID of the group.
    groupName String
    the name of the group.
    updatedAt String
    the date the group was last updated.
    groupId number
    the ID of the group.
    groupName string
    the name of the group.
    updatedAt string
    the date the group was last updated.
    group_id int
    the ID of the group.
    group_name str
    the name of the group.
    updated_at str
    the date the group was last updated.
    groupId Number
    the ID of the group.
    groupName String
    the name of the group.
    updatedAt String
    the date the group was last updated.

    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.2 published on Friday, Oct 11, 2024 by Pulumi