BucketOwnershipControlsArgs

data class BucketOwnershipControlsArgs(val bucket: Output<String>? = null, val rule: Output<BucketOwnershipControlsRuleArgs>? = null) : ConvertibleToJava<BucketOwnershipControlsArgs>

Provides a resource to manage S3 Bucket Ownership Controls. For more information, see the S3 Developer Guide.

Example Usage

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.BucketOwnershipControls;
import com.pulumi.aws.s3.BucketOwnershipControlsArgs;
import com.pulumi.aws.s3.inputs.BucketOwnershipControlsRuleArgs;
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 exampleBucketV2 = new BucketV2("exampleBucketV2");
var exampleBucketOwnershipControls = new BucketOwnershipControls("exampleBucketOwnershipControls", BucketOwnershipControlsArgs.builder()
.bucket(exampleBucketV2.id())
.rule(BucketOwnershipControlsRuleArgs.builder()
.objectOwnership("BucketOwnerPreferred")
.build())
.build());
}
}

Import

S3 Bucket Ownership Controls can be imported using S3 Bucket name, e.g.,

$ pulumi import aws:s3/bucketOwnershipControls:BucketOwnershipControls example my-bucket

Constructors

Link copied to clipboard
fun BucketOwnershipControlsArgs(bucket: Output<String>? = null, rule: Output<BucketOwnershipControlsRuleArgs>? = null)

Functions

Link copied to clipboard
open override fun toJava(): BucketOwnershipControlsArgs

Properties

Link copied to clipboard
val bucket: Output<String>? = null

Name of the bucket that you want to associate this access point with.

Link copied to clipboard

Configuration block(s) with Ownership Controls rules. Detailed below.