You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::S3::BucketRequestPayment

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(bucket_name, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(bucket_name, options = {}) ⇒ Object

    Parameters:

    • bucket_name (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :bucket_name (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#bucket_nameString (readonly)

Returns:

  • (String)

#payerString (readonly)

Specifies who pays for the download and request fees.

Possible values:

  • Requester
  • BucketOwner

Returns:

  • (String)

    Specifies who pays for the download and request fees.

Instance Method Details

#bucketBucket

Returns:

#put(options = {}) ⇒ Struct

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:

Examples:

Request syntax example with placeholder values


bucketrequestpayment.put({
  content_md5: "ContentMD5",
  request_payment_configuration: { # required
    payer: "Requester", # required, accepts Requester, BucketOwner
  },
  expected_bucket_owner: "AccountId",
  use_accelerate_endpoint: false,
})

Options Hash (options):

  • :content_md5 (String)

    >The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

    For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.

  • :request_payment_configuration (required, Types::RequestPaymentConfiguration)

    Container for Payer.

  • :expected_bucket_owner (String)

    The account id of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

  • :use_accelerate_endpoint (Boolean)

    When true, the "https://BUCKETNAME.s3-accelerate.amazonaws.com" endpoint will be used.

Returns:

  • (Struct)

    Returns an empty response.

See Also: