Class CfnBucket.LoggingConfigurationProperty
Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LoggingConfigurationProperty : Object, CfnBucket.ILoggingConfigurationProperty
Syntax (vb)
Public Class LoggingConfigurationProperty
Inherits Object
Implements CfnBucket.ILoggingConfigurationProperty
Remarks
For examples and more information, see PUT Bucket logging in the Amazon S3 API Reference .
To successfully complete the AWS::S3::Bucket LoggingConfiguration
request, you must have s3:PutObject
and s3:PutObjectAcl
in your IAM permissions.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
var simplePrefix;
var loggingConfigurationProperty = new LoggingConfigurationProperty {
DestinationBucketName = "destinationBucketName",
LogFilePrefix = "logFilePrefix",
TargetObjectKeyFormat = new TargetObjectKeyFormatProperty {
PartitionedPrefix = new PartitionedPrefixProperty {
PartitionDateSource = "partitionDateSource"
},
SimplePrefix = simplePrefix
}
};
Synopsis
Constructors
LoggingConfigurationProperty() |
Properties
DestinationBucketName | The name of the bucket where Amazon S3 should store server access log files. |
LogFilePrefix | A prefix for all log object keys. |
TargetObjectKeyFormat | Amazon S3 key format for log objects. |
Constructors
LoggingConfigurationProperty()
public LoggingConfigurationProperty()
Properties
DestinationBucketName
The name of the bucket where Amazon S3 should store server access log files.
public string DestinationBucketName { get; set; }
Property Value
System.String
Remarks
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.
LogFilePrefix
A prefix for all log object keys.
public string LogFilePrefix { get; set; }
Property Value
System.String
Remarks
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.
TargetObjectKeyFormat
Amazon S3 key format for log objects.
public object TargetObjectKeyFormat { get; set; }
Property Value
System.Object
Remarks
Only one format, either PartitionedPrefix or SimplePrefix, is allowed.