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

Class: Aws::S3::BucketLogging

Resources::Resource show all
Defined in:

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


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


    • 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)


  • (String)

#logging_enabledTypes::LoggingEnabled (readonly)

Instance Method Details



#put(options = {}) ⇒ Struct

Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. To set the logging status of a bucket, you must be the bucket owner.


Request syntax example with placeholder values

  bucket_logging_status: { # required
    logging_enabled: {
      target_bucket: "TargetBucket",
      target_grants: [
          grantee: {
            display_name: "DisplayName",
            email_address: "EmailAddress",
            id: "ID",
            type: "CanonicalUser", # required, accepts CanonicalUser, AmazonCustomerByEmail, Group
            uri: "URI",
          permission: "FULL_CONTROL", # accepts FULL_CONTROL, READ, WRITE
      target_prefix: "TargetPrefix",
  content_md5: "ContentMD5",
  use_accelerate_endpoint: false,

Options Hash (options):


  • (Struct)

    Returns an empty response.

See Also: