github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/identitystore/group.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. 16 // 17 // ## Example Usage 18 // 19 // ## Import 20 // 21 // Using `pulumi import`, import an Identity Store Group using the combination `identity_store_id/group_id`. For example: 22 // 23 // ```sh 24 // $ pulumi import aws:identitystore/group:Group example d-9c6705e95c/b8a1c340-8031-7071-a2fb-7dc540320c30 25 // ``` 26 type Group struct { 27 pulumi.CustomResourceState 28 29 // A string containing the description of the group. 30 Description pulumi.StringPtrOutput `pulumi:"description"` 31 // A string containing the name of the group. This value is commonly displayed when the group is referenced. 32 DisplayName pulumi.StringOutput `pulumi:"displayName"` 33 // A list of external IDs that contains the identifiers issued to this resource by an external identity provider. See External IDs below. 34 ExternalIds GroupExternalIdArrayOutput `pulumi:"externalIds"` 35 // The identifier of the newly created group in the identity store. 36 GroupId pulumi.StringOutput `pulumi:"groupId"` 37 // The globally unique identifier for the identity store. 38 // 39 // The following arguments are optional: 40 IdentityStoreId pulumi.StringOutput `pulumi:"identityStoreId"` 41 } 42 43 // NewGroup registers a new resource with the given unique name, arguments, and options. 44 func NewGroup(ctx *pulumi.Context, 45 name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error) { 46 if args == nil { 47 return nil, errors.New("missing one or more required arguments") 48 } 49 50 if args.DisplayName == nil { 51 return nil, errors.New("invalid value for required argument 'DisplayName'") 52 } 53 if args.IdentityStoreId == nil { 54 return nil, errors.New("invalid value for required argument 'IdentityStoreId'") 55 } 56 opts = internal.PkgResourceDefaultOpts(opts) 57 var resource Group 58 err := ctx.RegisterResource("aws:identitystore/group:Group", name, args, &resource, opts...) 59 if err != nil { 60 return nil, err 61 } 62 return &resource, nil 63 } 64 65 // GetGroup gets an existing Group resource's state with the given name, ID, and optional 66 // state properties that are used to uniquely qualify the lookup (nil if not required). 67 func GetGroup(ctx *pulumi.Context, 68 name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error) { 69 var resource Group 70 err := ctx.ReadResource("aws:identitystore/group:Group", name, id, state, &resource, opts...) 71 if err != nil { 72 return nil, err 73 } 74 return &resource, nil 75 } 76 77 // Input properties used for looking up and filtering Group resources. 78 type groupState struct { 79 // A string containing the description of the group. 80 Description *string `pulumi:"description"` 81 // A string containing the name of the group. This value is commonly displayed when the group is referenced. 82 DisplayName *string `pulumi:"displayName"` 83 // A list of external IDs that contains the identifiers issued to this resource by an external identity provider. See External IDs below. 84 ExternalIds []GroupExternalId `pulumi:"externalIds"` 85 // The identifier of the newly created group in the identity store. 86 GroupId *string `pulumi:"groupId"` 87 // The globally unique identifier for the identity store. 88 // 89 // The following arguments are optional: 90 IdentityStoreId *string `pulumi:"identityStoreId"` 91 } 92 93 type GroupState struct { 94 // A string containing the description of the group. 95 Description pulumi.StringPtrInput 96 // A string containing the name of the group. This value is commonly displayed when the group is referenced. 97 DisplayName pulumi.StringPtrInput 98 // A list of external IDs that contains the identifiers issued to this resource by an external identity provider. See External IDs below. 99 ExternalIds GroupExternalIdArrayInput 100 // The identifier of the newly created group in the identity store. 101 GroupId pulumi.StringPtrInput 102 // The globally unique identifier for the identity store. 103 // 104 // The following arguments are optional: 105 IdentityStoreId pulumi.StringPtrInput 106 } 107 108 func (GroupState) ElementType() reflect.Type { 109 return reflect.TypeOf((*groupState)(nil)).Elem() 110 } 111 112 type groupArgs struct { 113 // A string containing the description of the group. 114 Description *string `pulumi:"description"` 115 // A string containing the name of the group. This value is commonly displayed when the group is referenced. 116 DisplayName string `pulumi:"displayName"` 117 // The globally unique identifier for the identity store. 118 // 119 // The following arguments are optional: 120 IdentityStoreId string `pulumi:"identityStoreId"` 121 } 122 123 // The set of arguments for constructing a Group resource. 124 type GroupArgs struct { 125 // A string containing the description of the group. 126 Description pulumi.StringPtrInput 127 // A string containing the name of the group. This value is commonly displayed when the group is referenced. 128 DisplayName pulumi.StringInput 129 // The globally unique identifier for the identity store. 130 // 131 // The following arguments are optional: 132 IdentityStoreId pulumi.StringInput 133 } 134 135 func (GroupArgs) ElementType() reflect.Type { 136 return reflect.TypeOf((*groupArgs)(nil)).Elem() 137 } 138 139 type GroupInput interface { 140 pulumi.Input 141 142 ToGroupOutput() GroupOutput 143 ToGroupOutputWithContext(ctx context.Context) GroupOutput 144 } 145 146 func (*Group) ElementType() reflect.Type { 147 return reflect.TypeOf((**Group)(nil)).Elem() 148 } 149 150 func (i *Group) ToGroupOutput() GroupOutput { 151 return i.ToGroupOutputWithContext(context.Background()) 152 } 153 154 func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput { 155 return pulumi.ToOutputWithContext(ctx, i).(GroupOutput) 156 } 157 158 // GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values. 159 // You can construct a concrete instance of `GroupArrayInput` via: 160 // 161 // GroupArray{ GroupArgs{...} } 162 type GroupArrayInput interface { 163 pulumi.Input 164 165 ToGroupArrayOutput() GroupArrayOutput 166 ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput 167 } 168 169 type GroupArray []GroupInput 170 171 func (GroupArray) ElementType() reflect.Type { 172 return reflect.TypeOf((*[]*Group)(nil)).Elem() 173 } 174 175 func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput { 176 return i.ToGroupArrayOutputWithContext(context.Background()) 177 } 178 179 func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput { 180 return pulumi.ToOutputWithContext(ctx, i).(GroupArrayOutput) 181 } 182 183 // GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values. 184 // You can construct a concrete instance of `GroupMapInput` via: 185 // 186 // GroupMap{ "key": GroupArgs{...} } 187 type GroupMapInput interface { 188 pulumi.Input 189 190 ToGroupMapOutput() GroupMapOutput 191 ToGroupMapOutputWithContext(context.Context) GroupMapOutput 192 } 193 194 type GroupMap map[string]GroupInput 195 196 func (GroupMap) ElementType() reflect.Type { 197 return reflect.TypeOf((*map[string]*Group)(nil)).Elem() 198 } 199 200 func (i GroupMap) ToGroupMapOutput() GroupMapOutput { 201 return i.ToGroupMapOutputWithContext(context.Background()) 202 } 203 204 func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput { 205 return pulumi.ToOutputWithContext(ctx, i).(GroupMapOutput) 206 } 207 208 type GroupOutput struct{ *pulumi.OutputState } 209 210 func (GroupOutput) ElementType() reflect.Type { 211 return reflect.TypeOf((**Group)(nil)).Elem() 212 } 213 214 func (o GroupOutput) ToGroupOutput() GroupOutput { 215 return o 216 } 217 218 func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput { 219 return o 220 } 221 222 // A string containing the description of the group. 223 func (o GroupOutput) Description() pulumi.StringPtrOutput { 224 return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 225 } 226 227 // A string containing the name of the group. This value is commonly displayed when the group is referenced. 228 func (o GroupOutput) DisplayName() pulumi.StringOutput { 229 return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) 230 } 231 232 // A list of external IDs that contains the identifiers issued to this resource by an external identity provider. See External IDs below. 233 func (o GroupOutput) ExternalIds() GroupExternalIdArrayOutput { 234 return o.ApplyT(func(v *Group) GroupExternalIdArrayOutput { return v.ExternalIds }).(GroupExternalIdArrayOutput) 235 } 236 237 // The identifier of the newly created group in the identity store. 238 func (o GroupOutput) GroupId() pulumi.StringOutput { 239 return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.GroupId }).(pulumi.StringOutput) 240 } 241 242 // The globally unique identifier for the identity store. 243 // 244 // The following arguments are optional: 245 func (o GroupOutput) IdentityStoreId() pulumi.StringOutput { 246 return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.IdentityStoreId }).(pulumi.StringOutput) 247 } 248 249 type GroupArrayOutput struct{ *pulumi.OutputState } 250 251 func (GroupArrayOutput) ElementType() reflect.Type { 252 return reflect.TypeOf((*[]*Group)(nil)).Elem() 253 } 254 255 func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput { 256 return o 257 } 258 259 func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput { 260 return o 261 } 262 263 func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput { 264 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Group { 265 return vs[0].([]*Group)[vs[1].(int)] 266 }).(GroupOutput) 267 } 268 269 type GroupMapOutput struct{ *pulumi.OutputState } 270 271 func (GroupMapOutput) ElementType() reflect.Type { 272 return reflect.TypeOf((*map[string]*Group)(nil)).Elem() 273 } 274 275 func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput { 276 return o 277 } 278 279 func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput { 280 return o 281 } 282 283 func (o GroupMapOutput) MapIndex(k pulumi.StringInput) GroupOutput { 284 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Group { 285 return vs[0].(map[string]*Group)[vs[1].(string)] 286 }).(GroupOutput) 287 } 288 289 func init() { 290 pulumi.RegisterInputType(reflect.TypeOf((*GroupInput)(nil)).Elem(), &Group{}) 291 pulumi.RegisterInputType(reflect.TypeOf((*GroupArrayInput)(nil)).Elem(), GroupArray{}) 292 pulumi.RegisterInputType(reflect.TypeOf((*GroupMapInput)(nil)).Elem(), GroupMap{}) 293 pulumi.RegisterOutputType(GroupOutput{}) 294 pulumi.RegisterOutputType(GroupArrayOutput{}) 295 pulumi.RegisterOutputType(GroupMapOutput{}) 296 }