-
Notifications
You must be signed in to change notification settings - Fork 9
/
teamSyncGroupMapping.go
100 lines (87 loc) · 3.86 KB
/
teamSyncGroupMapping.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package github
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// This resource allows you to create and manage Identity Provider (IdP) group connections within your GitHub teams.
// You must have team synchronization enabled for organizations owned by enterprise accounts.
//
// To learn more about team synchronization between IdPs and Github, please refer to:
// https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/synchronizing-teams-between-your-identity-provider-and-github
type TeamSyncGroupMapping struct {
pulumi.CustomResourceState
Etag pulumi.StringOutput `pulumi:"etag"`
// An Array of GitHub Identity Provider Groups (or empty []). Each `group` block consists of the fields documented below.
// ___
Groups TeamSyncGroupMappingGroupArrayOutput `pulumi:"groups"`
// Slug of the team
TeamSlug pulumi.StringOutput `pulumi:"teamSlug"`
}
// NewTeamSyncGroupMapping registers a new resource with the given unique name, arguments, and options.
func NewTeamSyncGroupMapping(ctx *pulumi.Context,
name string, args *TeamSyncGroupMappingArgs, opts ...pulumi.ResourceOption) (*TeamSyncGroupMapping, error) {
if args == nil || args.TeamSlug == nil {
return nil, errors.New("missing required argument 'TeamSlug'")
}
if args == nil {
args = &TeamSyncGroupMappingArgs{}
}
var resource TeamSyncGroupMapping
err := ctx.RegisterResource("github:index/teamSyncGroupMapping:TeamSyncGroupMapping", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTeamSyncGroupMapping gets an existing TeamSyncGroupMapping resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTeamSyncGroupMapping(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TeamSyncGroupMappingState, opts ...pulumi.ResourceOption) (*TeamSyncGroupMapping, error) {
var resource TeamSyncGroupMapping
err := ctx.ReadResource("github:index/teamSyncGroupMapping:TeamSyncGroupMapping", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TeamSyncGroupMapping resources.
type teamSyncGroupMappingState struct {
Etag *string `pulumi:"etag"`
// An Array of GitHub Identity Provider Groups (or empty []). Each `group` block consists of the fields documented below.
// ___
Groups []TeamSyncGroupMappingGroup `pulumi:"groups"`
// Slug of the team
TeamSlug *string `pulumi:"teamSlug"`
}
type TeamSyncGroupMappingState struct {
Etag pulumi.StringPtrInput
// An Array of GitHub Identity Provider Groups (or empty []). Each `group` block consists of the fields documented below.
// ___
Groups TeamSyncGroupMappingGroupArrayInput
// Slug of the team
TeamSlug pulumi.StringPtrInput
}
func (TeamSyncGroupMappingState) ElementType() reflect.Type {
return reflect.TypeOf((*teamSyncGroupMappingState)(nil)).Elem()
}
type teamSyncGroupMappingArgs struct {
// An Array of GitHub Identity Provider Groups (or empty []). Each `group` block consists of the fields documented below.
// ___
Groups []TeamSyncGroupMappingGroup `pulumi:"groups"`
// Slug of the team
TeamSlug string `pulumi:"teamSlug"`
}
// The set of arguments for constructing a TeamSyncGroupMapping resource.
type TeamSyncGroupMappingArgs struct {
// An Array of GitHub Identity Provider Groups (or empty []). Each `group` block consists of the fields documented below.
// ___
Groups TeamSyncGroupMappingGroupArrayInput
// Slug of the team
TeamSlug pulumi.StringInput
}
func (TeamSyncGroupMappingArgs) ElementType() reflect.Type {
return reflect.TypeOf((*teamSyncGroupMappingArgs)(nil)).Elem()
}