Class: Aliyun::OSS::BucketLogging

Inherits:
Common::Struct::Base show all
Defined in:
lib/aliyun/oss/struct.rb

Overview

Bucket Logging setting. See: OSS Bucket logging Attributes:

  • enable [Boolean] whether to enable bucket logging

  • target_bucket [String] the target bucket to store access logs

  • target_prefix [String] the target object prefix to store access logs

Examples:

Enable bucket logging

bucket.logging = BucketLogging.new(
  :enable => true, :target_bucket => 'log_bucket', :target_prefix => 'my-log')

Disable bucket logging

bucket.logging = BucketLogging.new(:enable => false)

Instance Method Summary collapse

Methods inherited from Common::Struct::Base

#initialize, #to_s

Methods included from Common::Struct::Base::AttrHelper

#attrs

Constructor Details

This class inherits a constructor from Aliyun::Common::Struct::Base

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/aliyun/oss/struct.rb', line 72

def enabled?
  enable == true
end