Class: AWSCDK::S3::CfnBucket::LoggingConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::LoggingConfigurationProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket.
For examples and more information, see PUT Bucket logging in the Amazon S3 API Reference .
To successfully complete the
AWS::S3::Bucket LoggingConfigurationrequest, you must haves3:PutObjectands3:PutObjectAclin your IAM permissions.
Instance Attribute Summary collapse
-
#destination_bucket_name ⇒ String?
readonly
The name of the bucket where Amazon S3 should store server access log files.
-
#log_file_prefix ⇒ String?
readonly
A prefix for all log object keys.
-
#target_object_key_format ⇒ AWSCDK::IResolvable, ...
readonly
Amazon S3 key format for log objects.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(destination_bucket_name: nil, log_file_prefix: nil, target_object_key_format: nil) ⇒ LoggingConfigurationProperty
constructor
A new instance of LoggingConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(destination_bucket_name: nil, log_file_prefix: nil, target_object_key_format: nil) ⇒ LoggingConfigurationProperty
Returns a new instance of LoggingConfigurationProperty.
2196 2197 2198 2199 2200 2201 2202 2203 |
# File 's3/cfn_bucket.rb', line 2196 def initialize(destination_bucket_name: nil, log_file_prefix: nil, target_object_key_format: nil) @destination_bucket_name = destination_bucket_name Jsii::Type.check_type(@destination_bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationBucketName") unless @destination_bucket_name.nil? @log_file_prefix = log_file_prefix Jsii::Type.check_type(@log_file_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logFilePrefix") unless @log_file_prefix.nil? @target_object_key_format = target_object_key_format.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::TargetObjectKeyFormatProperty.new(**target_object_key_format.transform_keys(&:to_sym)) : target_object_key_format Jsii::Type.check_type(@target_object_key_format, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuVGFyZ2V0T2JqZWN0S2V5Rm9ybWF0UHJvcGVydHkifV19fQ==")), "targetObjectKeyFormat") unless @target_object_key_format.nil? end |
Instance Attribute Details
#destination_bucket_name ⇒ String? (readonly)
The name of the bucket where Amazon S3 should store server access log files.
You can store log files in any bucket that you own. By default, logs are stored in the bucket where the LoggingConfiguration property is defined.
2211 2212 2213 |
# File 's3/cfn_bucket.rb', line 2211 def destination_bucket_name @destination_bucket_name end |
#log_file_prefix ⇒ String? (readonly)
A prefix for all log object keys.
If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.
2218 2219 2220 |
# File 's3/cfn_bucket.rb', line 2218 def log_file_prefix @log_file_prefix end |
#target_object_key_format ⇒ AWSCDK::IResolvable, ... (readonly)
Amazon S3 key format for log objects.
Only one format, either PartitionedPrefix or SimplePrefix, is allowed.
2225 2226 2227 |
# File 's3/cfn_bucket.rb', line 2225 def target_object_key_format @target_object_key_format end |
Class Method Details
.jsii_properties ⇒ Object
2227 2228 2229 2230 2231 2232 2233 |
# File 's3/cfn_bucket.rb', line 2227 def self.jsii_properties { :destination_bucket_name => "destinationBucketName", :log_file_prefix => "logFilePrefix", :target_object_key_format => "targetObjectKeyFormat", } end |
Instance Method Details
#to_jsii ⇒ Object
2235 2236 2237 2238 2239 2240 2241 2242 2243 |
# File 's3/cfn_bucket.rb', line 2235 def to_jsii result = {} result.merge!({ "destinationBucketName" => @destination_bucket_name, "logFilePrefix" => @log_file_prefix, "targetObjectKeyFormat" => @target_object_key_format, }) result.compact end |