All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.s3.kotlin.BucketObjectArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.s3.kotlin

import com.pulumi.asset.AssetOrArchive
import com.pulumi.aws.s3.BucketObjectArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an S3 object resource.
 * ## Example Usage
 * ### Uploading a file to a bucket
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * import * as std from "@pulumi/std";
 * const object = new aws.s3.BucketObject("object", {
 *     bucket: "your_bucket_name",
 *     key: "new_object_key",
 *     source: new pulumi.asset.FileAsset("path/to/file"),
 *     etag: std.filemd5({
 *         input: "path/to/file",
 *     }).then(invoke => invoke.result),
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * import pulumi_std as std
 * object = aws.s3.BucketObject("object",
 *     bucket="your_bucket_name",
 *     key="new_object_key",
 *     source=pulumi.FileAsset("path/to/file"),
 *     etag=std.filemd5(input="path/to/file").result)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @object = new Aws.S3.BucketObject("object", new()
 *     {
 *         Bucket = "your_bucket_name",
 *         Key = "new_object_key",
 *         Source = new FileAsset("path/to/file"),
 *         Etag = Std.Filemd5.Invoke(new()
 *         {
 *             Input = "path/to/file",
 *         }).Apply(invoke => invoke.Result),
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		invokeFilemd5, err := std.Filemd5(ctx, &std.Filemd5Args{
 * 			Input: "path/to/file",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketObject(ctx, "object", &s3.BucketObjectArgs{
 * 			Bucket: pulumi.Any("your_bucket_name"),
 * 			Key:    pulumi.String("new_object_key"),
 * 			Source: pulumi.NewFileAsset("path/to/file"),
 * 			Etag:   pulumi.String(invokeFilemd5.Result),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.s3.BucketObject;
 * import com.pulumi.aws.s3.BucketObjectArgs;
 * import com.pulumi.asset.FileAsset;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var object = new BucketObject("object", BucketObjectArgs.builder()
 *             .bucket("your_bucket_name")
 *             .key("new_object_key")
 *             .source(new FileAsset("path/to/file"))
 *             .etag(StdFunctions.filemd5(Filemd5Args.builder()
 *                 .input("path/to/file")
 *                 .build()).result())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   object:
 *     type: aws:s3:BucketObject
 *     properties:
 *       bucket: your_bucket_name
 *       key: new_object_key
 *       source:
 *         fn::FileAsset: path/to/file
 *       etag:
 *         fn::invoke:
 *           Function: std:filemd5
 *           Arguments:
 *             input: path/to/file
 *           Return: result
 * ```
 * 
 * ### Encrypting with KMS Key
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const examplekms = new aws.kms.Key("examplekms", {
 *     description: "KMS key 1",
 *     deletionWindowInDays: 7,
 * });
 * const examplebucket = new aws.s3.BucketV2("examplebucket", {bucket: "examplebuckettftest"});
 * const example = new aws.s3.BucketAclV2("example", {
 *     bucket: examplebucket.id,
 *     acl: "private",
 * });
 * const exampleBucketObject = new aws.s3.BucketObject("example", {
 *     key: "someobject",
 *     bucket: examplebucket.id,
 *     source: new pulumi.asset.FileAsset("index.html"),
 *     kmsKeyId: examplekms.arn,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * examplekms = aws.kms.Key("examplekms",
 *     description="KMS key 1",
 *     deletion_window_in_days=7)
 * examplebucket = aws.s3.BucketV2("examplebucket", bucket="examplebuckettftest")
 * example = aws.s3.BucketAclV2("example",
 *     bucket=examplebucket.id,
 *     acl="private")
 * example_bucket_object = aws.s3.BucketObject("example",
 *     key="someobject",
 *     bucket=examplebucket.id,
 *     source=pulumi.FileAsset("index.html"),
 *     kms_key_id=examplekms.arn)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var examplekms = new Aws.Kms.Key("examplekms", new()
 *     {
 *         Description = "KMS key 1",
 *         DeletionWindowInDays = 7,
 *     });
 *     var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
 *     {
 *         Bucket = "examplebuckettftest",
 *     });
 *     var example = new Aws.S3.BucketAclV2("example", new()
 *     {
 *         Bucket = examplebucket.Id,
 *         Acl = "private",
 *     });
 *     var exampleBucketObject = new Aws.S3.BucketObject("example", new()
 *     {
 *         Key = "someobject",
 *         Bucket = examplebucket.Id,
 *         Source = new FileAsset("index.html"),
 *         KmsKeyId = examplekms.Arn,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		examplekms, err := kms.NewKey(ctx, "examplekms", &kms.KeyArgs{
 * 			Description:          pulumi.String("KMS key 1"),
 * 			DeletionWindowInDays: pulumi.Int(7),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
 * 			Bucket: pulumi.String("examplebuckettftest"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
 * 			Bucket: examplebucket.ID(),
 * 			Acl:    pulumi.String("private"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketObject(ctx, "example", &s3.BucketObjectArgs{
 * 			Key:      pulumi.String("someobject"),
 * 			Bucket:   examplebucket.ID(),
 * 			Source:   pulumi.NewFileAsset("index.html"),
 * 			KmsKeyId: examplekms.Arn,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.kms.Key;
 * import com.pulumi.aws.kms.KeyArgs;
 * import com.pulumi.aws.s3.BucketV2;
 * import com.pulumi.aws.s3.BucketV2Args;
 * import com.pulumi.aws.s3.BucketAclV2;
 * import com.pulumi.aws.s3.BucketAclV2Args;
 * import com.pulumi.aws.s3.BucketObject;
 * import com.pulumi.aws.s3.BucketObjectArgs;
 * import com.pulumi.asset.FileAsset;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var examplekms = new Key("examplekms", KeyArgs.builder()
 *             .description("KMS key 1")
 *             .deletionWindowInDays(7)
 *             .build());
 *         var examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
 *             .bucket("examplebuckettftest")
 *             .build());
 *         var example = new BucketAclV2("example", BucketAclV2Args.builder()
 *             .bucket(examplebucket.id())
 *             .acl("private")
 *             .build());
 *         var exampleBucketObject = new BucketObject("exampleBucketObject", BucketObjectArgs.builder()
 *             .key("someobject")
 *             .bucket(examplebucket.id())
 *             .source(new FileAsset("index.html"))
 *             .kmsKeyId(examplekms.arn())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   examplekms:
 *     type: aws:kms:Key
 *     properties:
 *       description: KMS key 1
 *       deletionWindowInDays: 7
 *   examplebucket:
 *     type: aws:s3:BucketV2
 *     properties:
 *       bucket: examplebuckettftest
 *   example:
 *     type: aws:s3:BucketAclV2
 *     properties:
 *       bucket: ${examplebucket.id}
 *       acl: private
 *   exampleBucketObject:
 *     type: aws:s3:BucketObject
 *     name: example
 *     properties:
 *       key: someobject
 *       bucket: ${examplebucket.id}
 *       source:
 *         fn::FileAsset: index.html
 *       kmsKeyId: ${examplekms.arn}
 * ```
 * 
 * ### Server Side Encryption with S3 Default Master Key
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const examplebucket = new aws.s3.BucketV2("examplebucket", {bucket: "examplebuckettftest"});
 * const example = new aws.s3.BucketAclV2("example", {
 *     bucket: examplebucket.id,
 *     acl: "private",
 * });
 * const exampleBucketObject = new aws.s3.BucketObject("example", {
 *     key: "someobject",
 *     bucket: examplebucket.id,
 *     source: new pulumi.asset.FileAsset("index.html"),
 *     serverSideEncryption: "aws:kms",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * examplebucket = aws.s3.BucketV2("examplebucket", bucket="examplebuckettftest")
 * example = aws.s3.BucketAclV2("example",
 *     bucket=examplebucket.id,
 *     acl="private")
 * example_bucket_object = aws.s3.BucketObject("example",
 *     key="someobject",
 *     bucket=examplebucket.id,
 *     source=pulumi.FileAsset("index.html"),
 *     server_side_encryption="aws:kms")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
 *     {
 *         Bucket = "examplebuckettftest",
 *     });
 *     var example = new Aws.S3.BucketAclV2("example", new()
 *     {
 *         Bucket = examplebucket.Id,
 *         Acl = "private",
 *     });
 *     var exampleBucketObject = new Aws.S3.BucketObject("example", new()
 *     {
 *         Key = "someobject",
 *         Bucket = examplebucket.Id,
 *         Source = new FileAsset("index.html"),
 *         ServerSideEncryption = "aws:kms",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
 * 			Bucket: pulumi.String("examplebuckettftest"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
 * 			Bucket: examplebucket.ID(),
 * 			Acl:    pulumi.String("private"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketObject(ctx, "example", &s3.BucketObjectArgs{
 * 			Key:                  pulumi.String("someobject"),
 * 			Bucket:               examplebucket.ID(),
 * 			Source:               pulumi.NewFileAsset("index.html"),
 * 			ServerSideEncryption: pulumi.String("aws:kms"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.s3.BucketV2;
 * import com.pulumi.aws.s3.BucketV2Args;
 * import com.pulumi.aws.s3.BucketAclV2;
 * import com.pulumi.aws.s3.BucketAclV2Args;
 * import com.pulumi.aws.s3.BucketObject;
 * import com.pulumi.aws.s3.BucketObjectArgs;
 * import com.pulumi.asset.FileAsset;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
 *             .bucket("examplebuckettftest")
 *             .build());
 *         var example = new BucketAclV2("example", BucketAclV2Args.builder()
 *             .bucket(examplebucket.id())
 *             .acl("private")
 *             .build());
 *         var exampleBucketObject = new BucketObject("exampleBucketObject", BucketObjectArgs.builder()
 *             .key("someobject")
 *             .bucket(examplebucket.id())
 *             .source(new FileAsset("index.html"))
 *             .serverSideEncryption("aws:kms")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   examplebucket:
 *     type: aws:s3:BucketV2
 *     properties:
 *       bucket: examplebuckettftest
 *   example:
 *     type: aws:s3:BucketAclV2
 *     properties:
 *       bucket: ${examplebucket.id}
 *       acl: private
 *   exampleBucketObject:
 *     type: aws:s3:BucketObject
 *     name: example
 *     properties:
 *       key: someobject
 *       bucket: ${examplebucket.id}
 *       source:
 *         fn::FileAsset: index.html
 *       serverSideEncryption: aws:kms
 * ```
 * 
 * ### Server Side Encryption with AWS-Managed Key
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const examplebucket = new aws.s3.BucketV2("examplebucket", {bucket: "examplebuckettftest"});
 * const example = new aws.s3.BucketAclV2("example", {
 *     bucket: examplebucket.id,
 *     acl: "private",
 * });
 * const exampleBucketObject = new aws.s3.BucketObject("example", {
 *     key: "someobject",
 *     bucket: examplebucket.id,
 *     source: new pulumi.asset.FileAsset("index.html"),
 *     serverSideEncryption: "AES256",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * examplebucket = aws.s3.BucketV2("examplebucket", bucket="examplebuckettftest")
 * example = aws.s3.BucketAclV2("example",
 *     bucket=examplebucket.id,
 *     acl="private")
 * example_bucket_object = aws.s3.BucketObject("example",
 *     key="someobject",
 *     bucket=examplebucket.id,
 *     source=pulumi.FileAsset("index.html"),
 *     server_side_encryption="AES256")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
 *     {
 *         Bucket = "examplebuckettftest",
 *     });
 *     var example = new Aws.S3.BucketAclV2("example", new()
 *     {
 *         Bucket = examplebucket.Id,
 *         Acl = "private",
 *     });
 *     var exampleBucketObject = new Aws.S3.BucketObject("example", new()
 *     {
 *         Key = "someobject",
 *         Bucket = examplebucket.Id,
 *         Source = new FileAsset("index.html"),
 *         ServerSideEncryption = "AES256",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
 * 			Bucket: pulumi.String("examplebuckettftest"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
 * 			Bucket: examplebucket.ID(),
 * 			Acl:    pulumi.String("private"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketObject(ctx, "example", &s3.BucketObjectArgs{
 * 			Key:                  pulumi.String("someobject"),
 * 			Bucket:               examplebucket.ID(),
 * 			Source:               pulumi.NewFileAsset("index.html"),
 * 			ServerSideEncryption: pulumi.String("AES256"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.s3.BucketV2;
 * import com.pulumi.aws.s3.BucketV2Args;
 * import com.pulumi.aws.s3.BucketAclV2;
 * import com.pulumi.aws.s3.BucketAclV2Args;
 * import com.pulumi.aws.s3.BucketObject;
 * import com.pulumi.aws.s3.BucketObjectArgs;
 * import com.pulumi.asset.FileAsset;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
 *             .bucket("examplebuckettftest")
 *             .build());
 *         var example = new BucketAclV2("example", BucketAclV2Args.builder()
 *             .bucket(examplebucket.id())
 *             .acl("private")
 *             .build());
 *         var exampleBucketObject = new BucketObject("exampleBucketObject", BucketObjectArgs.builder()
 *             .key("someobject")
 *             .bucket(examplebucket.id())
 *             .source(new FileAsset("index.html"))
 *             .serverSideEncryption("AES256")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   examplebucket:
 *     type: aws:s3:BucketV2
 *     properties:
 *       bucket: examplebuckettftest
 *   example:
 *     type: aws:s3:BucketAclV2
 *     properties:
 *       bucket: ${examplebucket.id}
 *       acl: private
 *   exampleBucketObject:
 *     type: aws:s3:BucketObject
 *     name: example
 *     properties:
 *       key: someobject
 *       bucket: ${examplebucket.id}
 *       source:
 *         fn::FileAsset: index.html
 *       serverSideEncryption: AES256
 * ```
 * 
 * ### S3 Object Lock
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const examplebucket = new aws.s3.BucketV2("examplebucket", {
 *     bucket: "examplebuckettftest",
 *     objectLockEnabled: true,
 * });
 * const example = new aws.s3.BucketAclV2("example", {
 *     bucket: examplebucket.id,
 *     acl: "private",
 * });
 * const exampleBucketVersioningV2 = new aws.s3.BucketVersioningV2("example", {
 *     bucket: examplebucket.id,
 *     versioningConfiguration: {
 *         status: "Enabled",
 *     },
 * });
 * const exampleBucketObject = new aws.s3.BucketObject("example", {
 *     key: "someobject",
 *     bucket: examplebucket.id,
 *     source: new pulumi.asset.FileAsset("important.txt"),
 *     objectLockLegalHoldStatus: "ON",
 *     objectLockMode: "GOVERNANCE",
 *     objectLockRetainUntilDate: "2021-12-31T23:59:60Z",
 *     forceDestroy: true,
 * }, {
 *     dependsOn: [exampleBucketVersioningV2],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * examplebucket = aws.s3.BucketV2("examplebucket",
 *     bucket="examplebuckettftest",
 *     object_lock_enabled=True)
 * example = aws.s3.BucketAclV2("example",
 *     bucket=examplebucket.id,
 *     acl="private")
 * example_bucket_versioning_v2 = aws.s3.BucketVersioningV2("example",
 *     bucket=examplebucket.id,
 *     versioning_configuration={
 *         "status": "Enabled",
 *     })
 * example_bucket_object = aws.s3.BucketObject("example",
 *     key="someobject",
 *     bucket=examplebucket.id,
 *     source=pulumi.FileAsset("important.txt"),
 *     object_lock_legal_hold_status="ON",
 *     object_lock_mode="GOVERNANCE",
 *     object_lock_retain_until_date="2021-12-31T23:59:60Z",
 *     force_destroy=True,
 *     opts = pulumi.ResourceOptions(depends_on=[example_bucket_versioning_v2]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
 *     {
 *         Bucket = "examplebuckettftest",
 *         ObjectLockEnabled = true,
 *     });
 *     var example = new Aws.S3.BucketAclV2("example", new()
 *     {
 *         Bucket = examplebucket.Id,
 *         Acl = "private",
 *     });
 *     var exampleBucketVersioningV2 = new Aws.S3.BucketVersioningV2("example", new()
 *     {
 *         Bucket = examplebucket.Id,
 *         VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs
 *         {
 *             Status = "Enabled",
 *         },
 *     });
 *     var exampleBucketObject = new Aws.S3.BucketObject("example", new()
 *     {
 *         Key = "someobject",
 *         Bucket = examplebucket.Id,
 *         Source = new FileAsset("important.txt"),
 *         ObjectLockLegalHoldStatus = "ON",
 *         ObjectLockMode = "GOVERNANCE",
 *         ObjectLockRetainUntilDate = "2021-12-31T23:59:60Z",
 *         ForceDestroy = true,
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             exampleBucketVersioningV2,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
 * 			Bucket:            pulumi.String("examplebuckettftest"),
 * 			ObjectLockEnabled: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
 * 			Bucket: examplebucket.ID(),
 * 			Acl:    pulumi.String("private"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleBucketVersioningV2, err := s3.NewBucketVersioningV2(ctx, "example", &s3.BucketVersioningV2Args{
 * 			Bucket: examplebucket.ID(),
 * 			VersioningConfiguration: &s3.BucketVersioningV2VersioningConfigurationArgs{
 * 				Status: pulumi.String("Enabled"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = s3.NewBucketObject(ctx, "example", &s3.BucketObjectArgs{
 * 			Key:                       pulumi.String("someobject"),
 * 			Bucket:                    examplebucket.ID(),
 * 			Source:                    pulumi.NewFileAsset("important.txt"),
 * 			ObjectLockLegalHoldStatus: pulumi.String("ON"),
 * 			ObjectLockMode:            pulumi.String("GOVERNANCE"),
 * 			ObjectLockRetainUntilDate: pulumi.String("2021-12-31T23:59:60Z"),
 * 			ForceDestroy:              pulumi.Bool(true),
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			exampleBucketVersioningV2,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.s3.BucketV2;
 * import com.pulumi.aws.s3.BucketV2Args;
 * import com.pulumi.aws.s3.BucketAclV2;
 * import com.pulumi.aws.s3.BucketAclV2Args;
 * import com.pulumi.aws.s3.BucketVersioningV2;
 * import com.pulumi.aws.s3.BucketVersioningV2Args;
 * import com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;
 * import com.pulumi.aws.s3.BucketObject;
 * import com.pulumi.aws.s3.BucketObjectArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import com.pulumi.asset.FileAsset;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
 *             .bucket("examplebuckettftest")
 *             .objectLockEnabled(true)
 *             .build());
 *         var example = new BucketAclV2("example", BucketAclV2Args.builder()
 *             .bucket(examplebucket.id())
 *             .acl("private")
 *             .build());
 *         var exampleBucketVersioningV2 = new BucketVersioningV2("exampleBucketVersioningV2", BucketVersioningV2Args.builder()
 *             .bucket(examplebucket.id())
 *             .versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()
 *                 .status("Enabled")
 *                 .build())
 *             .build());
 *         var exampleBucketObject = new BucketObject("exampleBucketObject", BucketObjectArgs.builder()
 *             .key("someobject")
 *             .bucket(examplebucket.id())
 *             .source(new FileAsset("important.txt"))
 *             .objectLockLegalHoldStatus("ON")
 *             .objectLockMode("GOVERNANCE")
 *             .objectLockRetainUntilDate("2021-12-31T23:59:60Z")
 *             .forceDestroy(true)
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(exampleBucketVersioningV2)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   examplebucket:
 *     type: aws:s3:BucketV2
 *     properties:
 *       bucket: examplebuckettftest
 *       objectLockEnabled: true
 *   example:
 *     type: aws:s3:BucketAclV2
 *     properties:
 *       bucket: ${examplebucket.id}
 *       acl: private
 *   exampleBucketVersioningV2:
 *     type: aws:s3:BucketVersioningV2
 *     name: example
 *     properties:
 *       bucket: ${examplebucket.id}
 *       versioningConfiguration:
 *         status: Enabled
 *   exampleBucketObject:
 *     type: aws:s3:BucketObject
 *     name: example
 *     properties:
 *       key: someobject
 *       bucket: ${examplebucket.id}
 *       source:
 *         fn::FileAsset: important.txt
 *       objectLockLegalHoldStatus: ON
 *       objectLockMode: GOVERNANCE
 *       objectLockRetainUntilDate: 2021-12-31T23:59:60Z
 *       forceDestroy: true
 *     options:
 *       dependson:
 *         - ${exampleBucketVersioningV2}
 * ```
 * 
 * ## Import
 * Import using S3 URL syntax:
 * __Using `pulumi import` to import__ objects using the `id` or S3 URL. For example:
 * Import using the `id`, which is the bucket name and the key together:
 * ```sh
 * $ pulumi import aws:s3/bucketObject:BucketObject example some-bucket-name/some/key.txt
 * ```
 * Import using S3 URL syntax:
 * ```sh
 * $ pulumi import aws:s3/bucketObject:BucketObject example s3://some-bucket-name/some/key.txt
 * ```
 * @property acl [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`.
 * @property bucket 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.
 * @property bucketKeyEnabled Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS.
 * @property cacheControl Caching behavior along the request/reply chain Read [w3c cache_control](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
 * @property content Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
 * @property contentBase64 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.
 * @property contentDisposition Presentational information for the object. Read [w3c content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
 * @property contentEncoding 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.
 * @property contentLanguage Language the content is in e.g., en-US or en-GB.
 * @property contentType Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
 * @property etag Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kms_key_id` or `server_side_encryption = "aws:kms"` (see `source_hash` instead).
 * @property forceDestroy 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.
 * @property key Name of the object once it is in the bucket.
 * The following arguments are optional:
 * @property kmsKeyId 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 `aws.kms.Key` resource, use the `arn` attribute. If referencing the `aws.kms.Alias` data source or resource, use the `target_key_arn` attribute. The provider will only perform drift detection if a configuration value is provided.
 * @property metadata 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).
 * @property objectLockLegalHoldStatus [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`.
 * @property objectLockMode 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`.
 * @property objectLockRetainUntilDate 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).
 * @property serverSideEncryption Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`".
 * @property source Path to a file that will be read and uploaded as raw bytes for the object content.
 * @property sourceHash Triggers updates like `etag` but useful to address `etag` encryption limitations.
 * @property storageClass [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`".
 * @property tags Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property websiteRedirect Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
 * If no content is provided through `source`, `content` or `content_base64`, then the object will be empty.
 */
public data class BucketObjectArgs(
    public val acl: Output? = null,
    public val bucket: Output? = null,
    public val bucketKeyEnabled: Output? = null,
    public val cacheControl: Output? = null,
    public val content: Output? = null,
    public val contentBase64: Output? = null,
    public val contentDisposition: Output? = null,
    public val contentEncoding: Output? = null,
    public val contentLanguage: Output? = null,
    public val contentType: Output? = null,
    public val etag: Output? = null,
    public val forceDestroy: Output? = null,
    public val key: Output? = null,
    public val kmsKeyId: Output? = null,
    public val metadata: Output>? = null,
    public val objectLockLegalHoldStatus: Output? = null,
    public val objectLockMode: Output? = null,
    public val objectLockRetainUntilDate: Output? = null,
    public val serverSideEncryption: Output? = null,
    public val source: Output? = null,
    public val sourceHash: Output? = null,
    public val storageClass: Output? = null,
    public val tags: Output>? = null,
    public val websiteRedirect: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.s3.BucketObjectArgs =
        com.pulumi.aws.s3.BucketObjectArgs.builder()
            .acl(acl?.applyValue({ args0 -> args0 }))
            .bucket(bucket?.applyValue({ args0 -> args0 }))
            .bucketKeyEnabled(bucketKeyEnabled?.applyValue({ args0 -> args0 }))
            .cacheControl(cacheControl?.applyValue({ args0 -> args0 }))
            .content(content?.applyValue({ args0 -> args0 }))
            .contentBase64(contentBase64?.applyValue({ args0 -> args0 }))
            .contentDisposition(contentDisposition?.applyValue({ args0 -> args0 }))
            .contentEncoding(contentEncoding?.applyValue({ args0 -> args0 }))
            .contentLanguage(contentLanguage?.applyValue({ args0 -> args0 }))
            .contentType(contentType?.applyValue({ args0 -> args0 }))
            .etag(etag?.applyValue({ args0 -> args0 }))
            .forceDestroy(forceDestroy?.applyValue({ args0 -> args0 }))
            .key(key?.applyValue({ args0 -> args0 }))
            .kmsKeyId(kmsKeyId?.applyValue({ args0 -> args0 }))
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .objectLockLegalHoldStatus(objectLockLegalHoldStatus?.applyValue({ args0 -> args0 }))
            .objectLockMode(objectLockMode?.applyValue({ args0 -> args0 }))
            .objectLockRetainUntilDate(objectLockRetainUntilDate?.applyValue({ args0 -> args0 }))
            .serverSideEncryption(serverSideEncryption?.applyValue({ args0 -> args0 }))
            .source(source?.applyValue({ args0 -> args0 }))
            .sourceHash(sourceHash?.applyValue({ args0 -> args0 }))
            .storageClass(storageClass?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .websiteRedirect(websiteRedirect?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BucketObjectArgs].
 */
@PulumiTagMarker
public class BucketObjectArgsBuilder internal constructor() {
    private var acl: Output? = null

    private var bucket: Output? = null

    private var bucketKeyEnabled: Output? = null

    private var cacheControl: Output? = null

    private var content: Output? = null

    private var contentBase64: Output? = null

    private var contentDisposition: Output? = null

    private var contentEncoding: Output? = null

    private var contentLanguage: Output? = null

    private var contentType: Output? = null

    private var etag: Output? = null

    private var forceDestroy: Output? = null

    private var key: Output? = null

    private var kmsKeyId: Output? = null

    private var metadata: Output>? = null

    private var objectLockLegalHoldStatus: Output? = null

    private var objectLockMode: Output? = null

    private var objectLockRetainUntilDate: Output? = null

    private var serverSideEncryption: Output? = null

    private var source: Output? = null

    private var sourceHash: Output? = null

    private var storageClass: Output? = null

    private var tags: Output>? = null

    private var websiteRedirect: Output? = null

    /**
     * @param value [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`.
     */
    @JvmName("rppwslpsfklaanod")
    public suspend fun acl(`value`: Output) {
        this.acl = value
    }

    /**
     * @param value 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.
     */
    @JvmName("jrhwgushkiaisckt")
    public suspend fun bucket(`value`: Output) {
        this.bucket = value
    }

    /**
     * @param value Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS.
     */
    @JvmName("intchhbyyctkhpsl")
    public suspend fun bucketKeyEnabled(`value`: Output) {
        this.bucketKeyEnabled = value
    }

    /**
     * @param value Caching behavior along the request/reply chain Read [w3c cache_control](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
     */
    @JvmName("ngoqfqvybqbwived")
    public suspend fun cacheControl(`value`: Output) {
        this.cacheControl = value
    }

    /**
     * @param value Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
     */
    @JvmName("vdvtblakbicshhgo")
    public suspend fun content(`value`: Output) {
        this.content = value
    }

    /**
     * @param value 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.
     */
    @JvmName("syouxlvsklqxclrh")
    public suspend fun contentBase64(`value`: Output) {
        this.contentBase64 = value
    }

    /**
     * @param value Presentational information for the object. Read [w3c content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
     */
    @JvmName("dnvudmvsivtqkfmk")
    public suspend fun contentDisposition(`value`: Output) {
        this.contentDisposition = value
    }

    /**
     * @param value 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.
     */
    @JvmName("vefltvvpsavdyadd")
    public suspend fun contentEncoding(`value`: Output) {
        this.contentEncoding = value
    }

    /**
     * @param value Language the content is in e.g., en-US or en-GB.
     */
    @JvmName("snbvxkbpunuhvfbm")
    public suspend fun contentLanguage(`value`: Output) {
        this.contentLanguage = value
    }

    /**
     * @param value Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
     */
    @JvmName("wrkdfsuatyqolcyn")
    public suspend fun contentType(`value`: Output) {
        this.contentType = value
    }

    /**
     * @param value Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kms_key_id` or `server_side_encryption = "aws:kms"` (see `source_hash` instead).
     */
    @JvmName("ghfxoihmssxthkvw")
    public suspend fun etag(`value`: Output) {
        this.etag = value
    }

    /**
     * @param value 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.
     */
    @JvmName("clrahogvkddwlrvh")
    public suspend fun forceDestroy(`value`: Output) {
        this.forceDestroy = value
    }

    /**
     * @param value Name of the object once it is in the bucket.
     * The following arguments are optional:
     */
    @JvmName("hnysicaikfyfhmfn")
    public suspend fun key(`value`: Output) {
        this.key = value
    }

    /**
     * @param value 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 `aws.kms.Key` resource, use the `arn` attribute. If referencing the `aws.kms.Alias` data source or resource, use the `target_key_arn` attribute. The provider will only perform drift detection if a configuration value is provided.
     */
    @JvmName("njagahnwaqtlkbva")
    public suspend fun kmsKeyId(`value`: Output) {
        this.kmsKeyId = value
    }

    /**
     * @param value 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).
     */
    @JvmName("wvexnohlykdxfgmm")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value [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`.
     */
    @JvmName("xdjfscpgjgdcrgcs")
    public suspend fun objectLockLegalHoldStatus(`value`: Output) {
        this.objectLockLegalHoldStatus = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("bjwaaqmscccujfjd")
    public suspend fun objectLockMode(`value`: Output) {
        this.objectLockMode = value
    }

    /**
     * @param value 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).
     */
    @JvmName("cfhynmmpvkasxabu")
    public suspend fun objectLockRetainUntilDate(`value`: Output) {
        this.objectLockRetainUntilDate = value
    }

    /**
     * @param value Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`".
     */
    @JvmName("ijlsasffcouwlbar")
    public suspend fun serverSideEncryption(`value`: Output) {
        this.serverSideEncryption = value
    }

    /**
     * @param value Path to a file that will be read and uploaded as raw bytes for the object content.
     */
    @JvmName("xiyghlwnelapruew")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value Triggers updates like `etag` but useful to address `etag` encryption limitations.
     */
    @JvmName("owngsfgqirtvcgmn")
    public suspend fun sourceHash(`value`: Output) {
        this.sourceHash = value
    }

    /**
     * @param value [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`".
     */
    @JvmName("sepqxkrhcpdslifq")
    public suspend fun storageClass(`value`: Output) {
        this.storageClass = value
    }

    /**
     * @param value Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("kcdcruabneluhcom")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
     * If no content is provided through `source`, `content` or `content_base64`, then the object will be empty.
     */
    @JvmName("rxtpncavfyjgafea")
    public suspend fun websiteRedirect(`value`: Output) {
        this.websiteRedirect = value
    }

    /**
     * @param value [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`.
     */
    @JvmName("oyhkksoiutqhrnay")
    public suspend fun acl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.acl = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("ynscrdchtojauisi")
    public suspend fun bucket(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bucket = mapped
    }

    /**
     * @param value Whether or not to use [Amazon S3 Bucket Keys](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) for SSE-KMS.
     */
    @JvmName("ngbgcqemoapcngii")
    public suspend fun bucketKeyEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bucketKeyEnabled = mapped
    }

    /**
     * @param value Caching behavior along the request/reply chain Read [w3c cache_control](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
     */
    @JvmName("amqdtqukuefofrfc")
    public suspend fun cacheControl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cacheControl = mapped
    }

    /**
     * @param value Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
     */
    @JvmName("lqhaxjttotassicn")
    public suspend fun content(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.content = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("istrvbddvyrcjtgs")
    public suspend fun contentBase64(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentBase64 = mapped
    }

    /**
     * @param value Presentational information for the object. Read [w3c content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
     */
    @JvmName("hahejomolyanrbap")
    public suspend fun contentDisposition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentDisposition = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("kdjesvtpbsxydbcf")
    public suspend fun contentEncoding(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentEncoding = mapped
    }

    /**
     * @param value Language the content is in e.g., en-US or en-GB.
     */
    @JvmName("pevuhcnmssbupmbs")
    public suspend fun contentLanguage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentLanguage = mapped
    }

    /**
     * @param value Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
     */
    @JvmName("wfhexbcsvsonnscn")
    public suspend fun contentType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentType = mapped
    }

    /**
     * @param value Triggers updates when the value changes. This attribute is not compatible with KMS encryption, `kms_key_id` or `server_side_encryption = "aws:kms"` (see `source_hash` instead).
     */
    @JvmName("iftjchvnctygvjsw")
    public suspend fun etag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.etag = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("jxcrvypkcvygywwc")
    public suspend fun forceDestroy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceDestroy = mapped
    }

    /**
     * @param value Name of the object once it is in the bucket.
     * The following arguments are optional:
     */
    @JvmName("ocrlxmigcqokopqf")
    public suspend fun key(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.key = mapped
    }

    /**
     * @param value 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 `aws.kms.Key` resource, use the `arn` attribute. If referencing the `aws.kms.Alias` data source or resource, use the `target_key_arn` attribute. The provider will only perform drift detection if a configuration value is provided.
     */
    @JvmName("surfwcsxmdqftgqt")
    public suspend fun kmsKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyId = mapped
    }

    /**
     * @param value 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).
     */
    @JvmName("lxckusxacvvvnmfu")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values 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).
     */
    @JvmName("clmwitqxgspbpcdc")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value [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`.
     */
    @JvmName("duhmulllumsungxf")
    public suspend fun objectLockLegalHoldStatus(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectLockLegalHoldStatus = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("onqbdhbkjvbagdwn")
    public suspend fun objectLockMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectLockMode = mapped
    }

    /**
     * @param value 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).
     */
    @JvmName("chmpakgohbgeyvom")
    public suspend fun objectLockRetainUntilDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectLockRetainUntilDate = mapped
    }

    /**
     * @param value Server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`".
     */
    @JvmName("dqarahqgrnuhhhnf")
    public suspend fun serverSideEncryption(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serverSideEncryption = mapped
    }

    /**
     * @param value Path to a file that will be read and uploaded as raw bytes for the object content.
     */
    @JvmName("wjtwguvraiivycaw")
    public suspend fun source(`value`: AssetOrArchive?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param value Triggers updates like `etag` but useful to address `etag` encryption limitations.
     */
    @JvmName("lixyvfbpfmvmkfre")
    public suspend fun sourceHash(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceHash = mapped
    }

    /**
     * @param value [Storage Class](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#AmazonS3-PutObject-request-header-StorageClass) for the object. Defaults to "`STANDARD`".
     */
    @JvmName("uaeytpnfnurmihah")
    public suspend fun storageClass(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageClass = mapped
    }

    /**
     * @param value Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("ijnlgqytoeqrfxrg")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("ikabnolygwdtequh")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
     * If no content is provided through `source`, `content` or `content_base64`, then the object will be empty.
     */
    @JvmName("hxdqffkgjtntxvdb")
    public suspend fun websiteRedirect(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.websiteRedirect = mapped
    }

    internal fun build(): BucketObjectArgs = BucketObjectArgs(
        acl = acl,
        bucket = bucket,
        bucketKeyEnabled = bucketKeyEnabled,
        cacheControl = cacheControl,
        content = content,
        contentBase64 = contentBase64,
        contentDisposition = contentDisposition,
        contentEncoding = contentEncoding,
        contentLanguage = contentLanguage,
        contentType = contentType,
        etag = etag,
        forceDestroy = forceDestroy,
        key = key,
        kmsKeyId = kmsKeyId,
        metadata = metadata,
        objectLockLegalHoldStatus = objectLockLegalHoldStatus,
        objectLockMode = objectLockMode,
        objectLockRetainUntilDate = objectLockRetainUntilDate,
        serverSideEncryption = serverSideEncryption,
        source = source,
        sourceHash = sourceHash,
        storageClass = storageClass,
        tags = tags,
        websiteRedirect = websiteRedirect,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy