aws logo
AWS Classic v5.33.0, Mar 24 23

aws.s3.BucketRequestPaymentConfigurationV2

Provides an S3 bucket request payment configuration resource. For more information, see Requester Pays Buckets.

NOTE: Destroying an aws.s3.BucketRequestPaymentConfigurationV2 resource resets the bucket’s payer to the S3 default: the bucket owner.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.S3.BucketRequestPaymentConfigurationV2("example", new()
    {
        Bucket = aws_s3_bucket.Example.Id,
        Payer = "Requester",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/s3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := s3.NewBucketRequestPaymentConfigurationV2(ctx, "example", &s3.BucketRequestPaymentConfigurationV2Args{
			Bucket: pulumi.Any(aws_s3_bucket.Example.Id),
			Payer:  pulumi.String("Requester"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketRequestPaymentConfigurationV2;
import com.pulumi.aws.s3.BucketRequestPaymentConfigurationV2Args;
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 BucketRequestPaymentConfigurationV2("example", BucketRequestPaymentConfigurationV2Args.builder()        
            .bucket(aws_s3_bucket.example().id())
            .payer("Requester")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.s3.BucketRequestPaymentConfigurationV2("example",
    bucket=aws_s3_bucket["example"]["id"],
    payer="Requester")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.s3.BucketRequestPaymentConfigurationV2("example", {
    bucket: aws_s3_bucket.example.id,
    payer: "Requester",
});
resources:
  example:
    type: aws:s3:BucketRequestPaymentConfigurationV2
    properties:
      bucket: ${aws_s3_bucket.example.id}
      payer: Requester

Create BucketRequestPaymentConfigurationV2 Resource

new BucketRequestPaymentConfigurationV2(name: string, args: BucketRequestPaymentConfigurationV2Args, opts?: CustomResourceOptions);
@overload
def BucketRequestPaymentConfigurationV2(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        bucket: Optional[str] = None,
                                        expected_bucket_owner: Optional[str] = None,
                                        payer: Optional[str] = None)
@overload
def BucketRequestPaymentConfigurationV2(resource_name: str,
                                        args: BucketRequestPaymentConfigurationV2Args,
                                        opts: Optional[ResourceOptions] = None)
func NewBucketRequestPaymentConfigurationV2(ctx *Context, name string, args BucketRequestPaymentConfigurationV2Args, opts ...ResourceOption) (*BucketRequestPaymentConfigurationV2, error)
public BucketRequestPaymentConfigurationV2(string name, BucketRequestPaymentConfigurationV2Args args, CustomResourceOptions? opts = null)
public BucketRequestPaymentConfigurationV2(String name, BucketRequestPaymentConfigurationV2Args args)
public BucketRequestPaymentConfigurationV2(String name, BucketRequestPaymentConfigurationV2Args args, CustomResourceOptions options)
type: aws:s3:BucketRequestPaymentConfigurationV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BucketRequestPaymentConfigurationV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args BucketRequestPaymentConfigurationV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BucketRequestPaymentConfigurationV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BucketRequestPaymentConfigurationV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BucketRequestPaymentConfigurationV2Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BucketRequestPaymentConfigurationV2 Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The BucketRequestPaymentConfigurationV2 resource accepts the following input properties:

Bucket string

Name of the bucket.

Payer string

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

ExpectedBucketOwner string

Account ID of the expected bucket owner.

Bucket string

Name of the bucket.

Payer string

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

ExpectedBucketOwner string

Account ID of the expected bucket owner.

bucket String

Name of the bucket.

payer String

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

expectedBucketOwner String

Account ID of the expected bucket owner.

bucket string

Name of the bucket.

payer string

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

expectedBucketOwner string

Account ID of the expected bucket owner.

bucket str

Name of the bucket.

payer str

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

expected_bucket_owner str

Account ID of the expected bucket owner.

bucket String

Name of the bucket.

payer String

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

expectedBucketOwner String

Account ID of the expected bucket owner.

Outputs

All input properties are implicitly available as output properties. Additionally, the BucketRequestPaymentConfigurationV2 resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing BucketRequestPaymentConfigurationV2 Resource

Get an existing BucketRequestPaymentConfigurationV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BucketRequestPaymentConfigurationV2State, opts?: CustomResourceOptions): BucketRequestPaymentConfigurationV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bucket: Optional[str] = None,
        expected_bucket_owner: Optional[str] = None,
        payer: Optional[str] = None) -> BucketRequestPaymentConfigurationV2
func GetBucketRequestPaymentConfigurationV2(ctx *Context, name string, id IDInput, state *BucketRequestPaymentConfigurationV2State, opts ...ResourceOption) (*BucketRequestPaymentConfigurationV2, error)
public static BucketRequestPaymentConfigurationV2 Get(string name, Input<string> id, BucketRequestPaymentConfigurationV2State? state, CustomResourceOptions? opts = null)
public static BucketRequestPaymentConfigurationV2 get(String name, Output<String> id, BucketRequestPaymentConfigurationV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Bucket string

Name of the bucket.

ExpectedBucketOwner string

Account ID of the expected bucket owner.

Payer string

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

Bucket string

Name of the bucket.

ExpectedBucketOwner string

Account ID of the expected bucket owner.

Payer string

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

bucket String

Name of the bucket.

expectedBucketOwner String

Account ID of the expected bucket owner.

payer String

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

bucket string

Name of the bucket.

expectedBucketOwner string

Account ID of the expected bucket owner.

payer string

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

bucket str

Name of the bucket.

expected_bucket_owner str

Account ID of the expected bucket owner.

payer str

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

bucket String

Name of the bucket.

expectedBucketOwner String

Account ID of the expected bucket owner.

payer String

Specifies who pays for the download and request fees. Valid values: BucketOwner, Requester.

Import

S3 bucket request payment configuration can be imported in one of two ways. If the owner (account ID) of the source bucket is the same account used to configure the AWS Provider, the S3 bucket request payment configuration resource should be imported using the bucket e.g.,

 $ pulumi import aws:s3/bucketRequestPaymentConfigurationV2:BucketRequestPaymentConfigurationV2 example bucket-name

If the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, the S3 bucket request payment configuration resource should be imported using the bucket and expected_bucket_owner separated by a comma (,) e.g.,

 $ pulumi import aws:s3/bucketRequestPaymentConfigurationV2:BucketRequestPaymentConfigurationV2 example bucket-name,123456789012

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.