github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/s3/bucketWebsiteConfigurationV2.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 s3 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 an S3 bucket website configuration resource. For more information, see [Hosting Websites on S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). 16 // 17 // > This resource cannot be used with S3 directory buckets. 18 // 19 // ## Example Usage 20 // 21 // ### With `routingRule` configured 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 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 := s3.NewBucketWebsiteConfigurationV2(ctx, "example", &s3.BucketWebsiteConfigurationV2Args{ 37 // Bucket: pulumi.Any(exampleAwsS3Bucket.Id), 38 // IndexDocument: &s3.BucketWebsiteConfigurationV2IndexDocumentArgs{ 39 // Suffix: pulumi.String("index.html"), 40 // }, 41 // ErrorDocument: &s3.BucketWebsiteConfigurationV2ErrorDocumentArgs{ 42 // Key: pulumi.String("error.html"), 43 // }, 44 // RoutingRules: s3.BucketWebsiteConfigurationV2RoutingRuleArray{ 45 // &s3.BucketWebsiteConfigurationV2RoutingRuleArgs{ 46 // Condition: &s3.BucketWebsiteConfigurationV2RoutingRuleConditionArgs{ 47 // KeyPrefixEquals: pulumi.String("docs/"), 48 // }, 49 // Redirect: &s3.BucketWebsiteConfigurationV2RoutingRuleRedirectArgs{ 50 // ReplaceKeyPrefixWith: pulumi.String("documents/"), 51 // }, 52 // }, 53 // }, 54 // }) 55 // if err != nil { 56 // return err 57 // } 58 // return nil 59 // }) 60 // } 61 // 62 // ``` 63 // <!--End PulumiCodeChooser --> 64 // 65 // ### With `routingRules` configured 66 // 67 // <!--Start PulumiCodeChooser --> 68 // ```go 69 // package main 70 // 71 // import ( 72 // 73 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 74 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 75 // 76 // ) 77 // 78 // func main() { 79 // pulumi.Run(func(ctx *pulumi.Context) error { 80 // _, err := s3.NewBucketWebsiteConfigurationV2(ctx, "example", &s3.BucketWebsiteConfigurationV2Args{ 81 // Bucket: pulumi.Any(exampleAwsS3Bucket.Id), 82 // IndexDocument: &s3.BucketWebsiteConfigurationV2IndexDocumentArgs{ 83 // Suffix: pulumi.String("index.html"), 84 // }, 85 // ErrorDocument: &s3.BucketWebsiteConfigurationV2ErrorDocumentArgs{ 86 // Key: pulumi.String("error.html"), 87 // }, 88 // RoutingRuleDetails: pulumi.String(`[{ 89 // "Condition": { 90 // "KeyPrefixEquals": "docs/" 91 // }, 92 // "Redirect": { 93 // "ReplaceKeyPrefixWith": "" 94 // } 95 // }] 96 // 97 // `), 98 // 99 // }) 100 // if err != nil { 101 // return err 102 // } 103 // return nil 104 // }) 105 // } 106 // 107 // ``` 108 // <!--End PulumiCodeChooser --> 109 // 110 // ## Import 111 // 112 // If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expected_bucket_owner` separated by a comma (`,`): 113 // 114 // __Using `pulumi import` to import__ S3 bucket website configuration using the `bucket` or using the `bucket` and `expected_bucket_owner` separated by a comma (`,`). For example: 115 // 116 // If the owner (account ID) of the source bucket is the same account used to configure the AWS Provider, import using the `bucket`: 117 // 118 // ```sh 119 // $ pulumi import aws:s3/bucketWebsiteConfigurationV2:BucketWebsiteConfigurationV2 example bucket-name 120 // ``` 121 // If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expected_bucket_owner` separated by a comma (`,`): 122 // 123 // ```sh 124 // $ pulumi import aws:s3/bucketWebsiteConfigurationV2:BucketWebsiteConfigurationV2 example bucket-name,123456789012 125 // ``` 126 type BucketWebsiteConfigurationV2 struct { 127 pulumi.CustomResourceState 128 129 // Name of the bucket. 130 Bucket pulumi.StringOutput `pulumi:"bucket"` 131 // Name of the error document for the website. See below. 132 ErrorDocument BucketWebsiteConfigurationV2ErrorDocumentPtrOutput `pulumi:"errorDocument"` 133 // Account ID of the expected bucket owner. 134 ExpectedBucketOwner pulumi.StringPtrOutput `pulumi:"expectedBucketOwner"` 135 // Name of the index document for the website. See below. 136 IndexDocument BucketWebsiteConfigurationV2IndexDocumentPtrOutput `pulumi:"indexDocument"` 137 // Redirect behavior for every request to this bucket's website endpoint. See below. Conflicts with `errorDocument`, `indexDocument`, and `routingRule`. 138 RedirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToPtrOutput `pulumi:"redirectAllRequestsTo"` 139 // JSON array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html) 140 // describing redirect behavior and when redirects are applied. Use this parameter when your routing rules contain empty String values (`""`) as seen in the example above. 141 RoutingRuleDetails pulumi.StringOutput `pulumi:"routingRuleDetails"` 142 // List of rules that define when a redirect is applied and the redirect behavior. See below. 143 RoutingRules BucketWebsiteConfigurationV2RoutingRuleArrayOutput `pulumi:"routingRules"` 144 // Domain of the website endpoint. This is used to create Route 53 alias records. 145 WebsiteDomain pulumi.StringOutput `pulumi:"websiteDomain"` 146 // Website endpoint. 147 WebsiteEndpoint pulumi.StringOutput `pulumi:"websiteEndpoint"` 148 } 149 150 // NewBucketWebsiteConfigurationV2 registers a new resource with the given unique name, arguments, and options. 151 func NewBucketWebsiteConfigurationV2(ctx *pulumi.Context, 152 name string, args *BucketWebsiteConfigurationV2Args, opts ...pulumi.ResourceOption) (*BucketWebsiteConfigurationV2, error) { 153 if args == nil { 154 return nil, errors.New("missing one or more required arguments") 155 } 156 157 if args.Bucket == nil { 158 return nil, errors.New("invalid value for required argument 'Bucket'") 159 } 160 opts = internal.PkgResourceDefaultOpts(opts) 161 var resource BucketWebsiteConfigurationV2 162 err := ctx.RegisterResource("aws:s3/bucketWebsiteConfigurationV2:BucketWebsiteConfigurationV2", name, args, &resource, opts...) 163 if err != nil { 164 return nil, err 165 } 166 return &resource, nil 167 } 168 169 // GetBucketWebsiteConfigurationV2 gets an existing BucketWebsiteConfigurationV2 resource's state with the given name, ID, and optional 170 // state properties that are used to uniquely qualify the lookup (nil if not required). 171 func GetBucketWebsiteConfigurationV2(ctx *pulumi.Context, 172 name string, id pulumi.IDInput, state *BucketWebsiteConfigurationV2State, opts ...pulumi.ResourceOption) (*BucketWebsiteConfigurationV2, error) { 173 var resource BucketWebsiteConfigurationV2 174 err := ctx.ReadResource("aws:s3/bucketWebsiteConfigurationV2:BucketWebsiteConfigurationV2", name, id, state, &resource, opts...) 175 if err != nil { 176 return nil, err 177 } 178 return &resource, nil 179 } 180 181 // Input properties used for looking up and filtering BucketWebsiteConfigurationV2 resources. 182 type bucketWebsiteConfigurationV2State struct { 183 // Name of the bucket. 184 Bucket *string `pulumi:"bucket"` 185 // Name of the error document for the website. See below. 186 ErrorDocument *BucketWebsiteConfigurationV2ErrorDocument `pulumi:"errorDocument"` 187 // Account ID of the expected bucket owner. 188 ExpectedBucketOwner *string `pulumi:"expectedBucketOwner"` 189 // Name of the index document for the website. See below. 190 IndexDocument *BucketWebsiteConfigurationV2IndexDocument `pulumi:"indexDocument"` 191 // Redirect behavior for every request to this bucket's website endpoint. See below. Conflicts with `errorDocument`, `indexDocument`, and `routingRule`. 192 RedirectAllRequestsTo *BucketWebsiteConfigurationV2RedirectAllRequestsTo `pulumi:"redirectAllRequestsTo"` 193 // JSON array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html) 194 // describing redirect behavior and when redirects are applied. Use this parameter when your routing rules contain empty String values (`""`) as seen in the example above. 195 RoutingRuleDetails *string `pulumi:"routingRuleDetails"` 196 // List of rules that define when a redirect is applied and the redirect behavior. See below. 197 RoutingRules []BucketWebsiteConfigurationV2RoutingRule `pulumi:"routingRules"` 198 // Domain of the website endpoint. This is used to create Route 53 alias records. 199 WebsiteDomain *string `pulumi:"websiteDomain"` 200 // Website endpoint. 201 WebsiteEndpoint *string `pulumi:"websiteEndpoint"` 202 } 203 204 type BucketWebsiteConfigurationV2State struct { 205 // Name of the bucket. 206 Bucket pulumi.StringPtrInput 207 // Name of the error document for the website. See below. 208 ErrorDocument BucketWebsiteConfigurationV2ErrorDocumentPtrInput 209 // Account ID of the expected bucket owner. 210 ExpectedBucketOwner pulumi.StringPtrInput 211 // Name of the index document for the website. See below. 212 IndexDocument BucketWebsiteConfigurationV2IndexDocumentPtrInput 213 // Redirect behavior for every request to this bucket's website endpoint. See below. Conflicts with `errorDocument`, `indexDocument`, and `routingRule`. 214 RedirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToPtrInput 215 // JSON array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html) 216 // describing redirect behavior and when redirects are applied. Use this parameter when your routing rules contain empty String values (`""`) as seen in the example above. 217 RoutingRuleDetails pulumi.StringPtrInput 218 // List of rules that define when a redirect is applied and the redirect behavior. See below. 219 RoutingRules BucketWebsiteConfigurationV2RoutingRuleArrayInput 220 // Domain of the website endpoint. This is used to create Route 53 alias records. 221 WebsiteDomain pulumi.StringPtrInput 222 // Website endpoint. 223 WebsiteEndpoint pulumi.StringPtrInput 224 } 225 226 func (BucketWebsiteConfigurationV2State) ElementType() reflect.Type { 227 return reflect.TypeOf((*bucketWebsiteConfigurationV2State)(nil)).Elem() 228 } 229 230 type bucketWebsiteConfigurationV2Args struct { 231 // Name of the bucket. 232 Bucket string `pulumi:"bucket"` 233 // Name of the error document for the website. See below. 234 ErrorDocument *BucketWebsiteConfigurationV2ErrorDocument `pulumi:"errorDocument"` 235 // Account ID of the expected bucket owner. 236 ExpectedBucketOwner *string `pulumi:"expectedBucketOwner"` 237 // Name of the index document for the website. See below. 238 IndexDocument *BucketWebsiteConfigurationV2IndexDocument `pulumi:"indexDocument"` 239 // Redirect behavior for every request to this bucket's website endpoint. See below. Conflicts with `errorDocument`, `indexDocument`, and `routingRule`. 240 RedirectAllRequestsTo *BucketWebsiteConfigurationV2RedirectAllRequestsTo `pulumi:"redirectAllRequestsTo"` 241 // JSON array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html) 242 // describing redirect behavior and when redirects are applied. Use this parameter when your routing rules contain empty String values (`""`) as seen in the example above. 243 RoutingRuleDetails *string `pulumi:"routingRuleDetails"` 244 // List of rules that define when a redirect is applied and the redirect behavior. See below. 245 RoutingRules []BucketWebsiteConfigurationV2RoutingRule `pulumi:"routingRules"` 246 } 247 248 // The set of arguments for constructing a BucketWebsiteConfigurationV2 resource. 249 type BucketWebsiteConfigurationV2Args struct { 250 // Name of the bucket. 251 Bucket pulumi.StringInput 252 // Name of the error document for the website. See below. 253 ErrorDocument BucketWebsiteConfigurationV2ErrorDocumentPtrInput 254 // Account ID of the expected bucket owner. 255 ExpectedBucketOwner pulumi.StringPtrInput 256 // Name of the index document for the website. See below. 257 IndexDocument BucketWebsiteConfigurationV2IndexDocumentPtrInput 258 // Redirect behavior for every request to this bucket's website endpoint. See below. Conflicts with `errorDocument`, `indexDocument`, and `routingRule`. 259 RedirectAllRequestsTo BucketWebsiteConfigurationV2RedirectAllRequestsToPtrInput 260 // JSON array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html) 261 // describing redirect behavior and when redirects are applied. Use this parameter when your routing rules contain empty String values (`""`) as seen in the example above. 262 RoutingRuleDetails pulumi.StringPtrInput 263 // List of rules that define when a redirect is applied and the redirect behavior. See below. 264 RoutingRules BucketWebsiteConfigurationV2RoutingRuleArrayInput 265 } 266 267 func (BucketWebsiteConfigurationV2Args) ElementType() reflect.Type { 268 return reflect.TypeOf((*bucketWebsiteConfigurationV2Args)(nil)).Elem() 269 } 270 271 type BucketWebsiteConfigurationV2Input interface { 272 pulumi.Input 273 274 ToBucketWebsiteConfigurationV2Output() BucketWebsiteConfigurationV2Output 275 ToBucketWebsiteConfigurationV2OutputWithContext(ctx context.Context) BucketWebsiteConfigurationV2Output 276 } 277 278 func (*BucketWebsiteConfigurationV2) ElementType() reflect.Type { 279 return reflect.TypeOf((**BucketWebsiteConfigurationV2)(nil)).Elem() 280 } 281 282 func (i *BucketWebsiteConfigurationV2) ToBucketWebsiteConfigurationV2Output() BucketWebsiteConfigurationV2Output { 283 return i.ToBucketWebsiteConfigurationV2OutputWithContext(context.Background()) 284 } 285 286 func (i *BucketWebsiteConfigurationV2) ToBucketWebsiteConfigurationV2OutputWithContext(ctx context.Context) BucketWebsiteConfigurationV2Output { 287 return pulumi.ToOutputWithContext(ctx, i).(BucketWebsiteConfigurationV2Output) 288 } 289 290 // BucketWebsiteConfigurationV2ArrayInput is an input type that accepts BucketWebsiteConfigurationV2Array and BucketWebsiteConfigurationV2ArrayOutput values. 291 // You can construct a concrete instance of `BucketWebsiteConfigurationV2ArrayInput` via: 292 // 293 // BucketWebsiteConfigurationV2Array{ BucketWebsiteConfigurationV2Args{...} } 294 type BucketWebsiteConfigurationV2ArrayInput interface { 295 pulumi.Input 296 297 ToBucketWebsiteConfigurationV2ArrayOutput() BucketWebsiteConfigurationV2ArrayOutput 298 ToBucketWebsiteConfigurationV2ArrayOutputWithContext(context.Context) BucketWebsiteConfigurationV2ArrayOutput 299 } 300 301 type BucketWebsiteConfigurationV2Array []BucketWebsiteConfigurationV2Input 302 303 func (BucketWebsiteConfigurationV2Array) ElementType() reflect.Type { 304 return reflect.TypeOf((*[]*BucketWebsiteConfigurationV2)(nil)).Elem() 305 } 306 307 func (i BucketWebsiteConfigurationV2Array) ToBucketWebsiteConfigurationV2ArrayOutput() BucketWebsiteConfigurationV2ArrayOutput { 308 return i.ToBucketWebsiteConfigurationV2ArrayOutputWithContext(context.Background()) 309 } 310 311 func (i BucketWebsiteConfigurationV2Array) ToBucketWebsiteConfigurationV2ArrayOutputWithContext(ctx context.Context) BucketWebsiteConfigurationV2ArrayOutput { 312 return pulumi.ToOutputWithContext(ctx, i).(BucketWebsiteConfigurationV2ArrayOutput) 313 } 314 315 // BucketWebsiteConfigurationV2MapInput is an input type that accepts BucketWebsiteConfigurationV2Map and BucketWebsiteConfigurationV2MapOutput values. 316 // You can construct a concrete instance of `BucketWebsiteConfigurationV2MapInput` via: 317 // 318 // BucketWebsiteConfigurationV2Map{ "key": BucketWebsiteConfigurationV2Args{...} } 319 type BucketWebsiteConfigurationV2MapInput interface { 320 pulumi.Input 321 322 ToBucketWebsiteConfigurationV2MapOutput() BucketWebsiteConfigurationV2MapOutput 323 ToBucketWebsiteConfigurationV2MapOutputWithContext(context.Context) BucketWebsiteConfigurationV2MapOutput 324 } 325 326 type BucketWebsiteConfigurationV2Map map[string]BucketWebsiteConfigurationV2Input 327 328 func (BucketWebsiteConfigurationV2Map) ElementType() reflect.Type { 329 return reflect.TypeOf((*map[string]*BucketWebsiteConfigurationV2)(nil)).Elem() 330 } 331 332 func (i BucketWebsiteConfigurationV2Map) ToBucketWebsiteConfigurationV2MapOutput() BucketWebsiteConfigurationV2MapOutput { 333 return i.ToBucketWebsiteConfigurationV2MapOutputWithContext(context.Background()) 334 } 335 336 func (i BucketWebsiteConfigurationV2Map) ToBucketWebsiteConfigurationV2MapOutputWithContext(ctx context.Context) BucketWebsiteConfigurationV2MapOutput { 337 return pulumi.ToOutputWithContext(ctx, i).(BucketWebsiteConfigurationV2MapOutput) 338 } 339 340 type BucketWebsiteConfigurationV2Output struct{ *pulumi.OutputState } 341 342 func (BucketWebsiteConfigurationV2Output) ElementType() reflect.Type { 343 return reflect.TypeOf((**BucketWebsiteConfigurationV2)(nil)).Elem() 344 } 345 346 func (o BucketWebsiteConfigurationV2Output) ToBucketWebsiteConfigurationV2Output() BucketWebsiteConfigurationV2Output { 347 return o 348 } 349 350 func (o BucketWebsiteConfigurationV2Output) ToBucketWebsiteConfigurationV2OutputWithContext(ctx context.Context) BucketWebsiteConfigurationV2Output { 351 return o 352 } 353 354 // Name of the bucket. 355 func (o BucketWebsiteConfigurationV2Output) Bucket() pulumi.StringOutput { 356 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) pulumi.StringOutput { return v.Bucket }).(pulumi.StringOutput) 357 } 358 359 // Name of the error document for the website. See below. 360 func (o BucketWebsiteConfigurationV2Output) ErrorDocument() BucketWebsiteConfigurationV2ErrorDocumentPtrOutput { 361 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) BucketWebsiteConfigurationV2ErrorDocumentPtrOutput { 362 return v.ErrorDocument 363 }).(BucketWebsiteConfigurationV2ErrorDocumentPtrOutput) 364 } 365 366 // Account ID of the expected bucket owner. 367 func (o BucketWebsiteConfigurationV2Output) ExpectedBucketOwner() pulumi.StringPtrOutput { 368 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) pulumi.StringPtrOutput { return v.ExpectedBucketOwner }).(pulumi.StringPtrOutput) 369 } 370 371 // Name of the index document for the website. See below. 372 func (o BucketWebsiteConfigurationV2Output) IndexDocument() BucketWebsiteConfigurationV2IndexDocumentPtrOutput { 373 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) BucketWebsiteConfigurationV2IndexDocumentPtrOutput { 374 return v.IndexDocument 375 }).(BucketWebsiteConfigurationV2IndexDocumentPtrOutput) 376 } 377 378 // Redirect behavior for every request to this bucket's website endpoint. See below. Conflicts with `errorDocument`, `indexDocument`, and `routingRule`. 379 func (o BucketWebsiteConfigurationV2Output) RedirectAllRequestsTo() BucketWebsiteConfigurationV2RedirectAllRequestsToPtrOutput { 380 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) BucketWebsiteConfigurationV2RedirectAllRequestsToPtrOutput { 381 return v.RedirectAllRequestsTo 382 }).(BucketWebsiteConfigurationV2RedirectAllRequestsToPtrOutput) 383 } 384 385 // JSON array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html) 386 // describing redirect behavior and when redirects are applied. Use this parameter when your routing rules contain empty String values (`""`) as seen in the example above. 387 func (o BucketWebsiteConfigurationV2Output) RoutingRuleDetails() pulumi.StringOutput { 388 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) pulumi.StringOutput { return v.RoutingRuleDetails }).(pulumi.StringOutput) 389 } 390 391 // List of rules that define when a redirect is applied and the redirect behavior. See below. 392 func (o BucketWebsiteConfigurationV2Output) RoutingRules() BucketWebsiteConfigurationV2RoutingRuleArrayOutput { 393 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) BucketWebsiteConfigurationV2RoutingRuleArrayOutput { 394 return v.RoutingRules 395 }).(BucketWebsiteConfigurationV2RoutingRuleArrayOutput) 396 } 397 398 // Domain of the website endpoint. This is used to create Route 53 alias records. 399 func (o BucketWebsiteConfigurationV2Output) WebsiteDomain() pulumi.StringOutput { 400 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) pulumi.StringOutput { return v.WebsiteDomain }).(pulumi.StringOutput) 401 } 402 403 // Website endpoint. 404 func (o BucketWebsiteConfigurationV2Output) WebsiteEndpoint() pulumi.StringOutput { 405 return o.ApplyT(func(v *BucketWebsiteConfigurationV2) pulumi.StringOutput { return v.WebsiteEndpoint }).(pulumi.StringOutput) 406 } 407 408 type BucketWebsiteConfigurationV2ArrayOutput struct{ *pulumi.OutputState } 409 410 func (BucketWebsiteConfigurationV2ArrayOutput) ElementType() reflect.Type { 411 return reflect.TypeOf((*[]*BucketWebsiteConfigurationV2)(nil)).Elem() 412 } 413 414 func (o BucketWebsiteConfigurationV2ArrayOutput) ToBucketWebsiteConfigurationV2ArrayOutput() BucketWebsiteConfigurationV2ArrayOutput { 415 return o 416 } 417 418 func (o BucketWebsiteConfigurationV2ArrayOutput) ToBucketWebsiteConfigurationV2ArrayOutputWithContext(ctx context.Context) BucketWebsiteConfigurationV2ArrayOutput { 419 return o 420 } 421 422 func (o BucketWebsiteConfigurationV2ArrayOutput) Index(i pulumi.IntInput) BucketWebsiteConfigurationV2Output { 423 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BucketWebsiteConfigurationV2 { 424 return vs[0].([]*BucketWebsiteConfigurationV2)[vs[1].(int)] 425 }).(BucketWebsiteConfigurationV2Output) 426 } 427 428 type BucketWebsiteConfigurationV2MapOutput struct{ *pulumi.OutputState } 429 430 func (BucketWebsiteConfigurationV2MapOutput) ElementType() reflect.Type { 431 return reflect.TypeOf((*map[string]*BucketWebsiteConfigurationV2)(nil)).Elem() 432 } 433 434 func (o BucketWebsiteConfigurationV2MapOutput) ToBucketWebsiteConfigurationV2MapOutput() BucketWebsiteConfigurationV2MapOutput { 435 return o 436 } 437 438 func (o BucketWebsiteConfigurationV2MapOutput) ToBucketWebsiteConfigurationV2MapOutputWithContext(ctx context.Context) BucketWebsiteConfigurationV2MapOutput { 439 return o 440 } 441 442 func (o BucketWebsiteConfigurationV2MapOutput) MapIndex(k pulumi.StringInput) BucketWebsiteConfigurationV2Output { 443 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BucketWebsiteConfigurationV2 { 444 return vs[0].(map[string]*BucketWebsiteConfigurationV2)[vs[1].(string)] 445 }).(BucketWebsiteConfigurationV2Output) 446 } 447 448 func init() { 449 pulumi.RegisterInputType(reflect.TypeOf((*BucketWebsiteConfigurationV2Input)(nil)).Elem(), &BucketWebsiteConfigurationV2{}) 450 pulumi.RegisterInputType(reflect.TypeOf((*BucketWebsiteConfigurationV2ArrayInput)(nil)).Elem(), BucketWebsiteConfigurationV2Array{}) 451 pulumi.RegisterInputType(reflect.TypeOf((*BucketWebsiteConfigurationV2MapInput)(nil)).Elem(), BucketWebsiteConfigurationV2Map{}) 452 pulumi.RegisterOutputType(BucketWebsiteConfigurationV2Output{}) 453 pulumi.RegisterOutputType(BucketWebsiteConfigurationV2ArrayOutput{}) 454 pulumi.RegisterOutputType(BucketWebsiteConfigurationV2MapOutput{}) 455 }