github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/transfer/user.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 transfer 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 // ## Example Usage 16 // 17 // <!--Start PulumiCodeChooser --> 18 // ```go 19 // package main 20 // 21 // import ( 22 // 23 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transfer" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // fooServer, err := transfer.NewServer(ctx, "foo", &transfer.ServerArgs{ 32 // IdentityProviderType: pulumi.String("SERVICE_MANAGED"), 33 // Tags: pulumi.StringMap{ 34 // "NAME": pulumi.String("tf-acc-test-transfer-server"), 35 // }, 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 41 // Statements: []iam.GetPolicyDocumentStatement{ 42 // { 43 // Effect: pulumi.StringRef("Allow"), 44 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 45 // { 46 // Type: "Service", 47 // Identifiers: []string{ 48 // "transfer.amazonaws.com", 49 // }, 50 // }, 51 // }, 52 // Actions: []string{ 53 // "sts:AssumeRole", 54 // }, 55 // }, 56 // }, 57 // }, nil) 58 // if err != nil { 59 // return err 60 // } 61 // fooRole, err := iam.NewRole(ctx, "foo", &iam.RoleArgs{ 62 // Name: pulumi.String("tf-test-transfer-user-iam-role"), 63 // AssumeRolePolicy: pulumi.String(assumeRole.Json), 64 // }) 65 // if err != nil { 66 // return err 67 // } 68 // foo, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 69 // Statements: []iam.GetPolicyDocumentStatement{ 70 // { 71 // Sid: pulumi.StringRef("AllowFullAccesstoS3"), 72 // Effect: pulumi.StringRef("Allow"), 73 // Actions: []string{ 74 // "s3:*", 75 // }, 76 // Resources: []string{ 77 // "*", 78 // }, 79 // }, 80 // }, 81 // }, nil) 82 // if err != nil { 83 // return err 84 // } 85 // _, err = iam.NewRolePolicy(ctx, "foo", &iam.RolePolicyArgs{ 86 // Name: pulumi.String("tf-test-transfer-user-iam-policy"), 87 // Role: fooRole.ID(), 88 // Policy: pulumi.String(foo.Json), 89 // }) 90 // if err != nil { 91 // return err 92 // } 93 // _, err = transfer.NewUser(ctx, "foo", &transfer.UserArgs{ 94 // ServerId: fooServer.ID(), 95 // UserName: pulumi.String("tftestuser"), 96 // Role: fooRole.Arn, 97 // HomeDirectoryType: pulumi.String("LOGICAL"), 98 // HomeDirectoryMappings: transfer.UserHomeDirectoryMappingArray{ 99 // &transfer.UserHomeDirectoryMappingArgs{ 100 // Entry: pulumi.String("/test.pdf"), 101 // Target: pulumi.String("/bucket3/test-path/tftestuser.pdf"), 102 // }, 103 // }, 104 // }) 105 // if err != nil { 106 // return err 107 // } 108 // return nil 109 // }) 110 // } 111 // 112 // ``` 113 // <!--End PulumiCodeChooser --> 114 // 115 // ## Import 116 // 117 // Using `pulumi import`, import Transfer Users using the `server_id` and `user_name` separated by `/`. For example: 118 // 119 // ```sh 120 // $ pulumi import aws:transfer/user:User bar s-12345678/test-username 121 // ``` 122 type User struct { 123 pulumi.CustomResourceState 124 125 // Amazon Resource Name (ARN) of Transfer User 126 Arn pulumi.StringOutput `pulumi:"arn"` 127 // The landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a `/`. The first item in the path is the name of the home bucket (accessible as `${Transfer:HomeBucket}` in the policy) and the rest is the home directory (accessible as `${Transfer:HomeDirectory}` in the policy). For example, `/example-bucket-1234/username` would set the home bucket to `example-bucket-1234` and the home directory to `username`. 128 HomeDirectory pulumi.StringPtrOutput `pulumi:"homeDirectory"` 129 // Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. See Home Directory Mappings below. 130 HomeDirectoryMappings UserHomeDirectoryMappingArrayOutput `pulumi:"homeDirectoryMappings"` 131 // The type of landing directory (folder) you mapped for your users' home directory. Valid values are `PATH` and `LOGICAL`. 132 HomeDirectoryType pulumi.StringPtrOutput `pulumi:"homeDirectoryType"` 133 // An IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include `${Transfer:UserName}`, `${Transfer:HomeDirectory}`, and `${Transfer:HomeBucket}`. These are evaluated on-the-fly when navigating the bucket. 134 Policy pulumi.StringPtrOutput `pulumi:"policy"` 135 // Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users' access to your Amazon EFS file systems. See Posix Profile below. 136 PosixProfile UserPosixProfilePtrOutput `pulumi:"posixProfile"` 137 // Amazon Resource Name (ARN) of an IAM role that allows the service to control your user’s access to your Amazon S3 bucket. 138 Role pulumi.StringOutput `pulumi:"role"` 139 // The Server ID of the Transfer Server (e.g., `s-12345678`) 140 ServerId pulumi.StringOutput `pulumi:"serverId"` 141 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block, tags with matching keys will overwrite those defined at the provider-level. 142 Tags pulumi.StringMapOutput `pulumi:"tags"` 143 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 144 // 145 // Deprecated: Please use `tags` instead. 146 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 147 // The name used for log in to your SFTP server. 148 UserName pulumi.StringOutput `pulumi:"userName"` 149 } 150 151 // NewUser registers a new resource with the given unique name, arguments, and options. 152 func NewUser(ctx *pulumi.Context, 153 name string, args *UserArgs, opts ...pulumi.ResourceOption) (*User, error) { 154 if args == nil { 155 return nil, errors.New("missing one or more required arguments") 156 } 157 158 if args.Role == nil { 159 return nil, errors.New("invalid value for required argument 'Role'") 160 } 161 if args.ServerId == nil { 162 return nil, errors.New("invalid value for required argument 'ServerId'") 163 } 164 if args.UserName == nil { 165 return nil, errors.New("invalid value for required argument 'UserName'") 166 } 167 opts = internal.PkgResourceDefaultOpts(opts) 168 var resource User 169 err := ctx.RegisterResource("aws:transfer/user:User", name, args, &resource, opts...) 170 if err != nil { 171 return nil, err 172 } 173 return &resource, nil 174 } 175 176 // GetUser gets an existing User resource's state with the given name, ID, and optional 177 // state properties that are used to uniquely qualify the lookup (nil if not required). 178 func GetUser(ctx *pulumi.Context, 179 name string, id pulumi.IDInput, state *UserState, opts ...pulumi.ResourceOption) (*User, error) { 180 var resource User 181 err := ctx.ReadResource("aws:transfer/user:User", name, id, state, &resource, opts...) 182 if err != nil { 183 return nil, err 184 } 185 return &resource, nil 186 } 187 188 // Input properties used for looking up and filtering User resources. 189 type userState struct { 190 // Amazon Resource Name (ARN) of Transfer User 191 Arn *string `pulumi:"arn"` 192 // The landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a `/`. The first item in the path is the name of the home bucket (accessible as `${Transfer:HomeBucket}` in the policy) and the rest is the home directory (accessible as `${Transfer:HomeDirectory}` in the policy). For example, `/example-bucket-1234/username` would set the home bucket to `example-bucket-1234` and the home directory to `username`. 193 HomeDirectory *string `pulumi:"homeDirectory"` 194 // Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. See Home Directory Mappings below. 195 HomeDirectoryMappings []UserHomeDirectoryMapping `pulumi:"homeDirectoryMappings"` 196 // The type of landing directory (folder) you mapped for your users' home directory. Valid values are `PATH` and `LOGICAL`. 197 HomeDirectoryType *string `pulumi:"homeDirectoryType"` 198 // An IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include `${Transfer:UserName}`, `${Transfer:HomeDirectory}`, and `${Transfer:HomeBucket}`. These are evaluated on-the-fly when navigating the bucket. 199 Policy *string `pulumi:"policy"` 200 // Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users' access to your Amazon EFS file systems. See Posix Profile below. 201 PosixProfile *UserPosixProfile `pulumi:"posixProfile"` 202 // Amazon Resource Name (ARN) of an IAM role that allows the service to control your user’s access to your Amazon S3 bucket. 203 Role *string `pulumi:"role"` 204 // The Server ID of the Transfer Server (e.g., `s-12345678`) 205 ServerId *string `pulumi:"serverId"` 206 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block, tags with matching keys will overwrite those defined at the provider-level. 207 Tags map[string]string `pulumi:"tags"` 208 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 209 // 210 // Deprecated: Please use `tags` instead. 211 TagsAll map[string]string `pulumi:"tagsAll"` 212 // The name used for log in to your SFTP server. 213 UserName *string `pulumi:"userName"` 214 } 215 216 type UserState struct { 217 // Amazon Resource Name (ARN) of Transfer User 218 Arn pulumi.StringPtrInput 219 // The landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a `/`. The first item in the path is the name of the home bucket (accessible as `${Transfer:HomeBucket}` in the policy) and the rest is the home directory (accessible as `${Transfer:HomeDirectory}` in the policy). For example, `/example-bucket-1234/username` would set the home bucket to `example-bucket-1234` and the home directory to `username`. 220 HomeDirectory pulumi.StringPtrInput 221 // Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. See Home Directory Mappings below. 222 HomeDirectoryMappings UserHomeDirectoryMappingArrayInput 223 // The type of landing directory (folder) you mapped for your users' home directory. Valid values are `PATH` and `LOGICAL`. 224 HomeDirectoryType pulumi.StringPtrInput 225 // An IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include `${Transfer:UserName}`, `${Transfer:HomeDirectory}`, and `${Transfer:HomeBucket}`. These are evaluated on-the-fly when navigating the bucket. 226 Policy pulumi.StringPtrInput 227 // Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users' access to your Amazon EFS file systems. See Posix Profile below. 228 PosixProfile UserPosixProfilePtrInput 229 // Amazon Resource Name (ARN) of an IAM role that allows the service to control your user’s access to your Amazon S3 bucket. 230 Role pulumi.StringPtrInput 231 // The Server ID of the Transfer Server (e.g., `s-12345678`) 232 ServerId pulumi.StringPtrInput 233 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block, tags with matching keys will overwrite those defined at the provider-level. 234 Tags pulumi.StringMapInput 235 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 236 // 237 // Deprecated: Please use `tags` instead. 238 TagsAll pulumi.StringMapInput 239 // The name used for log in to your SFTP server. 240 UserName pulumi.StringPtrInput 241 } 242 243 func (UserState) ElementType() reflect.Type { 244 return reflect.TypeOf((*userState)(nil)).Elem() 245 } 246 247 type userArgs struct { 248 // The landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a `/`. The first item in the path is the name of the home bucket (accessible as `${Transfer:HomeBucket}` in the policy) and the rest is the home directory (accessible as `${Transfer:HomeDirectory}` in the policy). For example, `/example-bucket-1234/username` would set the home bucket to `example-bucket-1234` and the home directory to `username`. 249 HomeDirectory *string `pulumi:"homeDirectory"` 250 // Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. See Home Directory Mappings below. 251 HomeDirectoryMappings []UserHomeDirectoryMapping `pulumi:"homeDirectoryMappings"` 252 // The type of landing directory (folder) you mapped for your users' home directory. Valid values are `PATH` and `LOGICAL`. 253 HomeDirectoryType *string `pulumi:"homeDirectoryType"` 254 // An IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include `${Transfer:UserName}`, `${Transfer:HomeDirectory}`, and `${Transfer:HomeBucket}`. These are evaluated on-the-fly when navigating the bucket. 255 Policy *string `pulumi:"policy"` 256 // Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users' access to your Amazon EFS file systems. See Posix Profile below. 257 PosixProfile *UserPosixProfile `pulumi:"posixProfile"` 258 // Amazon Resource Name (ARN) of an IAM role that allows the service to control your user’s access to your Amazon S3 bucket. 259 Role string `pulumi:"role"` 260 // The Server ID of the Transfer Server (e.g., `s-12345678`) 261 ServerId string `pulumi:"serverId"` 262 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block, tags with matching keys will overwrite those defined at the provider-level. 263 Tags map[string]string `pulumi:"tags"` 264 // The name used for log in to your SFTP server. 265 UserName string `pulumi:"userName"` 266 } 267 268 // The set of arguments for constructing a User resource. 269 type UserArgs struct { 270 // The landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a `/`. The first item in the path is the name of the home bucket (accessible as `${Transfer:HomeBucket}` in the policy) and the rest is the home directory (accessible as `${Transfer:HomeDirectory}` in the policy). For example, `/example-bucket-1234/username` would set the home bucket to `example-bucket-1234` and the home directory to `username`. 271 HomeDirectory pulumi.StringPtrInput 272 // Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. See Home Directory Mappings below. 273 HomeDirectoryMappings UserHomeDirectoryMappingArrayInput 274 // The type of landing directory (folder) you mapped for your users' home directory. Valid values are `PATH` and `LOGICAL`. 275 HomeDirectoryType pulumi.StringPtrInput 276 // An IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include `${Transfer:UserName}`, `${Transfer:HomeDirectory}`, and `${Transfer:HomeBucket}`. These are evaluated on-the-fly when navigating the bucket. 277 Policy pulumi.StringPtrInput 278 // Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users' access to your Amazon EFS file systems. See Posix Profile below. 279 PosixProfile UserPosixProfilePtrInput 280 // Amazon Resource Name (ARN) of an IAM role that allows the service to control your user’s access to your Amazon S3 bucket. 281 Role pulumi.StringInput 282 // The Server ID of the Transfer Server (e.g., `s-12345678`) 283 ServerId pulumi.StringInput 284 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block, tags with matching keys will overwrite those defined at the provider-level. 285 Tags pulumi.StringMapInput 286 // The name used for log in to your SFTP server. 287 UserName pulumi.StringInput 288 } 289 290 func (UserArgs) ElementType() reflect.Type { 291 return reflect.TypeOf((*userArgs)(nil)).Elem() 292 } 293 294 type UserInput interface { 295 pulumi.Input 296 297 ToUserOutput() UserOutput 298 ToUserOutputWithContext(ctx context.Context) UserOutput 299 } 300 301 func (*User) ElementType() reflect.Type { 302 return reflect.TypeOf((**User)(nil)).Elem() 303 } 304 305 func (i *User) ToUserOutput() UserOutput { 306 return i.ToUserOutputWithContext(context.Background()) 307 } 308 309 func (i *User) ToUserOutputWithContext(ctx context.Context) UserOutput { 310 return pulumi.ToOutputWithContext(ctx, i).(UserOutput) 311 } 312 313 // UserArrayInput is an input type that accepts UserArray and UserArrayOutput values. 314 // You can construct a concrete instance of `UserArrayInput` via: 315 // 316 // UserArray{ UserArgs{...} } 317 type UserArrayInput interface { 318 pulumi.Input 319 320 ToUserArrayOutput() UserArrayOutput 321 ToUserArrayOutputWithContext(context.Context) UserArrayOutput 322 } 323 324 type UserArray []UserInput 325 326 func (UserArray) ElementType() reflect.Type { 327 return reflect.TypeOf((*[]*User)(nil)).Elem() 328 } 329 330 func (i UserArray) ToUserArrayOutput() UserArrayOutput { 331 return i.ToUserArrayOutputWithContext(context.Background()) 332 } 333 334 func (i UserArray) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput { 335 return pulumi.ToOutputWithContext(ctx, i).(UserArrayOutput) 336 } 337 338 // UserMapInput is an input type that accepts UserMap and UserMapOutput values. 339 // You can construct a concrete instance of `UserMapInput` via: 340 // 341 // UserMap{ "key": UserArgs{...} } 342 type UserMapInput interface { 343 pulumi.Input 344 345 ToUserMapOutput() UserMapOutput 346 ToUserMapOutputWithContext(context.Context) UserMapOutput 347 } 348 349 type UserMap map[string]UserInput 350 351 func (UserMap) ElementType() reflect.Type { 352 return reflect.TypeOf((*map[string]*User)(nil)).Elem() 353 } 354 355 func (i UserMap) ToUserMapOutput() UserMapOutput { 356 return i.ToUserMapOutputWithContext(context.Background()) 357 } 358 359 func (i UserMap) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput { 360 return pulumi.ToOutputWithContext(ctx, i).(UserMapOutput) 361 } 362 363 type UserOutput struct{ *pulumi.OutputState } 364 365 func (UserOutput) ElementType() reflect.Type { 366 return reflect.TypeOf((**User)(nil)).Elem() 367 } 368 369 func (o UserOutput) ToUserOutput() UserOutput { 370 return o 371 } 372 373 func (o UserOutput) ToUserOutputWithContext(ctx context.Context) UserOutput { 374 return o 375 } 376 377 // Amazon Resource Name (ARN) of Transfer User 378 func (o UserOutput) Arn() pulumi.StringOutput { 379 return o.ApplyT(func(v *User) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 380 } 381 382 // The landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a `/`. The first item in the path is the name of the home bucket (accessible as `${Transfer:HomeBucket}` in the policy) and the rest is the home directory (accessible as `${Transfer:HomeDirectory}` in the policy). For example, `/example-bucket-1234/username` would set the home bucket to `example-bucket-1234` and the home directory to `username`. 383 func (o UserOutput) HomeDirectory() pulumi.StringPtrOutput { 384 return o.ApplyT(func(v *User) pulumi.StringPtrOutput { return v.HomeDirectory }).(pulumi.StringPtrOutput) 385 } 386 387 // Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. See Home Directory Mappings below. 388 func (o UserOutput) HomeDirectoryMappings() UserHomeDirectoryMappingArrayOutput { 389 return o.ApplyT(func(v *User) UserHomeDirectoryMappingArrayOutput { return v.HomeDirectoryMappings }).(UserHomeDirectoryMappingArrayOutput) 390 } 391 392 // The type of landing directory (folder) you mapped for your users' home directory. Valid values are `PATH` and `LOGICAL`. 393 func (o UserOutput) HomeDirectoryType() pulumi.StringPtrOutput { 394 return o.ApplyT(func(v *User) pulumi.StringPtrOutput { return v.HomeDirectoryType }).(pulumi.StringPtrOutput) 395 } 396 397 // An IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include `${Transfer:UserName}`, `${Transfer:HomeDirectory}`, and `${Transfer:HomeBucket}`. These are evaluated on-the-fly when navigating the bucket. 398 func (o UserOutput) Policy() pulumi.StringPtrOutput { 399 return o.ApplyT(func(v *User) pulumi.StringPtrOutput { return v.Policy }).(pulumi.StringPtrOutput) 400 } 401 402 // Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users' access to your Amazon EFS file systems. See Posix Profile below. 403 func (o UserOutput) PosixProfile() UserPosixProfilePtrOutput { 404 return o.ApplyT(func(v *User) UserPosixProfilePtrOutput { return v.PosixProfile }).(UserPosixProfilePtrOutput) 405 } 406 407 // Amazon Resource Name (ARN) of an IAM role that allows the service to control your user’s access to your Amazon S3 bucket. 408 func (o UserOutput) Role() pulumi.StringOutput { 409 return o.ApplyT(func(v *User) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput) 410 } 411 412 // The Server ID of the Transfer Server (e.g., `s-12345678`) 413 func (o UserOutput) ServerId() pulumi.StringOutput { 414 return o.ApplyT(func(v *User) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput) 415 } 416 417 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block, tags with matching keys will overwrite those defined at the provider-level. 418 func (o UserOutput) Tags() pulumi.StringMapOutput { 419 return o.ApplyT(func(v *User) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 420 } 421 422 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 423 // 424 // Deprecated: Please use `tags` instead. 425 func (o UserOutput) TagsAll() pulumi.StringMapOutput { 426 return o.ApplyT(func(v *User) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 427 } 428 429 // The name used for log in to your SFTP server. 430 func (o UserOutput) UserName() pulumi.StringOutput { 431 return o.ApplyT(func(v *User) pulumi.StringOutput { return v.UserName }).(pulumi.StringOutput) 432 } 433 434 type UserArrayOutput struct{ *pulumi.OutputState } 435 436 func (UserArrayOutput) ElementType() reflect.Type { 437 return reflect.TypeOf((*[]*User)(nil)).Elem() 438 } 439 440 func (o UserArrayOutput) ToUserArrayOutput() UserArrayOutput { 441 return o 442 } 443 444 func (o UserArrayOutput) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput { 445 return o 446 } 447 448 func (o UserArrayOutput) Index(i pulumi.IntInput) UserOutput { 449 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *User { 450 return vs[0].([]*User)[vs[1].(int)] 451 }).(UserOutput) 452 } 453 454 type UserMapOutput struct{ *pulumi.OutputState } 455 456 func (UserMapOutput) ElementType() reflect.Type { 457 return reflect.TypeOf((*map[string]*User)(nil)).Elem() 458 } 459 460 func (o UserMapOutput) ToUserMapOutput() UserMapOutput { 461 return o 462 } 463 464 func (o UserMapOutput) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput { 465 return o 466 } 467 468 func (o UserMapOutput) MapIndex(k pulumi.StringInput) UserOutput { 469 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *User { 470 return vs[0].(map[string]*User)[vs[1].(string)] 471 }).(UserOutput) 472 } 473 474 func init() { 475 pulumi.RegisterInputType(reflect.TypeOf((*UserInput)(nil)).Elem(), &User{}) 476 pulumi.RegisterInputType(reflect.TypeOf((*UserArrayInput)(nil)).Elem(), UserArray{}) 477 pulumi.RegisterInputType(reflect.TypeOf((*UserMapInput)(nil)).Elem(), UserMap{}) 478 pulumi.RegisterOutputType(UserOutput{}) 479 pulumi.RegisterOutputType(UserArrayOutput{}) 480 pulumi.RegisterOutputType(UserMapOutput{}) 481 }