putBucketRequestPayment

This operation is not supported for directory buckets.

Sets the request payment configuration for a bucket. By default, the bucket owner pays for downloads from the bucket. This configuration parameter enables the bucket owner (only) to specify that the person requesting the download will be charged for the download. For more information, see Requester Pays Buckets.

The following operations are related to PutBucketRequestPayment:

You must URL encode any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.

Samples

import aws.sdk.kotlin.services.s3.model.Payer
import aws.sdk.kotlin.services.s3.model.RequestPaymentConfiguration

fun main() { 
   //sampleStart 
   // The following example sets request payment configuration on a bucket so that person requesting the
// download is charged.
s3Client.putBucketRequestPayment {
    bucket = "examplebucket"
    requestPaymentConfiguration = RequestPaymentConfiguration {
        payer = Payer.fromValue("Requester")
    }
} 
   //sampleEnd
}