github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/identitystore/groupMembership.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package identitystore 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Resource for managing an AWS IdentityStore Group Membership. 16 // 17 // ## Import 18 // 19 // Using `pulumi import`, import `aws_identitystore_group_membership` using the `identity_store_id/membership_id`. For example: 20 // 21 // ```sh 22 // $ pulumi import aws:identitystore/groupMembership:GroupMembership example d-0000000000/00000000-0000-0000-0000-000000000000 23 // ``` 24 type GroupMembership struct { 25 pulumi.CustomResourceState 26 27 // The identifier for a group in the Identity Store. 28 GroupId pulumi.StringOutput `pulumi:"groupId"` 29 // Identity Store ID associated with the Single Sign-On Instance. 30 IdentityStoreId pulumi.StringOutput `pulumi:"identityStoreId"` 31 // The identifier for a user in the Identity Store. 32 MemberId pulumi.StringOutput `pulumi:"memberId"` 33 // The identifier of the newly created group membership in the Identity Store. 34 MembershipId pulumi.StringOutput `pulumi:"membershipId"` 35 } 36 37 // NewGroupMembership registers a new resource with the given unique name, arguments, and options. 38 func NewGroupMembership(ctx *pulumi.Context, 39 name string, args *GroupMembershipArgs, opts ...pulumi.ResourceOption) (*GroupMembership, error) { 40 if args == nil { 41 return nil, errors.New("missing one or more required arguments") 42 } 43 44 if args.GroupId == nil { 45 return nil, errors.New("invalid value for required argument 'GroupId'") 46 } 47 if args.IdentityStoreId == nil { 48 return nil, errors.New("invalid value for required argument 'IdentityStoreId'") 49 } 50 if args.MemberId == nil { 51 return nil, errors.New("invalid value for required argument 'MemberId'") 52 } 53 opts = internal.PkgResourceDefaultOpts(opts) 54 var resource GroupMembership 55 err := ctx.RegisterResource("aws:identitystore/groupMembership:GroupMembership", name, args, &resource, opts...) 56 if err != nil { 57 return nil, err 58 } 59 return &resource, nil 60 } 61 62 // GetGroupMembership gets an existing GroupMembership resource's state with the given name, ID, and optional 63 // state properties that are used to uniquely qualify the lookup (nil if not required). 64 func GetGroupMembership(ctx *pulumi.Context, 65 name string, id pulumi.IDInput, state *GroupMembershipState, opts ...pulumi.ResourceOption) (*GroupMembership, error) { 66 var resource GroupMembership 67 err := ctx.ReadResource("aws:identitystore/groupMembership:GroupMembership", name, id, state, &resource, opts...) 68 if err != nil { 69 return nil, err 70 } 71 return &resource, nil 72 } 73 74 // Input properties used for looking up and filtering GroupMembership resources. 75 type groupMembershipState struct { 76 // The identifier for a group in the Identity Store. 77 GroupId *string `pulumi:"groupId"` 78 // Identity Store ID associated with the Single Sign-On Instance. 79 IdentityStoreId *string `pulumi:"identityStoreId"` 80 // The identifier for a user in the Identity Store. 81 MemberId *string `pulumi:"memberId"` 82 // The identifier of the newly created group membership in the Identity Store. 83 MembershipId *string `pulumi:"membershipId"` 84 } 85 86 type GroupMembershipState struct { 87 // The identifier for a group in the Identity Store. 88 GroupId pulumi.StringPtrInput 89 // Identity Store ID associated with the Single Sign-On Instance. 90 IdentityStoreId pulumi.StringPtrInput 91 // The identifier for a user in the Identity Store. 92 MemberId pulumi.StringPtrInput 93 // The identifier of the newly created group membership in the Identity Store. 94 MembershipId pulumi.StringPtrInput 95 } 96 97 func (GroupMembershipState) ElementType() reflect.Type { 98 return reflect.TypeOf((*groupMembershipState)(nil)).Elem() 99 } 100 101 type groupMembershipArgs struct { 102 // The identifier for a group in the Identity Store. 103 GroupId string `pulumi:"groupId"` 104 // Identity Store ID associated with the Single Sign-On Instance. 105 IdentityStoreId string `pulumi:"identityStoreId"` 106 // The identifier for a user in the Identity Store. 107 MemberId string `pulumi:"memberId"` 108 } 109 110 // The set of arguments for constructing a GroupMembership resource. 111 type GroupMembershipArgs struct { 112 // The identifier for a group in the Identity Store. 113 GroupId pulumi.StringInput 114 // Identity Store ID associated with the Single Sign-On Instance. 115 IdentityStoreId pulumi.StringInput 116 // The identifier for a user in the Identity Store. 117 MemberId pulumi.StringInput 118 } 119 120 func (GroupMembershipArgs) ElementType() reflect.Type { 121 return reflect.TypeOf((*groupMembershipArgs)(nil)).Elem() 122 } 123 124 type GroupMembershipInput interface { 125 pulumi.Input 126 127 ToGroupMembershipOutput() GroupMembershipOutput 128 ToGroupMembershipOutputWithContext(ctx context.Context) GroupMembershipOutput 129 } 130 131 func (*GroupMembership) ElementType() reflect.Type { 132 return reflect.TypeOf((**GroupMembership)(nil)).Elem() 133 } 134 135 func (i *GroupMembership) ToGroupMembershipOutput() GroupMembershipOutput { 136 return i.ToGroupMembershipOutputWithContext(context.Background()) 137 } 138 139 func (i *GroupMembership) ToGroupMembershipOutputWithContext(ctx context.Context) GroupMembershipOutput { 140 return pulumi.ToOutputWithContext(ctx, i).(GroupMembershipOutput) 141 } 142 143 // GroupMembershipArrayInput is an input type that accepts GroupMembershipArray and GroupMembershipArrayOutput values. 144 // You can construct a concrete instance of `GroupMembershipArrayInput` via: 145 // 146 // GroupMembershipArray{ GroupMembershipArgs{...} } 147 type GroupMembershipArrayInput interface { 148 pulumi.Input 149 150 ToGroupMembershipArrayOutput() GroupMembershipArrayOutput 151 ToGroupMembershipArrayOutputWithContext(context.Context) GroupMembershipArrayOutput 152 } 153 154 type GroupMembershipArray []GroupMembershipInput 155 156 func (GroupMembershipArray) ElementType() reflect.Type { 157 return reflect.TypeOf((*[]*GroupMembership)(nil)).Elem() 158 } 159 160 func (i GroupMembershipArray) ToGroupMembershipArrayOutput() GroupMembershipArrayOutput { 161 return i.ToGroupMembershipArrayOutputWithContext(context.Background()) 162 } 163 164 func (i GroupMembershipArray) ToGroupMembershipArrayOutputWithContext(ctx context.Context) GroupMembershipArrayOutput { 165 return pulumi.ToOutputWithContext(ctx, i).(GroupMembershipArrayOutput) 166 } 167 168 // GroupMembershipMapInput is an input type that accepts GroupMembershipMap and GroupMembershipMapOutput values. 169 // You can construct a concrete instance of `GroupMembershipMapInput` via: 170 // 171 // GroupMembershipMap{ "key": GroupMembershipArgs{...} } 172 type GroupMembershipMapInput interface { 173 pulumi.Input 174 175 ToGroupMembershipMapOutput() GroupMembershipMapOutput 176 ToGroupMembershipMapOutputWithContext(context.Context) GroupMembershipMapOutput 177 } 178 179 type GroupMembershipMap map[string]GroupMembershipInput 180 181 func (GroupMembershipMap) ElementType() reflect.Type { 182 return reflect.TypeOf((*map[string]*GroupMembership)(nil)).Elem() 183 } 184 185 func (i GroupMembershipMap) ToGroupMembershipMapOutput() GroupMembershipMapOutput { 186 return i.ToGroupMembershipMapOutputWithContext(context.Background()) 187 } 188 189 func (i GroupMembershipMap) ToGroupMembershipMapOutputWithContext(ctx context.Context) GroupMembershipMapOutput { 190 return pulumi.ToOutputWithContext(ctx, i).(GroupMembershipMapOutput) 191 } 192 193 type GroupMembershipOutput struct{ *pulumi.OutputState } 194 195 func (GroupMembershipOutput) ElementType() reflect.Type { 196 return reflect.TypeOf((**GroupMembership)(nil)).Elem() 197 } 198 199 func (o GroupMembershipOutput) ToGroupMembershipOutput() GroupMembershipOutput { 200 return o 201 } 202 203 func (o GroupMembershipOutput) ToGroupMembershipOutputWithContext(ctx context.Context) GroupMembershipOutput { 204 return o 205 } 206 207 // The identifier for a group in the Identity Store. 208 func (o GroupMembershipOutput) GroupId() pulumi.StringOutput { 209 return o.ApplyT(func(v *GroupMembership) pulumi.StringOutput { return v.GroupId }).(pulumi.StringOutput) 210 } 211 212 // Identity Store ID associated with the Single Sign-On Instance. 213 func (o GroupMembershipOutput) IdentityStoreId() pulumi.StringOutput { 214 return o.ApplyT(func(v *GroupMembership) pulumi.StringOutput { return v.IdentityStoreId }).(pulumi.StringOutput) 215 } 216 217 // The identifier for a user in the Identity Store. 218 func (o GroupMembershipOutput) MemberId() pulumi.StringOutput { 219 return o.ApplyT(func(v *GroupMembership) pulumi.StringOutput { return v.MemberId }).(pulumi.StringOutput) 220 } 221 222 // The identifier of the newly created group membership in the Identity Store. 223 func (o GroupMembershipOutput) MembershipId() pulumi.StringOutput { 224 return o.ApplyT(func(v *GroupMembership) pulumi.StringOutput { return v.MembershipId }).(pulumi.StringOutput) 225 } 226 227 type GroupMembershipArrayOutput struct{ *pulumi.OutputState } 228 229 func (GroupMembershipArrayOutput) ElementType() reflect.Type { 230 return reflect.TypeOf((*[]*GroupMembership)(nil)).Elem() 231 } 232 233 func (o GroupMembershipArrayOutput) ToGroupMembershipArrayOutput() GroupMembershipArrayOutput { 234 return o 235 } 236 237 func (o GroupMembershipArrayOutput) ToGroupMembershipArrayOutputWithContext(ctx context.Context) GroupMembershipArrayOutput { 238 return o 239 } 240 241 func (o GroupMembershipArrayOutput) Index(i pulumi.IntInput) GroupMembershipOutput { 242 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupMembership { 243 return vs[0].([]*GroupMembership)[vs[1].(int)] 244 }).(GroupMembershipOutput) 245 } 246 247 type GroupMembershipMapOutput struct{ *pulumi.OutputState } 248 249 func (GroupMembershipMapOutput) ElementType() reflect.Type { 250 return reflect.TypeOf((*map[string]*GroupMembership)(nil)).Elem() 251 } 252 253 func (o GroupMembershipMapOutput) ToGroupMembershipMapOutput() GroupMembershipMapOutput { 254 return o 255 } 256 257 func (o GroupMembershipMapOutput) ToGroupMembershipMapOutputWithContext(ctx context.Context) GroupMembershipMapOutput { 258 return o 259 } 260 261 func (o GroupMembershipMapOutput) MapIndex(k pulumi.StringInput) GroupMembershipOutput { 262 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupMembership { 263 return vs[0].(map[string]*GroupMembership)[vs[1].(string)] 264 }).(GroupMembershipOutput) 265 } 266 267 func init() { 268 pulumi.RegisterInputType(reflect.TypeOf((*GroupMembershipInput)(nil)).Elem(), &GroupMembership{}) 269 pulumi.RegisterInputType(reflect.TypeOf((*GroupMembershipArrayInput)(nil)).Elem(), GroupMembershipArray{}) 270 pulumi.RegisterInputType(reflect.TypeOf((*GroupMembershipMapInput)(nil)).Elem(), GroupMembershipMap{}) 271 pulumi.RegisterOutputType(GroupMembershipOutput{}) 272 pulumi.RegisterOutputType(GroupMembershipArrayOutput{}) 273 pulumi.RegisterOutputType(GroupMembershipMapOutput{}) 274 }