1. Packages
  2. GitHub
  3. API Docs
  4. EmuGroupMapping
GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi

github.EmuGroupMapping

Explore with Pulumi AI

github logo
GitHub v6.2.2 published on Tuesday, Jun 18, 2024 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

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

    Create EmuGroupMapping Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EmuGroupMapping(name: string, args: EmuGroupMappingArgs, opts?: CustomResourceOptions);
    @overload
    def EmuGroupMapping(resource_name: str,
                        args: EmuGroupMappingArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def EmuGroupMapping(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        group_id: Optional[int] = None,
                        team_slug: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var emuGroupMappingResource = new Github.EmuGroupMapping("emuGroupMappingResource", new()
    {
        GroupId = 0,
        TeamSlug = "string",
    });
    
    example, err := github.NewEmuGroupMapping(ctx, "emuGroupMappingResource", &github.EmuGroupMappingArgs{
    	GroupId:  pulumi.Int(0),
    	TeamSlug: pulumi.String("string"),
    })
    
    var emuGroupMappingResource = new EmuGroupMapping("emuGroupMappingResource", EmuGroupMappingArgs.builder()
        .groupId(0)
        .teamSlug("string")
        .build());
    
    emu_group_mapping_resource = github.EmuGroupMapping("emuGroupMappingResource",
        group_id=0,
        team_slug="string")
    
    const emuGroupMappingResource = new github.EmuGroupMapping("emuGroupMappingResource", {
        groupId: 0,
        teamSlug: "string",
    });
    
    type: github:EmuGroupMapping
    properties:
        groupId: 0
        teamSlug: string
    

    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.2.2 published on Tuesday, Jun 18, 2024 by Pulumi