Package com.pulumi.aws.s3
Class BucketRequestPaymentConfiguration
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.s3.BucketRequestPaymentConfiguration
-
public class BucketRequestPaymentConfiguration extends com.pulumi.resources.CustomResourceProvides an S3 bucket request payment configuration resource. For more information, see [Requester Pays Buckets](https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html). > **NOTE:** Destroying an `aws.s3.BucketRequestPaymentConfiguration` resource resets the bucket's `payer` to the S3 default: the bucket owner. > This resource cannot be used with S3 directory buckets. ## Example Usage
## Import If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expectedBucketOwner` separated by a comma (`,`): **Using `pulumi import` to import** S3 bucket request payment configuration using the `bucket` or using the `bucket` and `expectedBucketOwner` separated by a comma (`,`). For example: If the owner (account ID) of the source bucket is the same account used to configure the AWS Provider, import using the `bucket`: ```sh $ pulumi import aws:s3/bucketRequestPaymentConfiguration:BucketRequestPaymentConfiguration example bucket-name ``` If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expectedBucketOwner` separated by a comma (`,`): ```sh $ pulumi import aws:s3/bucketRequestPaymentConfiguration:BucketRequestPaymentConfiguration example bucket-name,123456789012 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.s3.BucketRequestPaymentConfiguration; import com.pulumi.aws.s3.BucketRequestPaymentConfigurationArgs; import java.util.ArrayList; import java.util.Arrays; 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 BucketRequestPaymentConfiguration("example", BucketRequestPaymentConfigurationArgs.builder() .bucket(exampleAwsS3Bucket.id()) .payer("Requester") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description BucketRequestPaymentConfiguration(java.lang.String name)BucketRequestPaymentConfiguration(java.lang.String name, BucketRequestPaymentConfigurationArgs args)BucketRequestPaymentConfiguration(java.lang.String name, BucketRequestPaymentConfigurationArgs 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()com.pulumi.core.Output<java.util.Optional<java.lang.String>>expectedBucketOwner()static BucketRequestPaymentConfigurationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, BucketRequestPaymentConfigurationState 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<java.lang.String>payer()com.pulumi.core.Output<java.lang.String>region()
-
-
-
Constructor Detail
-
BucketRequestPaymentConfiguration
public BucketRequestPaymentConfiguration(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
BucketRequestPaymentConfiguration
public BucketRequestPaymentConfiguration(java.lang.String name, BucketRequestPaymentConfigurationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
BucketRequestPaymentConfiguration
public BucketRequestPaymentConfiguration(java.lang.String name, BucketRequestPaymentConfigurationArgs 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.
-
expectedBucketOwner
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> expectedBucketOwner()
- Returns:
- Account ID of the expected bucket owner.
-
payer
public com.pulumi.core.Output<java.lang.String> payer()
- Returns:
- Who pays for the download and request fees. Valid values: `BucketOwner`, `Requester`.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
get
public static BucketRequestPaymentConfiguration get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable BucketRequestPaymentConfigurationState 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.
-
-