github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/s3/bucketObject.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 object resource. 16 // 17 // ## Example Usage 18 // 19 // ### Uploading a file to a bucket 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 28 // "github.com/pulumi/pulumi-std/sdk/go/std" 29 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 30 // 31 // ) 32 // 33 // func main() { 34 // pulumi.Run(func(ctx *pulumi.Context) error { 35 // invokeFilemd5, err := std.Filemd5(ctx, &std.Filemd5Args{ 36 // Input: "path/to/file", 37 // }, nil) 38 // if err != nil { 39 // return err 40 // } 41 // _, err = s3.NewBucketObject(ctx, "object", &s3.BucketObjectArgs{ 42 // Bucket: pulumi.Any("your_bucket_name"), 43 // Key: pulumi.String("new_object_key"), 44 // Source: pulumi.NewFileAsset("path/to/file"), 45 // Etag: invokeFilemd5.Result, 46 // }) 47 // if err != nil { 48 // return err 49 // } 50 // return nil 51 // }) 52 // } 53 // 54 // ``` 55 // <!--End PulumiCodeChooser --> 56 // 57 // ### Encrypting with KMS Key 58 // 59 // <!--Start PulumiCodeChooser --> 60 // ```go 61 // package main 62 // 63 // import ( 64 // 65 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms" 66 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 67 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 68 // 69 // ) 70 // 71 // func main() { 72 // pulumi.Run(func(ctx *pulumi.Context) error { 73 // examplekms, err := kms.NewKey(ctx, "examplekms", &kms.KeyArgs{ 74 // Description: pulumi.String("KMS key 1"), 75 // DeletionWindowInDays: pulumi.Int(7), 76 // }) 77 // if err != nil { 78 // return err 79 // } 80 // examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{ 81 // Bucket: pulumi.String("examplebuckettftest"), 82 // }) 83 // if err != nil { 84 // return err 85 // } 86 // _, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{ 87 // Bucket: examplebucket.ID(), 88 // Acl: pulumi.String("private"), 89 // }) 90 // if err != nil { 91 // return err 92 // } 93 // _, err = s3.NewBucketObject(ctx, "example", &s3.BucketObjectArgs{ 94 // Key: pulumi.String("someobject"), 95 // Bucket: examplebucket.ID(), 96 // Source: pulumi.NewFileAsset("index.html"), 97 // KmsKeyId: examplekms.Arn, 98 // }) 99 // if err != nil { 100 // return err 101 // } 102 // return nil 103 // }) 104 // } 105 // 106 // ``` 107 // <!--End PulumiCodeChooser --> 108 // 109 // ### Server Side Encryption with S3 Default Master Key 110 // 111 // <!--Start PulumiCodeChooser --> 112 // ```go 113 // package main 114 // 115 // import ( 116 // 117 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 118 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 119 // 120 // ) 121 // 122 // func main() { 123 // pulumi.Run(func(ctx *pulumi.Context) error { 124 // examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{ 125 // Bucket: pulumi.String("examplebuckettftest"), 126 // }) 127 // if err != nil { 128 // return err 129 // } 130 // _, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{ 131 // Bucket: examplebucket.ID(), 132 // Acl: pulumi.String("private"), 133 // }) 134 // if err != nil { 135 // return err 136 // } 137 // _, err = s3.NewBucketObject(ctx, "example", &s3.BucketObjectArgs{ 138 // Key: pulumi.String("someobject"), 139 // Bucket: examplebucket.ID(), 140 // Source: pulumi.NewFileAsset("index.html"), 141 // ServerSideEncryption: pulumi.String("aws:kms"), 142 // }) 143 // if err != nil { 144 // return err 145 // } 146 // return nil 147 // }) 148 // } 149 // 150 // ``` 151 // <!--End PulumiCodeChooser --> 152 // 153 // ### Server Side Encryption with AWS-Managed Key 154 // 155 // <!--Start PulumiCodeChooser --> 156 // ```go 157 // package main 158 // 159 // import ( 160 // 161 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 162 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 163 // 164 // ) 165 // 166 // func main() { 167 // pulumi.Run(func(ctx *pulumi.Context) error { 168 // examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{ 169 // Bucket: pulumi.String("examplebuckettftest"), 170 // }) 171 // if err != nil { 172 // return err 173 // } 174 // _, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{ 175 // Bucket: examplebucket.ID(), 176 // Acl: pulumi.String("private"), 177 // }) 178 // if err != nil { 179 // return err 180 // } 181 // _, err = s3.NewBucketObject(ctx, "example", &s3.BucketObjectArgs{ 182 // Key: pulumi.String("someobject"), 183 // Bucket: examplebucket.ID(), 184 // Source: pulumi.NewFileAsset("index.html"), 185 // ServerSideEncryption: pulumi.String("AES256"), 186 // }) 187 // if err != nil { 188 // return err 189 // } 190 // return nil 191 // }) 192 // } 193 // 194 // ``` 195 // <!--End PulumiCodeChooser --> 196 // 197 // ### S3 Object Lock 198 // 199 // <!--Start PulumiCodeChooser --> 200 // ```go 201 // package main 202 // 203 // import ( 204 // 205 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 206 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 207 // 208 // ) 209 // 210 // func main() { 211 // pulumi.Run(func(ctx *pulumi.Context) error { 212 // examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{ 213 // Bucket: pulumi.String("examplebuckettftest"), 214 // ObjectLockEnabled: pulumi.Bool(true), 215 // }) 216 // if err != nil { 217 // return err 218 // } 219 // _, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{ 220 // Bucket: examplebucket.ID(), 221 // Acl: pulumi.String("private"), 222 // }) 223 // if err != nil { 224 // return err 225 // } 226 // exampleBucketVersioningV2, err := s3.NewBucketVersioningV2(ctx, "example", &s3.BucketVersioningV2Args{ 227 // Bucket: examplebucket.ID(), 228 // VersioningConfiguration: &s3.BucketVersioningV2VersioningConfigurationArgs{ 229 // Status: pulumi.String("Enabled"), 230 // }, 231 // }) 232 // if err != nil { 233 // return err 234 // } 235 // _, err = s3.NewBucketObject(ctx, "example", &s3.BucketObjectArgs{ 236 // Key: pulumi.String("someobject"), 237 // Bucket: examplebucket.ID(), 238 // Source: pulumi.NewFileAsset("important.txt"), 239 // ObjectLockLegalHoldStatus: pulumi.String("ON"), 240 // ObjectLockMode: pulumi.String("GOVERNANCE"), 241 // ObjectLockRetainUntilDate: pulumi.String("2021-12-31T23:59:60Z"), 242 // ForceDestroy: pulumi.Bool(true), 243 // }, pulumi.DependsOn([]pulumi.Resource{ 244 // exampleBucketVersioningV2, 245 // })) 246 // if err != nil { 247 // return err 248 // } 249 // return nil 250 // }) 251 // } 252 // 253 // ``` 254 // <!--End PulumiCodeChooser --> 255 // 256 // ## Import 257 // 258 // Import using S3 URL syntax: 259 // 260 // __Using `pulumi import` to import__ objects using the `id` or S3 URL. For example: 261 // 262 // Import using the `id`, which is the bucket name and the key together: 263 // 264 // ```sh 265 // $ pulumi import aws:s3/bucketObject:BucketObject example some-bucket-name/some/key.txt 266 // ``` 267 // Import using S3 URL syntax: 268 // 269 // ```sh 270 // $ pulumi import aws:s3/bucketObject:BucketObject example s3://some-bucket-name/some/key.txt 271 // ``` 272 type BucketObject struct { 273 pulumi.CustomResourceState 274 275 // [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`, `bucket-owner-read`, and `bucket-owner-full-control`. Defaults to `private`. 276 Acl pulumi.StringPtrOutput `pulumi:"acl"` 277 // ARN of the object. 278 Arn pulumi.StringOutput `pulumi:"arn"` 279 // Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified. 280 Bucket pulumi.StringOutput `pulumi:"bucket"` 281 // Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS. 282 BucketKeyEnabled pulumi.BoolOutput `pulumi:"bucketKeyEnabled"` 283 // Caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details. 284 CacheControl pulumi.StringPtrOutput `pulumi:"cacheControl"` 285 // Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. 286 Content pulumi.StringPtrOutput `pulumi:"content"` 287 // Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file. 288 ContentBase64 pulumi.StringPtrOutput `pulumi:"contentBase64"` 289 // Presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information. 290 ContentDisposition pulumi.StringPtrOutput `pulumi:"contentDisposition"` 291 // Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information. 292 ContentEncoding pulumi.StringPtrOutput `pulumi:"contentEncoding"` 293 // Language the content is in e.g., en-US or en-GB. 294 ContentLanguage pulumi.StringPtrOutput `pulumi:"contentLanguage"` 295 // Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input. 296 ContentType pulumi.StringOutput `pulumi:"contentType"` 297 // Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kmsKeyId` or `serverSideEncryption = "aws:kms"` (see `sourceHash` instead). 298 Etag pulumi.StringOutput `pulumi:"etag"` 299 // Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled. 300 ForceDestroy pulumi.BoolPtrOutput `pulumi:"forceDestroy"` 301 // Name of the object once it is in the bucket. 302 // 303 // The following arguments are optional: 304 Key pulumi.StringOutput `pulumi:"key"` 305 // ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `kms.Key` resource, use the `arn` attribute. If referencing the `kms.Alias` data source or resource, use the `targetKeyArn` attribute. The provider will only perform drift detection if a configuration value is provided. 306 KmsKeyId pulumi.StringOutput `pulumi:"kmsKeyId"` 307 // Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API). 308 Metadata pulumi.StringMapOutput `pulumi:"metadata"` 309 // [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`. 310 ObjectLockLegalHoldStatus pulumi.StringPtrOutput `pulumi:"objectLockLegalHoldStatus"` 311 // Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`. 312 ObjectLockMode pulumi.StringPtrOutput `pulumi:"objectLockMode"` 313 // Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods). 314 ObjectLockRetainUntilDate pulumi.StringPtrOutput `pulumi:"objectLockRetainUntilDate"` 315 // Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`". 316 ServerSideEncryption pulumi.StringOutput `pulumi:"serverSideEncryption"` 317 // Path to a file that will be read and uploaded as raw bytes for the object content. 318 Source pulumi.AssetOrArchiveOutput `pulumi:"source"` 319 // Triggers updates like `etag` but useful to address `etag` encryption limitations. 320 SourceHash pulumi.StringPtrOutput `pulumi:"sourceHash"` 321 // [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`". 322 StorageClass pulumi.StringOutput `pulumi:"storageClass"` 323 // Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 324 Tags pulumi.StringMapOutput `pulumi:"tags"` 325 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 326 // 327 // Deprecated: Please use `tags` instead. 328 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 329 // Unique version ID value for the object, if bucket versioning is enabled. 330 VersionId pulumi.StringOutput `pulumi:"versionId"` 331 // Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html). 332 // 333 // If no content is provided through `source`, `content` or `contentBase64`, then the object will be empty. 334 WebsiteRedirect pulumi.StringPtrOutput `pulumi:"websiteRedirect"` 335 } 336 337 // NewBucketObject registers a new resource with the given unique name, arguments, and options. 338 func NewBucketObject(ctx *pulumi.Context, 339 name string, args *BucketObjectArgs, opts ...pulumi.ResourceOption) (*BucketObject, error) { 340 if args == nil { 341 return nil, errors.New("missing one or more required arguments") 342 } 343 344 if args.Bucket == nil { 345 return nil, errors.New("invalid value for required argument 'Bucket'") 346 } 347 opts = internal.PkgResourceDefaultOpts(opts) 348 var resource BucketObject 349 err := ctx.RegisterResource("aws:s3/bucketObject:BucketObject", name, args, &resource, opts...) 350 if err != nil { 351 return nil, err 352 } 353 return &resource, nil 354 } 355 356 // GetBucketObject gets an existing BucketObject resource's state with the given name, ID, and optional 357 // state properties that are used to uniquely qualify the lookup (nil if not required). 358 func GetBucketObject(ctx *pulumi.Context, 359 name string, id pulumi.IDInput, state *BucketObjectState, opts ...pulumi.ResourceOption) (*BucketObject, error) { 360 var resource BucketObject 361 err := ctx.ReadResource("aws:s3/bucketObject:BucketObject", name, id, state, &resource, opts...) 362 if err != nil { 363 return nil, err 364 } 365 return &resource, nil 366 } 367 368 // Input properties used for looking up and filtering BucketObject resources. 369 type bucketObjectState struct { 370 // [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`, `bucket-owner-read`, and `bucket-owner-full-control`. Defaults to `private`. 371 Acl *string `pulumi:"acl"` 372 // ARN of the object. 373 Arn *string `pulumi:"arn"` 374 // Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified. 375 Bucket interface{} `pulumi:"bucket"` 376 // Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS. 377 BucketKeyEnabled *bool `pulumi:"bucketKeyEnabled"` 378 // Caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details. 379 CacheControl *string `pulumi:"cacheControl"` 380 // Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. 381 Content *string `pulumi:"content"` 382 // Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file. 383 ContentBase64 *string `pulumi:"contentBase64"` 384 // Presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information. 385 ContentDisposition *string `pulumi:"contentDisposition"` 386 // Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information. 387 ContentEncoding *string `pulumi:"contentEncoding"` 388 // Language the content is in e.g., en-US or en-GB. 389 ContentLanguage *string `pulumi:"contentLanguage"` 390 // Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input. 391 ContentType *string `pulumi:"contentType"` 392 // Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kmsKeyId` or `serverSideEncryption = "aws:kms"` (see `sourceHash` instead). 393 Etag *string `pulumi:"etag"` 394 // Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled. 395 ForceDestroy *bool `pulumi:"forceDestroy"` 396 // Name of the object once it is in the bucket. 397 // 398 // The following arguments are optional: 399 Key *string `pulumi:"key"` 400 // ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `kms.Key` resource, use the `arn` attribute. If referencing the `kms.Alias` data source or resource, use the `targetKeyArn` attribute. The provider will only perform drift detection if a configuration value is provided. 401 KmsKeyId *string `pulumi:"kmsKeyId"` 402 // Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API). 403 Metadata map[string]string `pulumi:"metadata"` 404 // [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`. 405 ObjectLockLegalHoldStatus *string `pulumi:"objectLockLegalHoldStatus"` 406 // Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`. 407 ObjectLockMode *string `pulumi:"objectLockMode"` 408 // Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods). 409 ObjectLockRetainUntilDate *string `pulumi:"objectLockRetainUntilDate"` 410 // Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`". 411 ServerSideEncryption *string `pulumi:"serverSideEncryption"` 412 // Path to a file that will be read and uploaded as raw bytes for the object content. 413 Source pulumi.AssetOrArchive `pulumi:"source"` 414 // Triggers updates like `etag` but useful to address `etag` encryption limitations. 415 SourceHash *string `pulumi:"sourceHash"` 416 // [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`". 417 StorageClass *string `pulumi:"storageClass"` 418 // Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 419 Tags map[string]string `pulumi:"tags"` 420 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 421 // 422 // Deprecated: Please use `tags` instead. 423 TagsAll map[string]string `pulumi:"tagsAll"` 424 // Unique version ID value for the object, if bucket versioning is enabled. 425 VersionId *string `pulumi:"versionId"` 426 // Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html). 427 // 428 // If no content is provided through `source`, `content` or `contentBase64`, then the object will be empty. 429 WebsiteRedirect *string `pulumi:"websiteRedirect"` 430 } 431 432 type BucketObjectState struct { 433 // [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`, `bucket-owner-read`, and `bucket-owner-full-control`. Defaults to `private`. 434 Acl pulumi.StringPtrInput 435 // ARN of the object. 436 Arn pulumi.StringPtrInput 437 // Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified. 438 Bucket pulumi.Input 439 // Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS. 440 BucketKeyEnabled pulumi.BoolPtrInput 441 // Caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details. 442 CacheControl pulumi.StringPtrInput 443 // Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. 444 Content pulumi.StringPtrInput 445 // Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file. 446 ContentBase64 pulumi.StringPtrInput 447 // Presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information. 448 ContentDisposition pulumi.StringPtrInput 449 // Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information. 450 ContentEncoding pulumi.StringPtrInput 451 // Language the content is in e.g., en-US or en-GB. 452 ContentLanguage pulumi.StringPtrInput 453 // Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input. 454 ContentType pulumi.StringPtrInput 455 // Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kmsKeyId` or `serverSideEncryption = "aws:kms"` (see `sourceHash` instead). 456 Etag pulumi.StringPtrInput 457 // Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled. 458 ForceDestroy pulumi.BoolPtrInput 459 // Name of the object once it is in the bucket. 460 // 461 // The following arguments are optional: 462 Key pulumi.StringPtrInput 463 // ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `kms.Key` resource, use the `arn` attribute. If referencing the `kms.Alias` data source or resource, use the `targetKeyArn` attribute. The provider will only perform drift detection if a configuration value is provided. 464 KmsKeyId pulumi.StringPtrInput 465 // Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API). 466 Metadata pulumi.StringMapInput 467 // [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`. 468 ObjectLockLegalHoldStatus pulumi.StringPtrInput 469 // Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`. 470 ObjectLockMode pulumi.StringPtrInput 471 // Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods). 472 ObjectLockRetainUntilDate pulumi.StringPtrInput 473 // Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`". 474 ServerSideEncryption pulumi.StringPtrInput 475 // Path to a file that will be read and uploaded as raw bytes for the object content. 476 Source pulumi.AssetOrArchiveInput 477 // Triggers updates like `etag` but useful to address `etag` encryption limitations. 478 SourceHash pulumi.StringPtrInput 479 // [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`". 480 StorageClass pulumi.StringPtrInput 481 // Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 482 Tags pulumi.StringMapInput 483 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 484 // 485 // Deprecated: Please use `tags` instead. 486 TagsAll pulumi.StringMapInput 487 // Unique version ID value for the object, if bucket versioning is enabled. 488 VersionId pulumi.StringPtrInput 489 // Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html). 490 // 491 // If no content is provided through `source`, `content` or `contentBase64`, then the object will be empty. 492 WebsiteRedirect pulumi.StringPtrInput 493 } 494 495 func (BucketObjectState) ElementType() reflect.Type { 496 return reflect.TypeOf((*bucketObjectState)(nil)).Elem() 497 } 498 499 type bucketObjectArgs struct { 500 // [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`, `bucket-owner-read`, and `bucket-owner-full-control`. Defaults to `private`. 501 Acl *string `pulumi:"acl"` 502 // Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified. 503 Bucket interface{} `pulumi:"bucket"` 504 // Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS. 505 BucketKeyEnabled *bool `pulumi:"bucketKeyEnabled"` 506 // Caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details. 507 CacheControl *string `pulumi:"cacheControl"` 508 // Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. 509 Content *string `pulumi:"content"` 510 // Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file. 511 ContentBase64 *string `pulumi:"contentBase64"` 512 // Presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information. 513 ContentDisposition *string `pulumi:"contentDisposition"` 514 // Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information. 515 ContentEncoding *string `pulumi:"contentEncoding"` 516 // Language the content is in e.g., en-US or en-GB. 517 ContentLanguage *string `pulumi:"contentLanguage"` 518 // Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input. 519 ContentType *string `pulumi:"contentType"` 520 // Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kmsKeyId` or `serverSideEncryption = "aws:kms"` (see `sourceHash` instead). 521 Etag *string `pulumi:"etag"` 522 // Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled. 523 ForceDestroy *bool `pulumi:"forceDestroy"` 524 // Name of the object once it is in the bucket. 525 // 526 // The following arguments are optional: 527 Key *string `pulumi:"key"` 528 // ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `kms.Key` resource, use the `arn` attribute. If referencing the `kms.Alias` data source or resource, use the `targetKeyArn` attribute. The provider will only perform drift detection if a configuration value is provided. 529 KmsKeyId *string `pulumi:"kmsKeyId"` 530 // Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API). 531 Metadata map[string]string `pulumi:"metadata"` 532 // [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`. 533 ObjectLockLegalHoldStatus *string `pulumi:"objectLockLegalHoldStatus"` 534 // Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`. 535 ObjectLockMode *string `pulumi:"objectLockMode"` 536 // Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods). 537 ObjectLockRetainUntilDate *string `pulumi:"objectLockRetainUntilDate"` 538 // Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`". 539 ServerSideEncryption *string `pulumi:"serverSideEncryption"` 540 // Path to a file that will be read and uploaded as raw bytes for the object content. 541 Source pulumi.AssetOrArchive `pulumi:"source"` 542 // Triggers updates like `etag` but useful to address `etag` encryption limitations. 543 SourceHash *string `pulumi:"sourceHash"` 544 // [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`". 545 StorageClass *string `pulumi:"storageClass"` 546 // Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 547 Tags map[string]string `pulumi:"tags"` 548 // Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html). 549 // 550 // If no content is provided through `source`, `content` or `contentBase64`, then the object will be empty. 551 WebsiteRedirect *string `pulumi:"websiteRedirect"` 552 } 553 554 // The set of arguments for constructing a BucketObject resource. 555 type BucketObjectArgs struct { 556 // [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`, `bucket-owner-read`, and `bucket-owner-full-control`. Defaults to `private`. 557 Acl pulumi.StringPtrInput 558 // Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified. 559 Bucket pulumi.Input 560 // Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS. 561 BucketKeyEnabled pulumi.BoolPtrInput 562 // Caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details. 563 CacheControl pulumi.StringPtrInput 564 // Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. 565 Content pulumi.StringPtrInput 566 // Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file. 567 ContentBase64 pulumi.StringPtrInput 568 // Presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information. 569 ContentDisposition pulumi.StringPtrInput 570 // Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information. 571 ContentEncoding pulumi.StringPtrInput 572 // Language the content is in e.g., en-US or en-GB. 573 ContentLanguage pulumi.StringPtrInput 574 // Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input. 575 ContentType pulumi.StringPtrInput 576 // Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kmsKeyId` or `serverSideEncryption = "aws:kms"` (see `sourceHash` instead). 577 Etag pulumi.StringPtrInput 578 // Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled. 579 ForceDestroy pulumi.BoolPtrInput 580 // Name of the object once it is in the bucket. 581 // 582 // The following arguments are optional: 583 Key pulumi.StringPtrInput 584 // ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `kms.Key` resource, use the `arn` attribute. If referencing the `kms.Alias` data source or resource, use the `targetKeyArn` attribute. The provider will only perform drift detection if a configuration value is provided. 585 KmsKeyId pulumi.StringPtrInput 586 // Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API). 587 Metadata pulumi.StringMapInput 588 // [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`. 589 ObjectLockLegalHoldStatus pulumi.StringPtrInput 590 // Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`. 591 ObjectLockMode pulumi.StringPtrInput 592 // Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods). 593 ObjectLockRetainUntilDate pulumi.StringPtrInput 594 // Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`". 595 ServerSideEncryption pulumi.StringPtrInput 596 // Path to a file that will be read and uploaded as raw bytes for the object content. 597 Source pulumi.AssetOrArchiveInput 598 // Triggers updates like `etag` but useful to address `etag` encryption limitations. 599 SourceHash pulumi.StringPtrInput 600 // [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`". 601 StorageClass pulumi.StringPtrInput 602 // Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 603 Tags pulumi.StringMapInput 604 // Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html). 605 // 606 // If no content is provided through `source`, `content` or `contentBase64`, then the object will be empty. 607 WebsiteRedirect pulumi.StringPtrInput 608 } 609 610 func (BucketObjectArgs) ElementType() reflect.Type { 611 return reflect.TypeOf((*bucketObjectArgs)(nil)).Elem() 612 } 613 614 type BucketObjectInput interface { 615 pulumi.Input 616 617 ToBucketObjectOutput() BucketObjectOutput 618 ToBucketObjectOutputWithContext(ctx context.Context) BucketObjectOutput 619 } 620 621 func (*BucketObject) ElementType() reflect.Type { 622 return reflect.TypeOf((**BucketObject)(nil)).Elem() 623 } 624 625 func (i *BucketObject) ToBucketObjectOutput() BucketObjectOutput { 626 return i.ToBucketObjectOutputWithContext(context.Background()) 627 } 628 629 func (i *BucketObject) ToBucketObjectOutputWithContext(ctx context.Context) BucketObjectOutput { 630 return pulumi.ToOutputWithContext(ctx, i).(BucketObjectOutput) 631 } 632 633 // BucketObjectArrayInput is an input type that accepts BucketObjectArray and BucketObjectArrayOutput values. 634 // You can construct a concrete instance of `BucketObjectArrayInput` via: 635 // 636 // BucketObjectArray{ BucketObjectArgs{...} } 637 type BucketObjectArrayInput interface { 638 pulumi.Input 639 640 ToBucketObjectArrayOutput() BucketObjectArrayOutput 641 ToBucketObjectArrayOutputWithContext(context.Context) BucketObjectArrayOutput 642 } 643 644 type BucketObjectArray []BucketObjectInput 645 646 func (BucketObjectArray) ElementType() reflect.Type { 647 return reflect.TypeOf((*[]*BucketObject)(nil)).Elem() 648 } 649 650 func (i BucketObjectArray) ToBucketObjectArrayOutput() BucketObjectArrayOutput { 651 return i.ToBucketObjectArrayOutputWithContext(context.Background()) 652 } 653 654 func (i BucketObjectArray) ToBucketObjectArrayOutputWithContext(ctx context.Context) BucketObjectArrayOutput { 655 return pulumi.ToOutputWithContext(ctx, i).(BucketObjectArrayOutput) 656 } 657 658 // BucketObjectMapInput is an input type that accepts BucketObjectMap and BucketObjectMapOutput values. 659 // You can construct a concrete instance of `BucketObjectMapInput` via: 660 // 661 // BucketObjectMap{ "key": BucketObjectArgs{...} } 662 type BucketObjectMapInput interface { 663 pulumi.Input 664 665 ToBucketObjectMapOutput() BucketObjectMapOutput 666 ToBucketObjectMapOutputWithContext(context.Context) BucketObjectMapOutput 667 } 668 669 type BucketObjectMap map[string]BucketObjectInput 670 671 func (BucketObjectMap) ElementType() reflect.Type { 672 return reflect.TypeOf((*map[string]*BucketObject)(nil)).Elem() 673 } 674 675 func (i BucketObjectMap) ToBucketObjectMapOutput() BucketObjectMapOutput { 676 return i.ToBucketObjectMapOutputWithContext(context.Background()) 677 } 678 679 func (i BucketObjectMap) ToBucketObjectMapOutputWithContext(ctx context.Context) BucketObjectMapOutput { 680 return pulumi.ToOutputWithContext(ctx, i).(BucketObjectMapOutput) 681 } 682 683 type BucketObjectOutput struct{ *pulumi.OutputState } 684 685 func (BucketObjectOutput) ElementType() reflect.Type { 686 return reflect.TypeOf((**BucketObject)(nil)).Elem() 687 } 688 689 func (o BucketObjectOutput) ToBucketObjectOutput() BucketObjectOutput { 690 return o 691 } 692 693 func (o BucketObjectOutput) ToBucketObjectOutputWithContext(ctx context.Context) BucketObjectOutput { 694 return o 695 } 696 697 // [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`, `bucket-owner-read`, and `bucket-owner-full-control`. Defaults to `private`. 698 func (o BucketObjectOutput) Acl() pulumi.StringPtrOutput { 699 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.Acl }).(pulumi.StringPtrOutput) 700 } 701 702 // ARN of the object. 703 func (o BucketObjectOutput) Arn() pulumi.StringOutput { 704 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 705 } 706 707 // Name of the bucket to put the file in. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified. 708 func (o BucketObjectOutput) Bucket() pulumi.StringOutput { 709 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.Bucket }).(pulumi.StringOutput) 710 } 711 712 // Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS. 713 func (o BucketObjectOutput) BucketKeyEnabled() pulumi.BoolOutput { 714 return o.ApplyT(func(v *BucketObject) pulumi.BoolOutput { return v.BucketKeyEnabled }).(pulumi.BoolOutput) 715 } 716 717 // Caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details. 718 func (o BucketObjectOutput) CacheControl() pulumi.StringPtrOutput { 719 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.CacheControl }).(pulumi.StringPtrOutput) 720 } 721 722 // Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. 723 func (o BucketObjectOutput) Content() pulumi.StringPtrOutput { 724 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.Content }).(pulumi.StringPtrOutput) 725 } 726 727 // Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file. 728 func (o BucketObjectOutput) ContentBase64() pulumi.StringPtrOutput { 729 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.ContentBase64 }).(pulumi.StringPtrOutput) 730 } 731 732 // Presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information. 733 func (o BucketObjectOutput) ContentDisposition() pulumi.StringPtrOutput { 734 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.ContentDisposition }).(pulumi.StringPtrOutput) 735 } 736 737 // Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information. 738 func (o BucketObjectOutput) ContentEncoding() pulumi.StringPtrOutput { 739 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.ContentEncoding }).(pulumi.StringPtrOutput) 740 } 741 742 // Language the content is in e.g., en-US or en-GB. 743 func (o BucketObjectOutput) ContentLanguage() pulumi.StringPtrOutput { 744 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.ContentLanguage }).(pulumi.StringPtrOutput) 745 } 746 747 // Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input. 748 func (o BucketObjectOutput) ContentType() pulumi.StringOutput { 749 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.ContentType }).(pulumi.StringOutput) 750 } 751 752 // Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kmsKeyId` or `serverSideEncryption = "aws:kms"` (see `sourceHash` instead). 753 func (o BucketObjectOutput) Etag() pulumi.StringOutput { 754 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) 755 } 756 757 // Whether to allow the object to be deleted by removing any legal hold on any object version. Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled. 758 func (o BucketObjectOutput) ForceDestroy() pulumi.BoolPtrOutput { 759 return o.ApplyT(func(v *BucketObject) pulumi.BoolPtrOutput { return v.ForceDestroy }).(pulumi.BoolPtrOutput) 760 } 761 762 // Name of the object once it is in the bucket. 763 // 764 // The following arguments are optional: 765 func (o BucketObjectOutput) Key() pulumi.StringOutput { 766 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.Key }).(pulumi.StringOutput) 767 } 768 769 // ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the `kms.Key` resource, use the `arn` attribute. If referencing the `kms.Alias` data source or resource, use the `targetKeyArn` attribute. The provider will only perform drift detection if a configuration value is provided. 770 func (o BucketObjectOutput) KmsKeyId() pulumi.StringOutput { 771 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.KmsKeyId }).(pulumi.StringOutput) 772 } 773 774 // Map of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API). 775 func (o BucketObjectOutput) Metadata() pulumi.StringMapOutput { 776 return o.ApplyT(func(v *BucketObject) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput) 777 } 778 779 // [Legal hold](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-legal-holds) status that you want to apply to the specified object. Valid values are `ON` and `OFF`. 780 func (o BucketObjectOutput) ObjectLockLegalHoldStatus() pulumi.StringPtrOutput { 781 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.ObjectLockLegalHoldStatus }).(pulumi.StringPtrOutput) 782 } 783 784 // Object lock [retention mode](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes) that you want to apply to this object. Valid values are `GOVERNANCE` and `COMPLIANCE`. 785 func (o BucketObjectOutput) ObjectLockMode() pulumi.StringPtrOutput { 786 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.ObjectLockMode }).(pulumi.StringPtrOutput) 787 } 788 789 // Date and time, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), when this object's object lock will [expire](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-periods). 790 func (o BucketObjectOutput) ObjectLockRetainUntilDate() pulumi.StringPtrOutput { 791 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.ObjectLockRetainUntilDate }).(pulumi.StringPtrOutput) 792 } 793 794 // Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`". 795 func (o BucketObjectOutput) ServerSideEncryption() pulumi.StringOutput { 796 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.ServerSideEncryption }).(pulumi.StringOutput) 797 } 798 799 // Path to a file that will be read and uploaded as raw bytes for the object content. 800 func (o BucketObjectOutput) Source() pulumi.AssetOrArchiveOutput { 801 return o.ApplyT(func(v *BucketObject) pulumi.AssetOrArchiveOutput { return v.Source }).(pulumi.AssetOrArchiveOutput) 802 } 803 804 // Triggers updates like `etag` but useful to address `etag` encryption limitations. 805 func (o BucketObjectOutput) SourceHash() pulumi.StringPtrOutput { 806 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.SourceHash }).(pulumi.StringPtrOutput) 807 } 808 809 // [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`". 810 func (o BucketObjectOutput) StorageClass() pulumi.StringOutput { 811 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.StorageClass }).(pulumi.StringOutput) 812 } 813 814 // Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 815 func (o BucketObjectOutput) Tags() pulumi.StringMapOutput { 816 return o.ApplyT(func(v *BucketObject) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 817 } 818 819 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 820 // 821 // Deprecated: Please use `tags` instead. 822 func (o BucketObjectOutput) TagsAll() pulumi.StringMapOutput { 823 return o.ApplyT(func(v *BucketObject) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 824 } 825 826 // Unique version ID value for the object, if bucket versioning is enabled. 827 func (o BucketObjectOutput) VersionId() pulumi.StringOutput { 828 return o.ApplyT(func(v *BucketObject) pulumi.StringOutput { return v.VersionId }).(pulumi.StringOutput) 829 } 830 831 // Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html). 832 // 833 // If no content is provided through `source`, `content` or `contentBase64`, then the object will be empty. 834 func (o BucketObjectOutput) WebsiteRedirect() pulumi.StringPtrOutput { 835 return o.ApplyT(func(v *BucketObject) pulumi.StringPtrOutput { return v.WebsiteRedirect }).(pulumi.StringPtrOutput) 836 } 837 838 type BucketObjectArrayOutput struct{ *pulumi.OutputState } 839 840 func (BucketObjectArrayOutput) ElementType() reflect.Type { 841 return reflect.TypeOf((*[]*BucketObject)(nil)).Elem() 842 } 843 844 func (o BucketObjectArrayOutput) ToBucketObjectArrayOutput() BucketObjectArrayOutput { 845 return o 846 } 847 848 func (o BucketObjectArrayOutput) ToBucketObjectArrayOutputWithContext(ctx context.Context) BucketObjectArrayOutput { 849 return o 850 } 851 852 func (o BucketObjectArrayOutput) Index(i pulumi.IntInput) BucketObjectOutput { 853 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BucketObject { 854 return vs[0].([]*BucketObject)[vs[1].(int)] 855 }).(BucketObjectOutput) 856 } 857 858 type BucketObjectMapOutput struct{ *pulumi.OutputState } 859 860 func (BucketObjectMapOutput) ElementType() reflect.Type { 861 return reflect.TypeOf((*map[string]*BucketObject)(nil)).Elem() 862 } 863 864 func (o BucketObjectMapOutput) ToBucketObjectMapOutput() BucketObjectMapOutput { 865 return o 866 } 867 868 func (o BucketObjectMapOutput) ToBucketObjectMapOutputWithContext(ctx context.Context) BucketObjectMapOutput { 869 return o 870 } 871 872 func (o BucketObjectMapOutput) MapIndex(k pulumi.StringInput) BucketObjectOutput { 873 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BucketObject { 874 return vs[0].(map[string]*BucketObject)[vs[1].(string)] 875 }).(BucketObjectOutput) 876 } 877 878 func init() { 879 pulumi.RegisterInputType(reflect.TypeOf((*BucketObjectInput)(nil)).Elem(), &BucketObject{}) 880 pulumi.RegisterInputType(reflect.TypeOf((*BucketObjectArrayInput)(nil)).Elem(), BucketObjectArray{}) 881 pulumi.RegisterInputType(reflect.TypeOf((*BucketObjectMapInput)(nil)).Elem(), BucketObjectMap{}) 882 pulumi.RegisterOutputType(BucketObjectOutput{}) 883 pulumi.RegisterOutputType(BucketObjectArrayOutput{}) 884 pulumi.RegisterOutputType(BucketObjectMapOutput{}) 885 }