interface LoggingConfigurationProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.S3.CfnBucket.LoggingConfigurationProperty |
![]() | software.amazon.awscdk.services.s3.CfnBucket.LoggingConfigurationProperty |
![]() | aws_cdk.aws_s3.CfnBucket.LoggingConfigurationProperty |
![]() | @aws-cdk/aws-s3 » CfnBucket » LoggingConfigurationProperty |
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 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 * as s3 from '@aws-cdk/aws-s3';
const loggingConfigurationProperty: s3.CfnBucket.LoggingConfigurationProperty = {
destinationBucketName: 'destinationBucketName',
logFilePrefix: 'logFilePrefix',
};
Properties
Name | Type | Description |
---|---|---|
destination | string | The name of the bucket where Amazon S3 should store server access log files. |
log | string | A prefix for all log object keys. |
destinationBucketName?
Type:
string
(optional)
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.
logFilePrefix?
Type:
string
(optional)
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.