Package com.pulumi.aws.s3
Class BucketOwnershipControls
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.s3.BucketOwnershipControls
-
public class BucketOwnershipControls extends com.pulumi.resources.CustomResource
Provides a resource to manage S3 Bucket Ownership Controls. For more information, see the [S3 Developer Guide](https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html). > This resource cannot be used with S3 directory buckets. ## Example Usage <!--Start PulumiCodeChooser -->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.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 example = new BucketV2("example", BucketV2Args.builder() .bucket("example") .build()); var exampleBucketOwnershipControls = new BucketOwnershipControls("exampleBucketOwnershipControls", BucketOwnershipControlsArgs.builder() .bucket(example.id()) .rule(BucketOwnershipControlsRuleArgs.builder() .objectOwnership("BucketOwnerPreferred") .build()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description BucketOwnershipControls(java.lang.String name)
BucketOwnershipControls(java.lang.String name, BucketOwnershipControlsArgs args)
BucketOwnershipControls(java.lang.String name, BucketOwnershipControlsArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
bucket()
static BucketOwnershipControls
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, BucketOwnershipControlsState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<BucketOwnershipControlsRule>
rule()
-
-
-
Constructor Detail
-
BucketOwnershipControls
public BucketOwnershipControls(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
BucketOwnershipControls
public BucketOwnershipControls(java.lang.String name, BucketOwnershipControlsArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
BucketOwnershipControls
public BucketOwnershipControls(java.lang.String name, BucketOwnershipControlsArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
bucket
public com.pulumi.core.Output<java.lang.String> bucket()
- Returns:
- Name of the bucket that you want to associate this access point with.
-
rule
public com.pulumi.core.Output<BucketOwnershipControlsRule> rule()
- Returns:
- Configuration block(s) with Ownership Controls rules. Detailed below.
-
get
public static BucketOwnershipControls get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable BucketOwnershipControlsState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-