public static interface CfnBucket.LoggingConfigurationProperty
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 haves3:PutObject
ands3:PutObjectAcl
in your IAM permissions.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.s3.*; LoggingConfigurationProperty loggingConfigurationProperty = LoggingConfigurationProperty.builder() .destinationBucketName("destinationBucketName") .logFilePrefix("logFilePrefix") .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnBucket.LoggingConfigurationProperty.Builder
A builder for
CfnBucket.LoggingConfigurationProperty |
static class |
CfnBucket.LoggingConfigurationProperty.Jsii$Proxy
An implementation for
CfnBucket.LoggingConfigurationProperty |
Modifier and Type | Method and Description |
---|---|
static CfnBucket.LoggingConfigurationProperty.Builder |
builder() |
default java.lang.String |
getDestinationBucketName()
The name of the bucket where Amazon S3 should store server access log files.
|
default java.lang.String |
getLogFilePrefix()
A prefix for all log object keys.
|
default java.lang.String getDestinationBucketName()
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.
default java.lang.String getLogFilePrefix()
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.
static CfnBucket.LoggingConfigurationProperty.Builder builder()