putBucketRequestPayment
inline suspend fun S3Client.putBucketRequestPayment(crossinline block: PutBucketRequestPaymentRequest.Builder.() -> Unit): PutBucketRequestPaymentResponse
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
:
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
}