Interface CfnBucket.ILoggingConfigurationProperty
Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket.
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.AWS.S3.dll
Syntax (csharp)
public interface ILoggingConfigurationProperty
Syntax (vb)
Public Interface 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 loggingConfigurationProperty = new LoggingConfigurationProperty {
DestinationBucketName = "destinationBucketName",
LogFilePrefix = "logFilePrefix"
};
Synopsis
Properties
DestinationBucketName | The name of the bucket where Amazon S3 should store server access log files. |
LogFilePrefix | A prefix for all log object keys. |
Properties
DestinationBucketName
The name of the bucket where Amazon S3 should store server access log files.
virtual string DestinationBucketName { get; }
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.
virtual string LogFilePrefix { get; }
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.