Class CfnBucket.LoggingConfigurationProperty
Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnBucket.LoggingConfigurationProperty : CfnBucket.ILoggingConfigurationProperty
Syntax (vb)
Public Class CfnBucket.LoggingConfigurationProperty Implements CfnBucket.ILoggingConfigurationProperty
Remarks
For examples and more information, see PUT Bucket logging in the Amazon S3 API Reference .
To successfully complete the <code>AWS::S3::Bucket LoggingConfiguration</code> request, you must have <code>s3:PutObject</code> and <code>s3:PutObjectAcl</code> 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() | Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. |
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()
Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket.
public LoggingConfigurationProperty()
Remarks
For examples and more information, see PUT Bucket logging in the Amazon S3 API Reference .
To successfully complete the <code>AWS::S3::Bucket LoggingConfiguration</code> request, you must have <code>s3:PutObject</code> and <code>s3:PutObjectAcl</code> 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
}
};
Properties
DestinationBucketName
The name of the bucket where Amazon S3 should store server access log files.
public string? DestinationBucketName { get; set; }
Property Value
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
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
Remarks
Only one format, either PartitionedPrefix or SimplePrefix, is allowed.
Type union: either IResolvable or CfnBucket.ITargetObjectKeyFormatProperty