github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/s3/bucket.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  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides a S3 bucket resource.
    15  //
    16  // > This functionality is for managing S3 in an AWS Partition. To manage [S3 on Outposts](https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html), see the `s3control.Bucket` resource.
    17  //
    18  // > **NOTE:** This resource might not work well if using an alternative s3-compatible provider. Please use `aws.s3.BucketV2` instead.
    19  //
    20  // ## Example Usage
    21  //
    22  // ### Private Bucket w/ Tags
    23  //
    24  // <!--Start PulumiCodeChooser -->
    25  // ```go
    26  // package main
    27  //
    28  // import (
    29  //
    30  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
    31  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    32  //
    33  // )
    34  //
    35  //	func main() {
    36  //		pulumi.Run(func(ctx *pulumi.Context) error {
    37  //			_, err := s3.NewBucket(ctx, "b", &s3.BucketArgs{
    38  //				Bucket: pulumi.String("my-tf-test-bucket"),
    39  //				Acl:    pulumi.String(s3.CannedAclPrivate),
    40  //				Tags: pulumi.StringMap{
    41  //					"Name":        pulumi.String("My bucket"),
    42  //					"Environment": pulumi.String("Dev"),
    43  //				},
    44  //			})
    45  //			if err != nil {
    46  //				return err
    47  //			}
    48  //			return nil
    49  //		})
    50  //	}
    51  //
    52  // ```
    53  // <!--End PulumiCodeChooser -->
    54  //
    55  // ### Static Website Hosting
    56  //
    57  // <!--Start PulumiCodeChooser -->
    58  // ```go
    59  // package main
    60  //
    61  // import (
    62  //
    63  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    64  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
    65  //	"github.com/pulumi/pulumi-std/sdk/go/std"
    66  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    67  //
    68  // )
    69  //
    70  //	func main() {
    71  //		pulumi.Run(func(ctx *pulumi.Context) error {
    72  //			invokeFile, err := std.File(ctx, &std.FileArgs{
    73  //				Input: "policy.json",
    74  //			}, nil)
    75  //			if err != nil {
    76  //				return err
    77  //			}
    78  //			_, err = s3.NewBucket(ctx, "b", &s3.BucketArgs{
    79  //				Bucket: pulumi.String("s3-website-test.mydomain.com"),
    80  //				Acl:    pulumi.String(s3.CannedAclPublicRead),
    81  //				Policy: invokeFile.Result,
    82  //				Website: &s3.BucketWebsiteArgs{
    83  //					IndexDocument: pulumi.String("index.html"),
    84  //					ErrorDocument: pulumi.String("error.html"),
    85  //					RoutingRules: pulumi.Any(`[{
    86  //	    "Condition": {
    87  //	        "KeyPrefixEquals": "docs/"
    88  //	    },
    89  //	    "Redirect": {
    90  //	        "ReplaceKeyPrefixWith": "documents/"
    91  //	    }
    92  //	}]
    93  //
    94  // `),
    95  //
    96  //				},
    97  //			})
    98  //			if err != nil {
    99  //				return err
   100  //			}
   101  //			return nil
   102  //		})
   103  //	}
   104  //
   105  // ```
   106  // <!--End PulumiCodeChooser -->
   107  //
   108  // ### Using CORS
   109  //
   110  // <!--Start PulumiCodeChooser -->
   111  // ```go
   112  // package main
   113  //
   114  // import (
   115  //
   116  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
   117  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   118  //
   119  // )
   120  //
   121  //	func main() {
   122  //		pulumi.Run(func(ctx *pulumi.Context) error {
   123  //			_, err := s3.NewBucket(ctx, "b", &s3.BucketArgs{
   124  //				Bucket: pulumi.String("s3-website-test.mydomain.com"),
   125  //				Acl:    pulumi.String(s3.CannedAclPublicRead),
   126  //				CorsRules: s3.BucketCorsRuleArray{
   127  //					&s3.BucketCorsRuleArgs{
   128  //						AllowedHeaders: pulumi.StringArray{
   129  //							pulumi.String("*"),
   130  //						},
   131  //						AllowedMethods: pulumi.StringArray{
   132  //							pulumi.String("PUT"),
   133  //							pulumi.String("POST"),
   134  //						},
   135  //						AllowedOrigins: pulumi.StringArray{
   136  //							pulumi.String("https://s3-website-test.mydomain.com"),
   137  //						},
   138  //						ExposeHeaders: pulumi.StringArray{
   139  //							pulumi.String("ETag"),
   140  //						},
   141  //						MaxAgeSeconds: pulumi.Int(3000),
   142  //					},
   143  //				},
   144  //			})
   145  //			if err != nil {
   146  //				return err
   147  //			}
   148  //			return nil
   149  //		})
   150  //	}
   151  //
   152  // ```
   153  // <!--End PulumiCodeChooser -->
   154  //
   155  // ### Using versioning
   156  //
   157  // <!--Start PulumiCodeChooser -->
   158  // ```go
   159  // package main
   160  //
   161  // import (
   162  //
   163  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
   164  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   165  //
   166  // )
   167  //
   168  //	func main() {
   169  //		pulumi.Run(func(ctx *pulumi.Context) error {
   170  //			_, err := s3.NewBucket(ctx, "b", &s3.BucketArgs{
   171  //				Bucket: pulumi.String("my-tf-test-bucket"),
   172  //				Acl:    pulumi.String(s3.CannedAclPrivate),
   173  //				Versioning: &s3.BucketVersioningArgs{
   174  //					Enabled: pulumi.Bool(true),
   175  //				},
   176  //			})
   177  //			if err != nil {
   178  //				return err
   179  //			}
   180  //			return nil
   181  //		})
   182  //	}
   183  //
   184  // ```
   185  // <!--End PulumiCodeChooser -->
   186  //
   187  // ### Enable Logging
   188  //
   189  // <!--Start PulumiCodeChooser -->
   190  // ```go
   191  // package main
   192  //
   193  // import (
   194  //
   195  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
   196  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   197  //
   198  // )
   199  //
   200  //	func main() {
   201  //		pulumi.Run(func(ctx *pulumi.Context) error {
   202  //			logBucket, err := s3.NewBucket(ctx, "log_bucket", &s3.BucketArgs{
   203  //				Bucket: pulumi.String("my-tf-log-bucket"),
   204  //				Acl:    pulumi.String(s3.CannedAclLogDeliveryWrite),
   205  //			})
   206  //			if err != nil {
   207  //				return err
   208  //			}
   209  //			_, err = s3.NewBucket(ctx, "b", &s3.BucketArgs{
   210  //				Bucket: pulumi.String("my-tf-test-bucket"),
   211  //				Acl:    pulumi.String(s3.CannedAclPrivate),
   212  //				Loggings: s3.BucketLoggingArray{
   213  //					&s3.BucketLoggingArgs{
   214  //						TargetBucket: logBucket.ID(),
   215  //						TargetPrefix: pulumi.String("log/"),
   216  //					},
   217  //				},
   218  //			})
   219  //			if err != nil {
   220  //				return err
   221  //			}
   222  //			return nil
   223  //		})
   224  //	}
   225  //
   226  // ```
   227  // <!--End PulumiCodeChooser -->
   228  //
   229  // ### Using object lifecycle
   230  //
   231  // <!--Start PulumiCodeChooser -->
   232  // ```go
   233  // package main
   234  //
   235  // import (
   236  //
   237  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
   238  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   239  //
   240  // )
   241  //
   242  //	func main() {
   243  //		pulumi.Run(func(ctx *pulumi.Context) error {
   244  //			_, err := s3.NewBucket(ctx, "bucket", &s3.BucketArgs{
   245  //				Bucket: pulumi.String("my-bucket"),
   246  //				Acl:    pulumi.String(s3.CannedAclPrivate),
   247  //				LifecycleRules: s3.BucketLifecycleRuleArray{
   248  //					&s3.BucketLifecycleRuleArgs{
   249  //						Id:      pulumi.String("log"),
   250  //						Enabled: pulumi.Bool(true),
   251  //						Prefix:  pulumi.String("log/"),
   252  //						Tags: pulumi.StringMap{
   253  //							"rule":      pulumi.String("log"),
   254  //							"autoclean": pulumi.String("true"),
   255  //						},
   256  //						Transitions: s3.BucketLifecycleRuleTransitionArray{
   257  //							&s3.BucketLifecycleRuleTransitionArgs{
   258  //								Days:         pulumi.Int(30),
   259  //								StorageClass: pulumi.String("STANDARD_IA"),
   260  //							},
   261  //							&s3.BucketLifecycleRuleTransitionArgs{
   262  //								Days:         pulumi.Int(60),
   263  //								StorageClass: pulumi.String("GLACIER"),
   264  //							},
   265  //						},
   266  //						Expiration: &s3.BucketLifecycleRuleExpirationArgs{
   267  //							Days: pulumi.Int(90),
   268  //						},
   269  //					},
   270  //					&s3.BucketLifecycleRuleArgs{
   271  //						Id:      pulumi.String("tmp"),
   272  //						Prefix:  pulumi.String("tmp/"),
   273  //						Enabled: pulumi.Bool(true),
   274  //						Expiration: &s3.BucketLifecycleRuleExpirationArgs{
   275  //							Date: pulumi.String("2016-01-12"),
   276  //						},
   277  //					},
   278  //				},
   279  //			})
   280  //			if err != nil {
   281  //				return err
   282  //			}
   283  //			_, err = s3.NewBucket(ctx, "versioning_bucket", &s3.BucketArgs{
   284  //				Bucket: pulumi.String("my-versioning-bucket"),
   285  //				Acl:    pulumi.String(s3.CannedAclPrivate),
   286  //				Versioning: &s3.BucketVersioningArgs{
   287  //					Enabled: pulumi.Bool(true),
   288  //				},
   289  //				LifecycleRules: s3.BucketLifecycleRuleArray{
   290  //					&s3.BucketLifecycleRuleArgs{
   291  //						Prefix:  pulumi.String("config/"),
   292  //						Enabled: pulumi.Bool(true),
   293  //						NoncurrentVersionTransitions: s3.BucketLifecycleRuleNoncurrentVersionTransitionArray{
   294  //							&s3.BucketLifecycleRuleNoncurrentVersionTransitionArgs{
   295  //								Days:         pulumi.Int(30),
   296  //								StorageClass: pulumi.String("STANDARD_IA"),
   297  //							},
   298  //							&s3.BucketLifecycleRuleNoncurrentVersionTransitionArgs{
   299  //								Days:         pulumi.Int(60),
   300  //								StorageClass: pulumi.String("GLACIER"),
   301  //							},
   302  //						},
   303  //						NoncurrentVersionExpiration: &s3.BucketLifecycleRuleNoncurrentVersionExpirationArgs{
   304  //							Days: pulumi.Int(90),
   305  //						},
   306  //					},
   307  //				},
   308  //			})
   309  //			if err != nil {
   310  //				return err
   311  //			}
   312  //			return nil
   313  //		})
   314  //	}
   315  //
   316  // ```
   317  // <!--End PulumiCodeChooser -->
   318  //
   319  // ### Using replication configuration
   320  //
   321  // > **NOTE:** See the `s3.BucketReplicationConfig` resource to support bi-directional replication configuration and additional features.
   322  //
   323  // <!--Start PulumiCodeChooser -->
   324  // ```go
   325  // package main
   326  //
   327  // import (
   328  //
   329  //	"fmt"
   330  //
   331  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
   332  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
   333  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   334  //
   335  // )
   336  //
   337  //	func main() {
   338  //		pulumi.Run(func(ctx *pulumi.Context) error {
   339  //			replication, err := iam.NewRole(ctx, "replication", &iam.RoleArgs{
   340  //				Name: pulumi.String("tf-iam-role-replication-12345"),
   341  //				AssumeRolePolicy: pulumi.Any(`{
   342  //	  "Version": "2012-10-17",
   343  //	  "Statement": [
   344  //	    {
   345  //	      "Action": "sts:AssumeRole",
   346  //	      "Principal": {
   347  //	        "Service": "s3.amazonaws.com"
   348  //	      },
   349  //	      "Effect": "Allow",
   350  //	      "Sid": ""
   351  //	    }
   352  //	  ]
   353  //	}
   354  //
   355  // `),
   356  //
   357  //			})
   358  //			if err != nil {
   359  //				return err
   360  //			}
   361  //			destination, err := s3.NewBucket(ctx, "destination", &s3.BucketArgs{
   362  //				Bucket: pulumi.String("tf-test-bucket-destination-12345"),
   363  //				Versioning: &s3.BucketVersioningArgs{
   364  //					Enabled: pulumi.Bool(true),
   365  //				},
   366  //			})
   367  //			if err != nil {
   368  //				return err
   369  //			}
   370  //			source, err := s3.NewBucket(ctx, "source", &s3.BucketArgs{
   371  //				Bucket: pulumi.String("tf-test-bucket-source-12345"),
   372  //				Acl:    pulumi.String(s3.CannedAclPrivate),
   373  //				Versioning: &s3.BucketVersioningArgs{
   374  //					Enabled: pulumi.Bool(true),
   375  //				},
   376  //				ReplicationConfiguration: &s3.BucketReplicationConfigurationArgs{
   377  //					Role: replication.Arn,
   378  //					Rules: s3.BucketReplicationConfigurationRuleArray{
   379  //						&s3.BucketReplicationConfigurationRuleArgs{
   380  //							Id:     pulumi.String("foobar"),
   381  //							Status: pulumi.String("Enabled"),
   382  //							Filter: &s3.BucketReplicationConfigurationRuleFilterArgs{
   383  //								Tags: nil,
   384  //							},
   385  //							Destination: &s3.BucketReplicationConfigurationRuleDestinationArgs{
   386  //								Bucket:       destination.Arn,
   387  //								StorageClass: pulumi.String("STANDARD"),
   388  //								ReplicationTime: &s3.BucketReplicationConfigurationRuleDestinationReplicationTimeArgs{
   389  //									Status:  pulumi.String("Enabled"),
   390  //									Minutes: pulumi.Int(15),
   391  //								},
   392  //								Metrics: &s3.BucketReplicationConfigurationRuleDestinationMetricsArgs{
   393  //									Status:  pulumi.String("Enabled"),
   394  //									Minutes: pulumi.Int(15),
   395  //								},
   396  //							},
   397  //						},
   398  //					},
   399  //				},
   400  //			})
   401  //			if err != nil {
   402  //				return err
   403  //			}
   404  //			replicationPolicy, err := iam.NewPolicy(ctx, "replication", &iam.PolicyArgs{
   405  //				Name: pulumi.String("tf-iam-role-policy-replication-12345"),
   406  //				Policy: pulumi.All(source.Arn, source.Arn, destination.Arn).ApplyT(func(_args []interface{}) (string, error) {
   407  //					sourceArn := _args[0].(string)
   408  //					sourceArn1 := _args[1].(string)
   409  //					destinationArn := _args[2].(string)
   410  //					return fmt.Sprintf(`{
   411  //	  "Version": "2012-10-17",
   412  //	  "Statement": [
   413  //	    {
   414  //	      "Action": [
   415  //	        "s3:GetReplicationConfiguration",
   416  //	        "s3:ListBucket"
   417  //	      ],
   418  //	      "Effect": "Allow",
   419  //	      "Resource": [
   420  //	        "%v"
   421  //	      ]
   422  //	    },
   423  //	    {
   424  //	      "Action": [
   425  //	        "s3:GetObjectVersionForReplication",
   426  //	        "s3:GetObjectVersionAcl",
   427  //	         "s3:GetObjectVersionTagging"
   428  //	      ],
   429  //	      "Effect": "Allow",
   430  //	      "Resource": [
   431  //	        "%v/*"
   432  //	      ]
   433  //	    },
   434  //	    {
   435  //	      "Action": [
   436  //	        "s3:ReplicateObject",
   437  //	        "s3:ReplicateDelete",
   438  //	        "s3:ReplicateTags"
   439  //	      ],
   440  //	      "Effect": "Allow",
   441  //	      "Resource": "%v/*"
   442  //	    }
   443  //	  ]
   444  //	}
   445  //
   446  // `, sourceArn, sourceArn1, destinationArn), nil
   447  //
   448  //				}).(pulumi.StringOutput),
   449  //			})
   450  //			if err != nil {
   451  //				return err
   452  //			}
   453  //			_, err = iam.NewRolePolicyAttachment(ctx, "replication", &iam.RolePolicyAttachmentArgs{
   454  //				Role:      replication.Name,
   455  //				PolicyArn: replicationPolicy.Arn,
   456  //			})
   457  //			if err != nil {
   458  //				return err
   459  //			}
   460  //			return nil
   461  //		})
   462  //	}
   463  //
   464  // ```
   465  // <!--End PulumiCodeChooser -->
   466  //
   467  // ### Enable Default Server Side Encryption
   468  //
   469  // <!--Start PulumiCodeChooser -->
   470  // ```go
   471  // package main
   472  //
   473  // import (
   474  //
   475  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
   476  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
   477  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   478  //
   479  // )
   480  //
   481  //	func main() {
   482  //		pulumi.Run(func(ctx *pulumi.Context) error {
   483  //			mykey, err := kms.NewKey(ctx, "mykey", &kms.KeyArgs{
   484  //				Description:          pulumi.String("This key is used to encrypt bucket objects"),
   485  //				DeletionWindowInDays: pulumi.Int(10),
   486  //			})
   487  //			if err != nil {
   488  //				return err
   489  //			}
   490  //			_, err = s3.NewBucket(ctx, "mybucket", &s3.BucketArgs{
   491  //				Bucket: pulumi.String("mybucket"),
   492  //				ServerSideEncryptionConfiguration: &s3.BucketServerSideEncryptionConfigurationArgs{
   493  //					Rule: &s3.BucketServerSideEncryptionConfigurationRuleArgs{
   494  //						ApplyServerSideEncryptionByDefault: &s3.BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs{
   495  //							KmsMasterKeyId: mykey.Arn,
   496  //							SseAlgorithm:   pulumi.String("aws:kms"),
   497  //						},
   498  //					},
   499  //				},
   500  //			})
   501  //			if err != nil {
   502  //				return err
   503  //			}
   504  //			return nil
   505  //		})
   506  //	}
   507  //
   508  // ```
   509  // <!--End PulumiCodeChooser -->
   510  //
   511  // ### Using ACL policy grants
   512  //
   513  // <!--Start PulumiCodeChooser -->
   514  // ```go
   515  // package main
   516  //
   517  // import (
   518  //
   519  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
   520  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   521  //
   522  // )
   523  //
   524  //	func main() {
   525  //		pulumi.Run(func(ctx *pulumi.Context) error {
   526  //			currentUser, err := s3.GetCanonicalUserId(ctx, nil, nil)
   527  //			if err != nil {
   528  //				return err
   529  //			}
   530  //			_, err = s3.NewBucket(ctx, "bucket", &s3.BucketArgs{
   531  //				Bucket: pulumi.String("mybucket"),
   532  //				Grants: s3.BucketGrantArray{
   533  //					&s3.BucketGrantArgs{
   534  //						Id:   pulumi.String(currentUser.Id),
   535  //						Type: pulumi.String("CanonicalUser"),
   536  //						Permissions: pulumi.StringArray{
   537  //							pulumi.String("FULL_CONTROL"),
   538  //						},
   539  //					},
   540  //					&s3.BucketGrantArgs{
   541  //						Type: pulumi.String("Group"),
   542  //						Permissions: pulumi.StringArray{
   543  //							pulumi.String("READ_ACP"),
   544  //							pulumi.String("WRITE"),
   545  //						},
   546  //						Uri: pulumi.String("http://acs.amazonaws.com/groups/s3/LogDelivery"),
   547  //					},
   548  //				},
   549  //			})
   550  //			if err != nil {
   551  //				return err
   552  //			}
   553  //			return nil
   554  //		})
   555  //	}
   556  //
   557  // ```
   558  // <!--End PulumiCodeChooser -->
   559  //
   560  // ## Import
   561  //
   562  // S3 bucket can be imported using the `bucket`, e.g.,
   563  //
   564  // ```sh
   565  // $ pulumi import aws:s3/bucket:Bucket bucket bucket-name
   566  // ```
   567  // The `policy` argument is not imported and will be deprecated in a future version of the provider. Use the `aws_s3_bucket_policy` resource to manage the S3 Bucket Policy instead.
   568  type Bucket struct {
   569  	pulumi.CustomResourceState
   570  
   571  	// Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
   572  	AccelerationStatus pulumi.StringOutput `pulumi:"accelerationStatus"`
   573  	// The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, and `log-delivery-write`. Defaults to `private`.  Conflicts with `grant`.
   574  	Acl pulumi.StringPtrOutput `pulumi:"acl"`
   575  	// The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
   576  	Arn pulumi.StringOutput `pulumi:"arn"`
   577  	// The name of the bucket. If omitted, this provider will assign a random, unique name. Must be lowercase and less than or equal to 63 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   578  	Bucket pulumi.StringOutput `pulumi:"bucket"`
   579  	// The bucket domain name. Will be of format `bucketname.s3.amazonaws.com`.
   580  	BucketDomainName pulumi.StringOutput `pulumi:"bucketDomainName"`
   581  	// Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`. Must be lowercase and less than or equal to 37 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   582  	BucketPrefix pulumi.StringPtrOutput `pulumi:"bucketPrefix"`
   583  	// The bucket region-specific domain name. The bucket domain name including the region name, please refer [here](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent [redirect issues](https://forums.aws.amazon.com/thread.jspa?threadID=216814) from CloudFront to S3 Origin URL.
   584  	BucketRegionalDomainName pulumi.StringOutput `pulumi:"bucketRegionalDomainName"`
   585  	// A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
   586  	CorsRules BucketCorsRuleArrayOutput `pulumi:"corsRules"`
   587  	// A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
   588  	ForceDestroy pulumi.BoolPtrOutput `pulumi:"forceDestroy"`
   589  	// An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.
   590  	Grants BucketGrantArrayOutput `pulumi:"grants"`
   591  	// The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
   592  	HostedZoneId pulumi.StringOutput `pulumi:"hostedZoneId"`
   593  	// A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).
   594  	LifecycleRules BucketLifecycleRuleArrayOutput `pulumi:"lifecycleRules"`
   595  	// A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).
   596  	Loggings BucketLoggingArrayOutput `pulumi:"loggings"`
   597  	// A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)
   598  	//
   599  	// > **NOTE:** You cannot use `accelerationStatus` in `cn-north-1` or `us-gov-west-1`
   600  	ObjectLockConfiguration BucketObjectLockConfigurationPtrOutput `pulumi:"objectLockConfiguration"`
   601  	// A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document. Note that if the policy document is not specific enough (but still valid), this provider may view the policy as constantly changing in a `pulumi preview`. In this case, please make sure you use the verbose/specific version of the policy.
   602  	Policy pulumi.StringPtrOutput `pulumi:"policy"`
   603  	// The AWS region this bucket resides in.
   604  	Region pulumi.StringOutput `pulumi:"region"`
   605  	// A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).
   606  	ReplicationConfiguration BucketReplicationConfigurationPtrOutput `pulumi:"replicationConfiguration"`
   607  	// Specifies who should bear the cost of Amazon S3 data transfer.
   608  	// Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
   609  	// the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
   610  	// developer guide for more information.
   611  	RequestPayer pulumi.StringOutput `pulumi:"requestPayer"`
   612  	// A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)
   613  	ServerSideEncryptionConfiguration BucketServerSideEncryptionConfigurationOutput `pulumi:"serverSideEncryptionConfiguration"`
   614  	// A map of tags to assign to the bucket. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   615  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   616  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   617  	//
   618  	// Deprecated: Please use `tags` instead.
   619  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   620  	// A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
   621  	Versioning BucketVersioningOutput `pulumi:"versioning"`
   622  	// A website object (documented below).
   623  	Website BucketWebsitePtrOutput `pulumi:"website"`
   624  	// The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
   625  	WebsiteDomain pulumi.StringOutput `pulumi:"websiteDomain"`
   626  	// The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
   627  	WebsiteEndpoint pulumi.StringOutput `pulumi:"websiteEndpoint"`
   628  }
   629  
   630  // NewBucket registers a new resource with the given unique name, arguments, and options.
   631  func NewBucket(ctx *pulumi.Context,
   632  	name string, args *BucketArgs, opts ...pulumi.ResourceOption) (*Bucket, error) {
   633  	if args == nil {
   634  		args = &BucketArgs{}
   635  	}
   636  
   637  	opts = internal.PkgResourceDefaultOpts(opts)
   638  	var resource Bucket
   639  	err := ctx.RegisterResource("aws:s3/bucket:Bucket", name, args, &resource, opts...)
   640  	if err != nil {
   641  		return nil, err
   642  	}
   643  	return &resource, nil
   644  }
   645  
   646  // GetBucket gets an existing Bucket resource's state with the given name, ID, and optional
   647  // state properties that are used to uniquely qualify the lookup (nil if not required).
   648  func GetBucket(ctx *pulumi.Context,
   649  	name string, id pulumi.IDInput, state *BucketState, opts ...pulumi.ResourceOption) (*Bucket, error) {
   650  	var resource Bucket
   651  	err := ctx.ReadResource("aws:s3/bucket:Bucket", name, id, state, &resource, opts...)
   652  	if err != nil {
   653  		return nil, err
   654  	}
   655  	return &resource, nil
   656  }
   657  
   658  // Input properties used for looking up and filtering Bucket resources.
   659  type bucketState struct {
   660  	// Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
   661  	AccelerationStatus *string `pulumi:"accelerationStatus"`
   662  	// The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, and `log-delivery-write`. Defaults to `private`.  Conflicts with `grant`.
   663  	Acl *string `pulumi:"acl"`
   664  	// The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
   665  	Arn *string `pulumi:"arn"`
   666  	// The name of the bucket. If omitted, this provider will assign a random, unique name. Must be lowercase and less than or equal to 63 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   667  	Bucket *string `pulumi:"bucket"`
   668  	// The bucket domain name. Will be of format `bucketname.s3.amazonaws.com`.
   669  	BucketDomainName *string `pulumi:"bucketDomainName"`
   670  	// Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`. Must be lowercase and less than or equal to 37 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   671  	BucketPrefix *string `pulumi:"bucketPrefix"`
   672  	// The bucket region-specific domain name. The bucket domain name including the region name, please refer [here](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent [redirect issues](https://forums.aws.amazon.com/thread.jspa?threadID=216814) from CloudFront to S3 Origin URL.
   673  	BucketRegionalDomainName *string `pulumi:"bucketRegionalDomainName"`
   674  	// A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
   675  	CorsRules []BucketCorsRule `pulumi:"corsRules"`
   676  	// A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
   677  	ForceDestroy *bool `pulumi:"forceDestroy"`
   678  	// An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.
   679  	Grants []BucketGrant `pulumi:"grants"`
   680  	// The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
   681  	HostedZoneId *string `pulumi:"hostedZoneId"`
   682  	// A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).
   683  	LifecycleRules []BucketLifecycleRule `pulumi:"lifecycleRules"`
   684  	// A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).
   685  	Loggings []BucketLogging `pulumi:"loggings"`
   686  	// A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)
   687  	//
   688  	// > **NOTE:** You cannot use `accelerationStatus` in `cn-north-1` or `us-gov-west-1`
   689  	ObjectLockConfiguration *BucketObjectLockConfiguration `pulumi:"objectLockConfiguration"`
   690  	// A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document. Note that if the policy document is not specific enough (but still valid), this provider may view the policy as constantly changing in a `pulumi preview`. In this case, please make sure you use the verbose/specific version of the policy.
   691  	Policy interface{} `pulumi:"policy"`
   692  	// The AWS region this bucket resides in.
   693  	Region *string `pulumi:"region"`
   694  	// A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).
   695  	ReplicationConfiguration *BucketReplicationConfiguration `pulumi:"replicationConfiguration"`
   696  	// Specifies who should bear the cost of Amazon S3 data transfer.
   697  	// Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
   698  	// the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
   699  	// developer guide for more information.
   700  	RequestPayer *string `pulumi:"requestPayer"`
   701  	// A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)
   702  	ServerSideEncryptionConfiguration *BucketServerSideEncryptionConfiguration `pulumi:"serverSideEncryptionConfiguration"`
   703  	// A map of tags to assign to the bucket. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   704  	Tags map[string]string `pulumi:"tags"`
   705  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   706  	//
   707  	// Deprecated: Please use `tags` instead.
   708  	TagsAll map[string]string `pulumi:"tagsAll"`
   709  	// A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
   710  	Versioning *BucketVersioning `pulumi:"versioning"`
   711  	// A website object (documented below).
   712  	Website *BucketWebsite `pulumi:"website"`
   713  	// The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
   714  	WebsiteDomain *string `pulumi:"websiteDomain"`
   715  	// The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
   716  	WebsiteEndpoint *string `pulumi:"websiteEndpoint"`
   717  }
   718  
   719  type BucketState struct {
   720  	// Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
   721  	AccelerationStatus pulumi.StringPtrInput
   722  	// The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, and `log-delivery-write`. Defaults to `private`.  Conflicts with `grant`.
   723  	Acl pulumi.StringPtrInput
   724  	// The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
   725  	Arn pulumi.StringPtrInput
   726  	// The name of the bucket. If omitted, this provider will assign a random, unique name. Must be lowercase and less than or equal to 63 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   727  	Bucket pulumi.StringPtrInput
   728  	// The bucket domain name. Will be of format `bucketname.s3.amazonaws.com`.
   729  	BucketDomainName pulumi.StringPtrInput
   730  	// Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`. Must be lowercase and less than or equal to 37 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   731  	BucketPrefix pulumi.StringPtrInput
   732  	// The bucket region-specific domain name. The bucket domain name including the region name, please refer [here](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent [redirect issues](https://forums.aws.amazon.com/thread.jspa?threadID=216814) from CloudFront to S3 Origin URL.
   733  	BucketRegionalDomainName pulumi.StringPtrInput
   734  	// A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
   735  	CorsRules BucketCorsRuleArrayInput
   736  	// A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
   737  	ForceDestroy pulumi.BoolPtrInput
   738  	// An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.
   739  	Grants BucketGrantArrayInput
   740  	// The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
   741  	HostedZoneId pulumi.StringPtrInput
   742  	// A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).
   743  	LifecycleRules BucketLifecycleRuleArrayInput
   744  	// A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).
   745  	Loggings BucketLoggingArrayInput
   746  	// A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)
   747  	//
   748  	// > **NOTE:** You cannot use `accelerationStatus` in `cn-north-1` or `us-gov-west-1`
   749  	ObjectLockConfiguration BucketObjectLockConfigurationPtrInput
   750  	// A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document. Note that if the policy document is not specific enough (but still valid), this provider may view the policy as constantly changing in a `pulumi preview`. In this case, please make sure you use the verbose/specific version of the policy.
   751  	Policy pulumi.Input
   752  	// The AWS region this bucket resides in.
   753  	Region pulumi.StringPtrInput
   754  	// A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).
   755  	ReplicationConfiguration BucketReplicationConfigurationPtrInput
   756  	// Specifies who should bear the cost of Amazon S3 data transfer.
   757  	// Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
   758  	// the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
   759  	// developer guide for more information.
   760  	RequestPayer pulumi.StringPtrInput
   761  	// A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)
   762  	ServerSideEncryptionConfiguration BucketServerSideEncryptionConfigurationPtrInput
   763  	// A map of tags to assign to the bucket. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   764  	Tags pulumi.StringMapInput
   765  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   766  	//
   767  	// Deprecated: Please use `tags` instead.
   768  	TagsAll pulumi.StringMapInput
   769  	// A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
   770  	Versioning BucketVersioningPtrInput
   771  	// A website object (documented below).
   772  	Website BucketWebsitePtrInput
   773  	// The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
   774  	WebsiteDomain pulumi.StringPtrInput
   775  	// The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
   776  	WebsiteEndpoint pulumi.StringPtrInput
   777  }
   778  
   779  func (BucketState) ElementType() reflect.Type {
   780  	return reflect.TypeOf((*bucketState)(nil)).Elem()
   781  }
   782  
   783  type bucketArgs struct {
   784  	// Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
   785  	AccelerationStatus *string `pulumi:"accelerationStatus"`
   786  	// The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, and `log-delivery-write`. Defaults to `private`.  Conflicts with `grant`.
   787  	Acl *string `pulumi:"acl"`
   788  	// The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
   789  	Arn *string `pulumi:"arn"`
   790  	// The name of the bucket. If omitted, this provider will assign a random, unique name. Must be lowercase and less than or equal to 63 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   791  	Bucket *string `pulumi:"bucket"`
   792  	// Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`. Must be lowercase and less than or equal to 37 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   793  	BucketPrefix *string `pulumi:"bucketPrefix"`
   794  	// A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
   795  	CorsRules []BucketCorsRule `pulumi:"corsRules"`
   796  	// A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
   797  	ForceDestroy *bool `pulumi:"forceDestroy"`
   798  	// An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.
   799  	Grants []BucketGrant `pulumi:"grants"`
   800  	// The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
   801  	HostedZoneId *string `pulumi:"hostedZoneId"`
   802  	// A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).
   803  	LifecycleRules []BucketLifecycleRule `pulumi:"lifecycleRules"`
   804  	// A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).
   805  	Loggings []BucketLogging `pulumi:"loggings"`
   806  	// A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)
   807  	//
   808  	// > **NOTE:** You cannot use `accelerationStatus` in `cn-north-1` or `us-gov-west-1`
   809  	ObjectLockConfiguration *BucketObjectLockConfiguration `pulumi:"objectLockConfiguration"`
   810  	// A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document. Note that if the policy document is not specific enough (but still valid), this provider may view the policy as constantly changing in a `pulumi preview`. In this case, please make sure you use the verbose/specific version of the policy.
   811  	Policy interface{} `pulumi:"policy"`
   812  	// A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).
   813  	ReplicationConfiguration *BucketReplicationConfiguration `pulumi:"replicationConfiguration"`
   814  	// Specifies who should bear the cost of Amazon S3 data transfer.
   815  	// Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
   816  	// the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
   817  	// developer guide for more information.
   818  	RequestPayer *string `pulumi:"requestPayer"`
   819  	// A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)
   820  	ServerSideEncryptionConfiguration *BucketServerSideEncryptionConfiguration `pulumi:"serverSideEncryptionConfiguration"`
   821  	// A map of tags to assign to the bucket. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   822  	Tags map[string]string `pulumi:"tags"`
   823  	// A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
   824  	Versioning *BucketVersioning `pulumi:"versioning"`
   825  	// A website object (documented below).
   826  	Website *BucketWebsite `pulumi:"website"`
   827  	// The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
   828  	WebsiteDomain *string `pulumi:"websiteDomain"`
   829  	// The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
   830  	WebsiteEndpoint *string `pulumi:"websiteEndpoint"`
   831  }
   832  
   833  // The set of arguments for constructing a Bucket resource.
   834  type BucketArgs struct {
   835  	// Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
   836  	AccelerationStatus pulumi.StringPtrInput
   837  	// The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, and `log-delivery-write`. Defaults to `private`.  Conflicts with `grant`.
   838  	Acl pulumi.StringPtrInput
   839  	// The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
   840  	Arn pulumi.StringPtrInput
   841  	// The name of the bucket. If omitted, this provider will assign a random, unique name. Must be lowercase and less than or equal to 63 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   842  	Bucket pulumi.StringPtrInput
   843  	// Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`. Must be lowercase and less than or equal to 37 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   844  	BucketPrefix pulumi.StringPtrInput
   845  	// A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
   846  	CorsRules BucketCorsRuleArrayInput
   847  	// A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
   848  	ForceDestroy pulumi.BoolPtrInput
   849  	// An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.
   850  	Grants BucketGrantArrayInput
   851  	// The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
   852  	HostedZoneId pulumi.StringPtrInput
   853  	// A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).
   854  	LifecycleRules BucketLifecycleRuleArrayInput
   855  	// A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).
   856  	Loggings BucketLoggingArrayInput
   857  	// A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)
   858  	//
   859  	// > **NOTE:** You cannot use `accelerationStatus` in `cn-north-1` or `us-gov-west-1`
   860  	ObjectLockConfiguration BucketObjectLockConfigurationPtrInput
   861  	// A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document. Note that if the policy document is not specific enough (but still valid), this provider may view the policy as constantly changing in a `pulumi preview`. In this case, please make sure you use the verbose/specific version of the policy.
   862  	Policy pulumi.Input
   863  	// A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).
   864  	ReplicationConfiguration BucketReplicationConfigurationPtrInput
   865  	// Specifies who should bear the cost of Amazon S3 data transfer.
   866  	// Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
   867  	// the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
   868  	// developer guide for more information.
   869  	RequestPayer pulumi.StringPtrInput
   870  	// A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)
   871  	ServerSideEncryptionConfiguration BucketServerSideEncryptionConfigurationPtrInput
   872  	// A map of tags to assign to the bucket. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   873  	Tags pulumi.StringMapInput
   874  	// A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
   875  	Versioning BucketVersioningPtrInput
   876  	// A website object (documented below).
   877  	Website BucketWebsitePtrInput
   878  	// The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
   879  	WebsiteDomain pulumi.StringPtrInput
   880  	// The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
   881  	WebsiteEndpoint pulumi.StringPtrInput
   882  }
   883  
   884  func (BucketArgs) ElementType() reflect.Type {
   885  	return reflect.TypeOf((*bucketArgs)(nil)).Elem()
   886  }
   887  
   888  type BucketInput interface {
   889  	pulumi.Input
   890  
   891  	ToBucketOutput() BucketOutput
   892  	ToBucketOutputWithContext(ctx context.Context) BucketOutput
   893  }
   894  
   895  func (*Bucket) ElementType() reflect.Type {
   896  	return reflect.TypeOf((**Bucket)(nil)).Elem()
   897  }
   898  
   899  func (i *Bucket) ToBucketOutput() BucketOutput {
   900  	return i.ToBucketOutputWithContext(context.Background())
   901  }
   902  
   903  func (i *Bucket) ToBucketOutputWithContext(ctx context.Context) BucketOutput {
   904  	return pulumi.ToOutputWithContext(ctx, i).(BucketOutput)
   905  }
   906  
   907  // BucketArrayInput is an input type that accepts BucketArray and BucketArrayOutput values.
   908  // You can construct a concrete instance of `BucketArrayInput` via:
   909  //
   910  //	BucketArray{ BucketArgs{...} }
   911  type BucketArrayInput interface {
   912  	pulumi.Input
   913  
   914  	ToBucketArrayOutput() BucketArrayOutput
   915  	ToBucketArrayOutputWithContext(context.Context) BucketArrayOutput
   916  }
   917  
   918  type BucketArray []BucketInput
   919  
   920  func (BucketArray) ElementType() reflect.Type {
   921  	return reflect.TypeOf((*[]*Bucket)(nil)).Elem()
   922  }
   923  
   924  func (i BucketArray) ToBucketArrayOutput() BucketArrayOutput {
   925  	return i.ToBucketArrayOutputWithContext(context.Background())
   926  }
   927  
   928  func (i BucketArray) ToBucketArrayOutputWithContext(ctx context.Context) BucketArrayOutput {
   929  	return pulumi.ToOutputWithContext(ctx, i).(BucketArrayOutput)
   930  }
   931  
   932  // BucketMapInput is an input type that accepts BucketMap and BucketMapOutput values.
   933  // You can construct a concrete instance of `BucketMapInput` via:
   934  //
   935  //	BucketMap{ "key": BucketArgs{...} }
   936  type BucketMapInput interface {
   937  	pulumi.Input
   938  
   939  	ToBucketMapOutput() BucketMapOutput
   940  	ToBucketMapOutputWithContext(context.Context) BucketMapOutput
   941  }
   942  
   943  type BucketMap map[string]BucketInput
   944  
   945  func (BucketMap) ElementType() reflect.Type {
   946  	return reflect.TypeOf((*map[string]*Bucket)(nil)).Elem()
   947  }
   948  
   949  func (i BucketMap) ToBucketMapOutput() BucketMapOutput {
   950  	return i.ToBucketMapOutputWithContext(context.Background())
   951  }
   952  
   953  func (i BucketMap) ToBucketMapOutputWithContext(ctx context.Context) BucketMapOutput {
   954  	return pulumi.ToOutputWithContext(ctx, i).(BucketMapOutput)
   955  }
   956  
   957  type BucketOutput struct{ *pulumi.OutputState }
   958  
   959  func (BucketOutput) ElementType() reflect.Type {
   960  	return reflect.TypeOf((**Bucket)(nil)).Elem()
   961  }
   962  
   963  func (o BucketOutput) ToBucketOutput() BucketOutput {
   964  	return o
   965  }
   966  
   967  func (o BucketOutput) ToBucketOutputWithContext(ctx context.Context) BucketOutput {
   968  	return o
   969  }
   970  
   971  // Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
   972  func (o BucketOutput) AccelerationStatus() pulumi.StringOutput {
   973  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.AccelerationStatus }).(pulumi.StringOutput)
   974  }
   975  
   976  // The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Valid values are `private`, `public-read`, `public-read-write`, `aws-exec-read`, `authenticated-read`, and `log-delivery-write`. Defaults to `private`.  Conflicts with `grant`.
   977  func (o BucketOutput) Acl() pulumi.StringPtrOutput {
   978  	return o.ApplyT(func(v *Bucket) pulumi.StringPtrOutput { return v.Acl }).(pulumi.StringPtrOutput)
   979  }
   980  
   981  // The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
   982  func (o BucketOutput) Arn() pulumi.StringOutput {
   983  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   984  }
   985  
   986  // The name of the bucket. If omitted, this provider will assign a random, unique name. Must be lowercase and less than or equal to 63 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   987  func (o BucketOutput) Bucket() pulumi.StringOutput {
   988  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.Bucket }).(pulumi.StringOutput)
   989  }
   990  
   991  // The bucket domain name. Will be of format `bucketname.s3.amazonaws.com`.
   992  func (o BucketOutput) BucketDomainName() pulumi.StringOutput {
   993  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.BucketDomainName }).(pulumi.StringOutput)
   994  }
   995  
   996  // Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`. Must be lowercase and less than or equal to 37 characters in length. A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
   997  func (o BucketOutput) BucketPrefix() pulumi.StringPtrOutput {
   998  	return o.ApplyT(func(v *Bucket) pulumi.StringPtrOutput { return v.BucketPrefix }).(pulumi.StringPtrOutput)
   999  }
  1000  
  1001  // The bucket region-specific domain name. The bucket domain name including the region name, please refer [here](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent [redirect issues](https://forums.aws.amazon.com/thread.jspa?threadID=216814) from CloudFront to S3 Origin URL.
  1002  func (o BucketOutput) BucketRegionalDomainName() pulumi.StringOutput {
  1003  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.BucketRegionalDomainName }).(pulumi.StringOutput)
  1004  }
  1005  
  1006  // A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
  1007  func (o BucketOutput) CorsRules() BucketCorsRuleArrayOutput {
  1008  	return o.ApplyT(func(v *Bucket) BucketCorsRuleArrayOutput { return v.CorsRules }).(BucketCorsRuleArrayOutput)
  1009  }
  1010  
  1011  // A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
  1012  func (o BucketOutput) ForceDestroy() pulumi.BoolPtrOutput {
  1013  	return o.ApplyT(func(v *Bucket) pulumi.BoolPtrOutput { return v.ForceDestroy }).(pulumi.BoolPtrOutput)
  1014  }
  1015  
  1016  // An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.
  1017  func (o BucketOutput) Grants() BucketGrantArrayOutput {
  1018  	return o.ApplyT(func(v *Bucket) BucketGrantArrayOutput { return v.Grants }).(BucketGrantArrayOutput)
  1019  }
  1020  
  1021  // The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
  1022  func (o BucketOutput) HostedZoneId() pulumi.StringOutput {
  1023  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.HostedZoneId }).(pulumi.StringOutput)
  1024  }
  1025  
  1026  // A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).
  1027  func (o BucketOutput) LifecycleRules() BucketLifecycleRuleArrayOutput {
  1028  	return o.ApplyT(func(v *Bucket) BucketLifecycleRuleArrayOutput { return v.LifecycleRules }).(BucketLifecycleRuleArrayOutput)
  1029  }
  1030  
  1031  // A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).
  1032  func (o BucketOutput) Loggings() BucketLoggingArrayOutput {
  1033  	return o.ApplyT(func(v *Bucket) BucketLoggingArrayOutput { return v.Loggings }).(BucketLoggingArrayOutput)
  1034  }
  1035  
  1036  // A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)
  1037  //
  1038  // > **NOTE:** You cannot use `accelerationStatus` in `cn-north-1` or `us-gov-west-1`
  1039  func (o BucketOutput) ObjectLockConfiguration() BucketObjectLockConfigurationPtrOutput {
  1040  	return o.ApplyT(func(v *Bucket) BucketObjectLockConfigurationPtrOutput { return v.ObjectLockConfiguration }).(BucketObjectLockConfigurationPtrOutput)
  1041  }
  1042  
  1043  // A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document. Note that if the policy document is not specific enough (but still valid), this provider may view the policy as constantly changing in a `pulumi preview`. In this case, please make sure you use the verbose/specific version of the policy.
  1044  func (o BucketOutput) Policy() pulumi.StringPtrOutput {
  1045  	return o.ApplyT(func(v *Bucket) pulumi.StringPtrOutput { return v.Policy }).(pulumi.StringPtrOutput)
  1046  }
  1047  
  1048  // The AWS region this bucket resides in.
  1049  func (o BucketOutput) Region() pulumi.StringOutput {
  1050  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
  1051  }
  1052  
  1053  // A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).
  1054  func (o BucketOutput) ReplicationConfiguration() BucketReplicationConfigurationPtrOutput {
  1055  	return o.ApplyT(func(v *Bucket) BucketReplicationConfigurationPtrOutput { return v.ReplicationConfiguration }).(BucketReplicationConfigurationPtrOutput)
  1056  }
  1057  
  1058  // Specifies who should bear the cost of Amazon S3 data transfer.
  1059  // Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
  1060  // the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
  1061  // developer guide for more information.
  1062  func (o BucketOutput) RequestPayer() pulumi.StringOutput {
  1063  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.RequestPayer }).(pulumi.StringOutput)
  1064  }
  1065  
  1066  // A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)
  1067  func (o BucketOutput) ServerSideEncryptionConfiguration() BucketServerSideEncryptionConfigurationOutput {
  1068  	return o.ApplyT(func(v *Bucket) BucketServerSideEncryptionConfigurationOutput {
  1069  		return v.ServerSideEncryptionConfiguration
  1070  	}).(BucketServerSideEncryptionConfigurationOutput)
  1071  }
  1072  
  1073  // A map of tags to assign to the bucket. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  1074  func (o BucketOutput) Tags() pulumi.StringMapOutput {
  1075  	return o.ApplyT(func(v *Bucket) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
  1076  }
  1077  
  1078  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
  1079  //
  1080  // Deprecated: Please use `tags` instead.
  1081  func (o BucketOutput) TagsAll() pulumi.StringMapOutput {
  1082  	return o.ApplyT(func(v *Bucket) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
  1083  }
  1084  
  1085  // A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
  1086  func (o BucketOutput) Versioning() BucketVersioningOutput {
  1087  	return o.ApplyT(func(v *Bucket) BucketVersioningOutput { return v.Versioning }).(BucketVersioningOutput)
  1088  }
  1089  
  1090  // A website object (documented below).
  1091  func (o BucketOutput) Website() BucketWebsitePtrOutput {
  1092  	return o.ApplyT(func(v *Bucket) BucketWebsitePtrOutput { return v.Website }).(BucketWebsitePtrOutput)
  1093  }
  1094  
  1095  // The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
  1096  func (o BucketOutput) WebsiteDomain() pulumi.StringOutput {
  1097  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.WebsiteDomain }).(pulumi.StringOutput)
  1098  }
  1099  
  1100  // The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
  1101  func (o BucketOutput) WebsiteEndpoint() pulumi.StringOutput {
  1102  	return o.ApplyT(func(v *Bucket) pulumi.StringOutput { return v.WebsiteEndpoint }).(pulumi.StringOutput)
  1103  }
  1104  
  1105  type BucketArrayOutput struct{ *pulumi.OutputState }
  1106  
  1107  func (BucketArrayOutput) ElementType() reflect.Type {
  1108  	return reflect.TypeOf((*[]*Bucket)(nil)).Elem()
  1109  }
  1110  
  1111  func (o BucketArrayOutput) ToBucketArrayOutput() BucketArrayOutput {
  1112  	return o
  1113  }
  1114  
  1115  func (o BucketArrayOutput) ToBucketArrayOutputWithContext(ctx context.Context) BucketArrayOutput {
  1116  	return o
  1117  }
  1118  
  1119  func (o BucketArrayOutput) Index(i pulumi.IntInput) BucketOutput {
  1120  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Bucket {
  1121  		return vs[0].([]*Bucket)[vs[1].(int)]
  1122  	}).(BucketOutput)
  1123  }
  1124  
  1125  type BucketMapOutput struct{ *pulumi.OutputState }
  1126  
  1127  func (BucketMapOutput) ElementType() reflect.Type {
  1128  	return reflect.TypeOf((*map[string]*Bucket)(nil)).Elem()
  1129  }
  1130  
  1131  func (o BucketMapOutput) ToBucketMapOutput() BucketMapOutput {
  1132  	return o
  1133  }
  1134  
  1135  func (o BucketMapOutput) ToBucketMapOutputWithContext(ctx context.Context) BucketMapOutput {
  1136  	return o
  1137  }
  1138  
  1139  func (o BucketMapOutput) MapIndex(k pulumi.StringInput) BucketOutput {
  1140  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Bucket {
  1141  		return vs[0].(map[string]*Bucket)[vs[1].(string)]
  1142  	}).(BucketOutput)
  1143  }
  1144  
  1145  func init() {
  1146  	pulumi.RegisterInputType(reflect.TypeOf((*BucketInput)(nil)).Elem(), &Bucket{})
  1147  	pulumi.RegisterInputType(reflect.TypeOf((*BucketArrayInput)(nil)).Elem(), BucketArray{})
  1148  	pulumi.RegisterInputType(reflect.TypeOf((*BucketMapInput)(nil)).Elem(), BucketMap{})
  1149  	pulumi.RegisterOutputType(BucketOutput{})
  1150  	pulumi.RegisterOutputType(BucketArrayOutput{})
  1151  	pulumi.RegisterOutputType(BucketMapOutput{})
  1152  }