1. Packages
  2. GitHub
  3. API Docs
  4. EmuGroupMapping
GitHub v5.20.0 published on Saturday, Sep 30, 2023 by Pulumi

github.EmuGroupMapping

Explore with Pulumi AI

github logo
GitHub v5.20.0 published on Saturday, Sep 30, 2023 by Pulumi

    This resource manages mappings between external groups for enterprise managed users and GitHub teams. It wraps the API detailed here. Note that this is a distinct resource from github.TeamSyncGroupMapping. github.EmuGroupMapping is special to the Enterprise Managed User (EMU) external group feature, whereas github.TeamSyncGroupMapping is specific to Identity Provider Groups.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleEmuGroupMapping = new Github.EmuGroupMapping("exampleEmuGroupMapping", new()
        {
            GroupId = 28836,
            TeamSlug = "emu-test-team",
        });
    
        // The GitHub team name to modify
    });
    
    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.NewEmuGroupMapping(ctx, "exampleEmuGroupMapping", &github.EmuGroupMappingArgs{
    			GroupId:  pulumi.Int(28836),
    			TeamSlug: pulumi.String("emu-test-team"),
    		})
    		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.EmuGroupMapping;
    import com.pulumi.github.EmuGroupMappingArgs;
    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) {
            var exampleEmuGroupMapping = new EmuGroupMapping("exampleEmuGroupMapping", EmuGroupMappingArgs.builder()        
                .groupId(28836)
                .teamSlug("emu-test-team")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_github as github
    
    example_emu_group_mapping = github.EmuGroupMapping("exampleEmuGroupMapping",
        group_id=28836,
        team_slug="emu-test-team")
    # The GitHub team name to modify
    
    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const exampleEmuGroupMapping = new github.EmuGroupMapping("exampleEmuGroupMapping", {
        groupId: 28836,
        teamSlug: "emu-test-team",
    });
    // The GitHub team name to modify
    
    resources:
      exampleEmuGroupMapping:
        type: github:EmuGroupMapping
        properties:
          groupId: 28836
          # The group ID of the external group to link
          teamSlug: emu-test-team
    

    Create EmuGroupMapping Resource

    new EmuGroupMapping(name: string, args: EmuGroupMappingArgs, opts?: CustomResourceOptions);
    @overload
    def EmuGroupMapping(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        group_id: Optional[int] = None,
                        team_slug: Optional[str] = None)
    @overload
    def EmuGroupMapping(resource_name: str,
                        args: EmuGroupMappingArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewEmuGroupMapping(ctx *Context, name string, args EmuGroupMappingArgs, opts ...ResourceOption) (*EmuGroupMapping, error)
    public EmuGroupMapping(string name, EmuGroupMappingArgs args, CustomResourceOptions? opts = null)
    public EmuGroupMapping(String name, EmuGroupMappingArgs args)
    public EmuGroupMapping(String name, EmuGroupMappingArgs args, CustomResourceOptions options)
    
    type: github:EmuGroupMapping
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EmuGroupMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EmuGroupMappingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EmuGroupMappingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EmuGroupMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EmuGroupMappingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    EmuGroupMapping Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EmuGroupMapping resource accepts the following input properties:

    GroupId int

    Integer corresponding to the external group ID to be linked

    TeamSlug string

    Slug of the GitHub team

    GroupId int

    Integer corresponding to the external group ID to be linked

    TeamSlug string

    Slug of the GitHub team

    groupId Integer

    Integer corresponding to the external group ID to be linked

    teamSlug String

    Slug of the GitHub team

    groupId number

    Integer corresponding to the external group ID to be linked

    teamSlug string

    Slug of the GitHub team

    group_id int

    Integer corresponding to the external group ID to be linked

    team_slug str

    Slug of the GitHub team

    groupId Number

    Integer corresponding to the external group ID to be linked

    teamSlug String

    Slug of the GitHub team

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EmuGroupMapping resource produces the following output properties:

    Etag string
    Id string

    The provider-assigned unique ID for this managed resource.

    Etag string
    Id string

    The provider-assigned unique ID for this managed resource.

    etag String
    id String

    The provider-assigned unique ID for this managed resource.

    etag string
    id string

    The provider-assigned unique ID for this managed resource.

    etag str
    id str

    The provider-assigned unique ID for this managed resource.

    etag String
    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing EmuGroupMapping Resource

    Get an existing EmuGroupMapping resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EmuGroupMappingState, opts?: CustomResourceOptions): EmuGroupMapping
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            etag: Optional[str] = None,
            group_id: Optional[int] = None,
            team_slug: Optional[str] = None) -> EmuGroupMapping
    func GetEmuGroupMapping(ctx *Context, name string, id IDInput, state *EmuGroupMappingState, opts ...ResourceOption) (*EmuGroupMapping, error)
    public static EmuGroupMapping Get(string name, Input<string> id, EmuGroupMappingState? state, CustomResourceOptions? opts = null)
    public static EmuGroupMapping get(String name, Output<String> id, EmuGroupMappingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Etag string
    GroupId int

    Integer corresponding to the external group ID to be linked

    TeamSlug string

    Slug of the GitHub team

    Etag string
    GroupId int

    Integer corresponding to the external group ID to be linked

    TeamSlug string

    Slug of the GitHub team

    etag String
    groupId Integer

    Integer corresponding to the external group ID to be linked

    teamSlug String

    Slug of the GitHub team

    etag string
    groupId number

    Integer corresponding to the external group ID to be linked

    teamSlug string

    Slug of the GitHub team

    etag str
    group_id int

    Integer corresponding to the external group ID to be linked

    team_slug str

    Slug of the GitHub team

    etag String
    groupId Number

    Integer corresponding to the external group ID to be linked

    teamSlug String

    Slug of the GitHub team

    Import

    GitHub EMU External Group Mappings can be imported using the external group_id, e.g.

     $ pulumi import github:index/emuGroupMapping:EmuGroupMapping example_emu_group_mapping 28836
    

    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 v5.20.0 published on Saturday, Sep 30, 2023 by Pulumi