PUT Bucket requestPayment
Description
This implementation of the PUT
operation uses the requestPayment
sub-resource to set the request payment configuration of
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
Requests
Syntax
PUT ?requestPayment HTTP/1.1 Host:BucketName
.s3.amazonaws.com Content-Length:length
Date:date
Authorization:signatureValue
<RequestPaymentConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Payer>payer
</Payer> </RequestPaymentConfiguration>
Request Parameters
This implementation of the operation does not use request parameters.
Request Headers
This implementation of the operation only uses request headers common to all operations. For more information, see Common Request Headers.
Request Elements
Name | Description |
---|---|
Payer
|
Specifies who pays for the download and request fees. Type: Enum Valid Values: Requester | BucketOwner Ancestor: RequestPaymentConfiguration |
RequestPaymentConfiguration
|
Container for Type: Container |
Responses
Response Headers
This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.
Response Elements
This implementation of the operation does not return response elements.
Special Errors
This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.
Examples
Sample Request
This request creates a Requester Pays bucket named "colorpictures."
PUT ?requestPayment HTTP/1.1 Host: colorpictures.s3.amazonaws.com Content-Length: 173 Date: Wed, 01 Mar 2009 12:00:00 GMT Authorization: AWS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE= <RequestPaymentConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Payer>Requster</Payer> </RequestPaymentConfiguration>
Sample Response
HTTP/1.1 200 OK x-amz-id-2: YgIPIfBiKa2bj0KMg95r/0zo3emzU4dzsD4rcKCHQUAdQkf3ShJTOOpXUueF6QKo x-amz-request-id: 236A8905248E5A01 Date: Wed, 01 Mar 2009 12:00:00 GMT Location: /colorpictures Content-Length: 0 Connection: close Server: AmazonS3