pulumi_wasm_providers_aws_mini::s3

Module bucket_ownership_controls

source
Expand description

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

This resource cannot be used with S3 directory buckets.

§Example Usage

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let example = bucket_v_2::create(
        "example",
        BucketV2Args::builder().bucket("example").build_struct(),
    );
    let exampleBucketOwnershipControls = bucket_ownership_controls::create(
        "exampleBucketOwnershipControls",
        BucketOwnershipControlsArgs::builder()
            .bucket("${example.id}")
            .rule(
                BucketOwnershipControlsRule::builder()
                    .objectOwnership("BucketOwnerPreferred")
                    .build_struct(),
            )
            .build_struct(),
    );
}

§Import

Using pulumi import, import S3 Bucket Ownership Controls using S3 Bucket name. For example:

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

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments