Menu
Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

PUT Bucket requestPayment

Description

This implementation of the PUT operation uses the requestPayment subresource 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 Requester Pays Buckets.

Requests

Syntax

Copy
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 uses only request headers that are 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 Payer.

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."

Copy
PUT ?requestPayment HTTP/1.1 Host: colorpictures.s3.amazonaws.com Content-Length: 173 Date: Wed, 01 Mar 2006 12:00:00 GMT Authorization: authorization string <RequestPaymentConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Payer>Requester</Payer> </RequestPaymentConfiguration>

Sample Response

Copy
HTTP/1.1 200 OK x-amz-id-2: YgIPIfBiKa2bj0KMg95r/0zo3emzU4dzsD4rcKCHQUAdQkf3ShJTOOpXUueF6QKo x-amz-request-id: 236A8905248E5A01 Date: Wed, 01 Mar 2006 12:00:00 GMT Location: /colorpictures Content-Length: 0 Connection: close Server: AmazonS3

Related Resources