Class: AWS::S3::Logging::Status

Inherits:
Object
  • Object
show all
Includes:
SelectiveAttributeProxy
Defined in:
lib/aws/s3/logging.rb

Overview

Logging status captures information about the calling bucket’s logging settings. If logging is enabled for the bucket the status object will indicate what bucket the logs are written to via the target_bucket method as well as the logging key prefix with via target_prefix.

See the documentation for Logging::Management::ClassMethods for more information on how to get the logging status of a bucket.

Defined Under Namespace

Classes: Builder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Status

:nodoc:



54
55
56
57
58
# File 'lib/aws/s3/logging.rb', line 54

def initialize(attributes = {}) #:nodoc:
  attributes  = {'target_bucket' => nil, 'target_prefix' => nil}.merge(attributes)
  @enabled    = attributes.has_key?('logging_enabled')
  @attributes = attributes.delete('logging_enabled') || attributes
end

Instance Attribute Details

#enabledObject (readonly) Also known as: logging_enabled?

Returns the value of attribute enabled.



51
52
53
# File 'lib/aws/s3/logging.rb', line 51

def enabled
  @enabled
end

Instance Method Details

#to_xmlObject

:nodoc:



60
61
62
# File 'lib/aws/s3/logging.rb', line 60

def to_xml #:nodoc:
  Builder.new(self).to_s
end