github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/organizations/account.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 organizations 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 // Provides a resource to create a member account in the current organization. 16 // 17 // > **Note:** Account management must be done from the organization's root account. 18 // 19 // > **Note:** By default, deleting this resource will only remove an AWS account from an organization. You must set the `closeOnDeletion` flag to true to close the account. It is worth noting that quotas are enforced when using the `closeOnDeletion` argument, which can produce a [CLOSE_ACCOUNT_QUOTA_EXCEEDED](https://docs.aws.amazon.com/organizations/latest/APIReference/API_CloseAccount.html) error, and require you to close the account manually. 20 // 21 // ## Example Usage 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // _, err := organizations.NewAccount(ctx, "account", &organizations.AccountArgs{ 37 // Name: pulumi.String("my_new_account"), 38 // Email: pulumi.String("john@doe.org"), 39 // }) 40 // if err != nil { 41 // return err 42 // } 43 // return nil 44 // }) 45 // } 46 // 47 // ``` 48 // <!--End PulumiCodeChooser --> 49 // 50 // ## Import 51 // 52 // Using `pulumi import`, import the AWS member account using the `account_id`. For example: 53 // 54 // ```sh 55 // $ pulumi import aws:organizations/account:Account my_account 111111111111 56 // ``` 57 // Certain resource arguments, like `role_name`, do not have an Organizations API method for reading the information after account creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example: 58 type Account struct { 59 pulumi.CustomResourceState 60 61 // The ARN for this account. 62 Arn pulumi.StringOutput `pulumi:"arn"` 63 // If true, a deletion event will close the account. Otherwise, it will only remove from the organization. This is not supported for GovCloud accounts. 64 CloseOnDeletion pulumi.BoolPtrOutput `pulumi:"closeOnDeletion"` 65 // Whether to also create a GovCloud account. The GovCloud account is tied to the main (commercial) account this resource creates. If `true`, the GovCloud account ID is available in the `govcloudId` attribute. The only way to manage the GovCloud account with the provider is to subsequently import the account using this resource. 66 CreateGovcloud pulumi.BoolPtrOutput `pulumi:"createGovcloud"` 67 // Email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. 68 Email pulumi.StringOutput `pulumi:"email"` 69 // ID for a GovCloud account created with the account. 70 GovcloudId pulumi.StringOutput `pulumi:"govcloudId"` 71 // If set to `ALLOW`, the new account enables IAM users and roles to access account billing information if they have the required permissions. If set to `DENY`, then only the root user (and no roles) of the new account can access account billing information. If this is unset, the AWS API will default this to `ALLOW`. If the resource is created and this option is changed, it will try to recreate the account. 72 IamUserAccessToBilling pulumi.StringPtrOutput `pulumi:"iamUserAccessToBilling"` 73 JoinedMethod pulumi.StringOutput `pulumi:"joinedMethod"` 74 JoinedTimestamp pulumi.StringOutput `pulumi:"joinedTimestamp"` 75 // Friendly name for the member account. 76 // 77 // The following arguments are optional: 78 Name pulumi.StringOutput `pulumi:"name"` 79 // Parent Organizational Unit ID or Root ID for the account. Defaults to the Organization default Root ID. A configuration must be present for this argument to perform drift detection. 80 ParentId pulumi.StringOutput `pulumi:"parentId"` 81 // The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the root account, allowing users in the root account to assume the role, as permitted by the root account administrator. The role has administrator permissions in the new member account. The Organizations API provides no method for reading this information after account creation, so the provider cannot perform drift detection on its value and will always show a difference for a configured value after import unless `ignoreChanges` is used. 82 RoleName pulumi.StringPtrOutput `pulumi:"roleName"` 83 // The status of the account in the organization. 84 Status pulumi.StringOutput `pulumi:"status"` 85 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 86 Tags pulumi.StringMapOutput `pulumi:"tags"` 87 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 88 // 89 // Deprecated: Please use `tags` instead. 90 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 91 } 92 93 // NewAccount registers a new resource with the given unique name, arguments, and options. 94 func NewAccount(ctx *pulumi.Context, 95 name string, args *AccountArgs, opts ...pulumi.ResourceOption) (*Account, error) { 96 if args == nil { 97 return nil, errors.New("missing one or more required arguments") 98 } 99 100 if args.Email == nil { 101 return nil, errors.New("invalid value for required argument 'Email'") 102 } 103 opts = internal.PkgResourceDefaultOpts(opts) 104 var resource Account 105 err := ctx.RegisterResource("aws:organizations/account:Account", name, args, &resource, opts...) 106 if err != nil { 107 return nil, err 108 } 109 return &resource, nil 110 } 111 112 // GetAccount gets an existing Account resource's state with the given name, ID, and optional 113 // state properties that are used to uniquely qualify the lookup (nil if not required). 114 func GetAccount(ctx *pulumi.Context, 115 name string, id pulumi.IDInput, state *AccountState, opts ...pulumi.ResourceOption) (*Account, error) { 116 var resource Account 117 err := ctx.ReadResource("aws:organizations/account:Account", name, id, state, &resource, opts...) 118 if err != nil { 119 return nil, err 120 } 121 return &resource, nil 122 } 123 124 // Input properties used for looking up and filtering Account resources. 125 type accountState struct { 126 // The ARN for this account. 127 Arn *string `pulumi:"arn"` 128 // If true, a deletion event will close the account. Otherwise, it will only remove from the organization. This is not supported for GovCloud accounts. 129 CloseOnDeletion *bool `pulumi:"closeOnDeletion"` 130 // Whether to also create a GovCloud account. The GovCloud account is tied to the main (commercial) account this resource creates. If `true`, the GovCloud account ID is available in the `govcloudId` attribute. The only way to manage the GovCloud account with the provider is to subsequently import the account using this resource. 131 CreateGovcloud *bool `pulumi:"createGovcloud"` 132 // Email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. 133 Email *string `pulumi:"email"` 134 // ID for a GovCloud account created with the account. 135 GovcloudId *string `pulumi:"govcloudId"` 136 // If set to `ALLOW`, the new account enables IAM users and roles to access account billing information if they have the required permissions. If set to `DENY`, then only the root user (and no roles) of the new account can access account billing information. If this is unset, the AWS API will default this to `ALLOW`. If the resource is created and this option is changed, it will try to recreate the account. 137 IamUserAccessToBilling *string `pulumi:"iamUserAccessToBilling"` 138 JoinedMethod *string `pulumi:"joinedMethod"` 139 JoinedTimestamp *string `pulumi:"joinedTimestamp"` 140 // Friendly name for the member account. 141 // 142 // The following arguments are optional: 143 Name *string `pulumi:"name"` 144 // Parent Organizational Unit ID or Root ID for the account. Defaults to the Organization default Root ID. A configuration must be present for this argument to perform drift detection. 145 ParentId *string `pulumi:"parentId"` 146 // The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the root account, allowing users in the root account to assume the role, as permitted by the root account administrator. The role has administrator permissions in the new member account. The Organizations API provides no method for reading this information after account creation, so the provider cannot perform drift detection on its value and will always show a difference for a configured value after import unless `ignoreChanges` is used. 147 RoleName *string `pulumi:"roleName"` 148 // The status of the account in the organization. 149 Status *string `pulumi:"status"` 150 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 151 Tags map[string]string `pulumi:"tags"` 152 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 153 // 154 // Deprecated: Please use `tags` instead. 155 TagsAll map[string]string `pulumi:"tagsAll"` 156 } 157 158 type AccountState struct { 159 // The ARN for this account. 160 Arn pulumi.StringPtrInput 161 // If true, a deletion event will close the account. Otherwise, it will only remove from the organization. This is not supported for GovCloud accounts. 162 CloseOnDeletion pulumi.BoolPtrInput 163 // Whether to also create a GovCloud account. The GovCloud account is tied to the main (commercial) account this resource creates. If `true`, the GovCloud account ID is available in the `govcloudId` attribute. The only way to manage the GovCloud account with the provider is to subsequently import the account using this resource. 164 CreateGovcloud pulumi.BoolPtrInput 165 // Email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. 166 Email pulumi.StringPtrInput 167 // ID for a GovCloud account created with the account. 168 GovcloudId pulumi.StringPtrInput 169 // If set to `ALLOW`, the new account enables IAM users and roles to access account billing information if they have the required permissions. If set to `DENY`, then only the root user (and no roles) of the new account can access account billing information. If this is unset, the AWS API will default this to `ALLOW`. If the resource is created and this option is changed, it will try to recreate the account. 170 IamUserAccessToBilling pulumi.StringPtrInput 171 JoinedMethod pulumi.StringPtrInput 172 JoinedTimestamp pulumi.StringPtrInput 173 // Friendly name for the member account. 174 // 175 // The following arguments are optional: 176 Name pulumi.StringPtrInput 177 // Parent Organizational Unit ID or Root ID for the account. Defaults to the Organization default Root ID. A configuration must be present for this argument to perform drift detection. 178 ParentId pulumi.StringPtrInput 179 // The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the root account, allowing users in the root account to assume the role, as permitted by the root account administrator. The role has administrator permissions in the new member account. The Organizations API provides no method for reading this information after account creation, so the provider cannot perform drift detection on its value and will always show a difference for a configured value after import unless `ignoreChanges` is used. 180 RoleName pulumi.StringPtrInput 181 // The status of the account in the organization. 182 Status pulumi.StringPtrInput 183 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 184 Tags pulumi.StringMapInput 185 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 186 // 187 // Deprecated: Please use `tags` instead. 188 TagsAll pulumi.StringMapInput 189 } 190 191 func (AccountState) ElementType() reflect.Type { 192 return reflect.TypeOf((*accountState)(nil)).Elem() 193 } 194 195 type accountArgs struct { 196 // If true, a deletion event will close the account. Otherwise, it will only remove from the organization. This is not supported for GovCloud accounts. 197 CloseOnDeletion *bool `pulumi:"closeOnDeletion"` 198 // Whether to also create a GovCloud account. The GovCloud account is tied to the main (commercial) account this resource creates. If `true`, the GovCloud account ID is available in the `govcloudId` attribute. The only way to manage the GovCloud account with the provider is to subsequently import the account using this resource. 199 CreateGovcloud *bool `pulumi:"createGovcloud"` 200 // Email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. 201 Email string `pulumi:"email"` 202 // If set to `ALLOW`, the new account enables IAM users and roles to access account billing information if they have the required permissions. If set to `DENY`, then only the root user (and no roles) of the new account can access account billing information. If this is unset, the AWS API will default this to `ALLOW`. If the resource is created and this option is changed, it will try to recreate the account. 203 IamUserAccessToBilling *string `pulumi:"iamUserAccessToBilling"` 204 // Friendly name for the member account. 205 // 206 // The following arguments are optional: 207 Name *string `pulumi:"name"` 208 // Parent Organizational Unit ID or Root ID for the account. Defaults to the Organization default Root ID. A configuration must be present for this argument to perform drift detection. 209 ParentId *string `pulumi:"parentId"` 210 // The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the root account, allowing users in the root account to assume the role, as permitted by the root account administrator. The role has administrator permissions in the new member account. The Organizations API provides no method for reading this information after account creation, so the provider cannot perform drift detection on its value and will always show a difference for a configured value after import unless `ignoreChanges` is used. 211 RoleName *string `pulumi:"roleName"` 212 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 213 Tags map[string]string `pulumi:"tags"` 214 } 215 216 // The set of arguments for constructing a Account resource. 217 type AccountArgs struct { 218 // If true, a deletion event will close the account. Otherwise, it will only remove from the organization. This is not supported for GovCloud accounts. 219 CloseOnDeletion pulumi.BoolPtrInput 220 // Whether to also create a GovCloud account. The GovCloud account is tied to the main (commercial) account this resource creates. If `true`, the GovCloud account ID is available in the `govcloudId` attribute. The only way to manage the GovCloud account with the provider is to subsequently import the account using this resource. 221 CreateGovcloud pulumi.BoolPtrInput 222 // Email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. 223 Email pulumi.StringInput 224 // If set to `ALLOW`, the new account enables IAM users and roles to access account billing information if they have the required permissions. If set to `DENY`, then only the root user (and no roles) of the new account can access account billing information. If this is unset, the AWS API will default this to `ALLOW`. If the resource is created and this option is changed, it will try to recreate the account. 225 IamUserAccessToBilling pulumi.StringPtrInput 226 // Friendly name for the member account. 227 // 228 // The following arguments are optional: 229 Name pulumi.StringPtrInput 230 // Parent Organizational Unit ID or Root ID for the account. Defaults to the Organization default Root ID. A configuration must be present for this argument to perform drift detection. 231 ParentId pulumi.StringPtrInput 232 // The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the root account, allowing users in the root account to assume the role, as permitted by the root account administrator. The role has administrator permissions in the new member account. The Organizations API provides no method for reading this information after account creation, so the provider cannot perform drift detection on its value and will always show a difference for a configured value after import unless `ignoreChanges` is used. 233 RoleName pulumi.StringPtrInput 234 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 235 Tags pulumi.StringMapInput 236 } 237 238 func (AccountArgs) ElementType() reflect.Type { 239 return reflect.TypeOf((*accountArgs)(nil)).Elem() 240 } 241 242 type AccountInput interface { 243 pulumi.Input 244 245 ToAccountOutput() AccountOutput 246 ToAccountOutputWithContext(ctx context.Context) AccountOutput 247 } 248 249 func (*Account) ElementType() reflect.Type { 250 return reflect.TypeOf((**Account)(nil)).Elem() 251 } 252 253 func (i *Account) ToAccountOutput() AccountOutput { 254 return i.ToAccountOutputWithContext(context.Background()) 255 } 256 257 func (i *Account) ToAccountOutputWithContext(ctx context.Context) AccountOutput { 258 return pulumi.ToOutputWithContext(ctx, i).(AccountOutput) 259 } 260 261 // AccountArrayInput is an input type that accepts AccountArray and AccountArrayOutput values. 262 // You can construct a concrete instance of `AccountArrayInput` via: 263 // 264 // AccountArray{ AccountArgs{...} } 265 type AccountArrayInput interface { 266 pulumi.Input 267 268 ToAccountArrayOutput() AccountArrayOutput 269 ToAccountArrayOutputWithContext(context.Context) AccountArrayOutput 270 } 271 272 type AccountArray []AccountInput 273 274 func (AccountArray) ElementType() reflect.Type { 275 return reflect.TypeOf((*[]*Account)(nil)).Elem() 276 } 277 278 func (i AccountArray) ToAccountArrayOutput() AccountArrayOutput { 279 return i.ToAccountArrayOutputWithContext(context.Background()) 280 } 281 282 func (i AccountArray) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput { 283 return pulumi.ToOutputWithContext(ctx, i).(AccountArrayOutput) 284 } 285 286 // AccountMapInput is an input type that accepts AccountMap and AccountMapOutput values. 287 // You can construct a concrete instance of `AccountMapInput` via: 288 // 289 // AccountMap{ "key": AccountArgs{...} } 290 type AccountMapInput interface { 291 pulumi.Input 292 293 ToAccountMapOutput() AccountMapOutput 294 ToAccountMapOutputWithContext(context.Context) AccountMapOutput 295 } 296 297 type AccountMap map[string]AccountInput 298 299 func (AccountMap) ElementType() reflect.Type { 300 return reflect.TypeOf((*map[string]*Account)(nil)).Elem() 301 } 302 303 func (i AccountMap) ToAccountMapOutput() AccountMapOutput { 304 return i.ToAccountMapOutputWithContext(context.Background()) 305 } 306 307 func (i AccountMap) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput { 308 return pulumi.ToOutputWithContext(ctx, i).(AccountMapOutput) 309 } 310 311 type AccountOutput struct{ *pulumi.OutputState } 312 313 func (AccountOutput) ElementType() reflect.Type { 314 return reflect.TypeOf((**Account)(nil)).Elem() 315 } 316 317 func (o AccountOutput) ToAccountOutput() AccountOutput { 318 return o 319 } 320 321 func (o AccountOutput) ToAccountOutputWithContext(ctx context.Context) AccountOutput { 322 return o 323 } 324 325 // The ARN for this account. 326 func (o AccountOutput) Arn() pulumi.StringOutput { 327 return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 328 } 329 330 // If true, a deletion event will close the account. Otherwise, it will only remove from the organization. This is not supported for GovCloud accounts. 331 func (o AccountOutput) CloseOnDeletion() pulumi.BoolPtrOutput { 332 return o.ApplyT(func(v *Account) pulumi.BoolPtrOutput { return v.CloseOnDeletion }).(pulumi.BoolPtrOutput) 333 } 334 335 // Whether to also create a GovCloud account. The GovCloud account is tied to the main (commercial) account this resource creates. If `true`, the GovCloud account ID is available in the `govcloudId` attribute. The only way to manage the GovCloud account with the provider is to subsequently import the account using this resource. 336 func (o AccountOutput) CreateGovcloud() pulumi.BoolPtrOutput { 337 return o.ApplyT(func(v *Account) pulumi.BoolPtrOutput { return v.CreateGovcloud }).(pulumi.BoolPtrOutput) 338 } 339 340 // Email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. 341 func (o AccountOutput) Email() pulumi.StringOutput { 342 return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Email }).(pulumi.StringOutput) 343 } 344 345 // ID for a GovCloud account created with the account. 346 func (o AccountOutput) GovcloudId() pulumi.StringOutput { 347 return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.GovcloudId }).(pulumi.StringOutput) 348 } 349 350 // If set to `ALLOW`, the new account enables IAM users and roles to access account billing information if they have the required permissions. If set to `DENY`, then only the root user (and no roles) of the new account can access account billing information. If this is unset, the AWS API will default this to `ALLOW`. If the resource is created and this option is changed, it will try to recreate the account. 351 func (o AccountOutput) IamUserAccessToBilling() pulumi.StringPtrOutput { 352 return o.ApplyT(func(v *Account) pulumi.StringPtrOutput { return v.IamUserAccessToBilling }).(pulumi.StringPtrOutput) 353 } 354 355 func (o AccountOutput) JoinedMethod() pulumi.StringOutput { 356 return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.JoinedMethod }).(pulumi.StringOutput) 357 } 358 359 func (o AccountOutput) JoinedTimestamp() pulumi.StringOutput { 360 return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.JoinedTimestamp }).(pulumi.StringOutput) 361 } 362 363 // Friendly name for the member account. 364 // 365 // The following arguments are optional: 366 func (o AccountOutput) Name() pulumi.StringOutput { 367 return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 368 } 369 370 // Parent Organizational Unit ID or Root ID for the account. Defaults to the Organization default Root ID. A configuration must be present for this argument to perform drift detection. 371 func (o AccountOutput) ParentId() pulumi.StringOutput { 372 return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.ParentId }).(pulumi.StringOutput) 373 } 374 375 // The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the root account, allowing users in the root account to assume the role, as permitted by the root account administrator. The role has administrator permissions in the new member account. The Organizations API provides no method for reading this information after account creation, so the provider cannot perform drift detection on its value and will always show a difference for a configured value after import unless `ignoreChanges` is used. 376 func (o AccountOutput) RoleName() pulumi.StringPtrOutput { 377 return o.ApplyT(func(v *Account) pulumi.StringPtrOutput { return v.RoleName }).(pulumi.StringPtrOutput) 378 } 379 380 // The status of the account in the organization. 381 func (o AccountOutput) Status() pulumi.StringOutput { 382 return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 383 } 384 385 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 386 func (o AccountOutput) Tags() pulumi.StringMapOutput { 387 return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 388 } 389 390 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 391 // 392 // Deprecated: Please use `tags` instead. 393 func (o AccountOutput) TagsAll() pulumi.StringMapOutput { 394 return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 395 } 396 397 type AccountArrayOutput struct{ *pulumi.OutputState } 398 399 func (AccountArrayOutput) ElementType() reflect.Type { 400 return reflect.TypeOf((*[]*Account)(nil)).Elem() 401 } 402 403 func (o AccountArrayOutput) ToAccountArrayOutput() AccountArrayOutput { 404 return o 405 } 406 407 func (o AccountArrayOutput) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput { 408 return o 409 } 410 411 func (o AccountArrayOutput) Index(i pulumi.IntInput) AccountOutput { 412 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Account { 413 return vs[0].([]*Account)[vs[1].(int)] 414 }).(AccountOutput) 415 } 416 417 type AccountMapOutput struct{ *pulumi.OutputState } 418 419 func (AccountMapOutput) ElementType() reflect.Type { 420 return reflect.TypeOf((*map[string]*Account)(nil)).Elem() 421 } 422 423 func (o AccountMapOutput) ToAccountMapOutput() AccountMapOutput { 424 return o 425 } 426 427 func (o AccountMapOutput) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput { 428 return o 429 } 430 431 func (o AccountMapOutput) MapIndex(k pulumi.StringInput) AccountOutput { 432 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Account { 433 return vs[0].(map[string]*Account)[vs[1].(string)] 434 }).(AccountOutput) 435 } 436 437 func init() { 438 pulumi.RegisterInputType(reflect.TypeOf((*AccountInput)(nil)).Elem(), &Account{}) 439 pulumi.RegisterInputType(reflect.TypeOf((*AccountArrayInput)(nil)).Elem(), AccountArray{}) 440 pulumi.RegisterInputType(reflect.TypeOf((*AccountMapInput)(nil)).Elem(), AccountMap{}) 441 pulumi.RegisterOutputType(AccountOutput{}) 442 pulumi.RegisterOutputType(AccountArrayOutput{}) 443 pulumi.RegisterOutputType(AccountMapOutput{}) 444 }