Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.amazonaws.services.s3.model
Class BucketLoggingConfiguration

    java.lang.Object
      com.amazonaws.services.s3.model.BucketLoggingConfiguration

    public class BucketLoggingConfiguration

extends Object

Represents bucket logging configuration used to control bucket-based server access logging in Amazon S3.

For logging to be enabled for a bucket both the destinationBucketName and logFilePrefix must be non-null, and the named bucket must exist. When both variables are non-null, this object represents an enabled logging configuration (as indicated by `isLoggingEnabled()`).

If either the targetBucketName or logfilePrefix are null, this object will represent a disabled logging configuration (as indicated by `isLoggingEnabled()`).

Server access logging can be enabled or disabled with `AmazonS3Client.setBucketLoggingConfiguration(SetBucketLoggingConfigurationRequest)` and the current status of server access logging for a bucket can be retrieved through `AmazonS3Client.getBucketLoggingConfiguration(String)`

See Also:
  `AmazonS3.getBucketLoggingConfiguration(String)`, `AmazonS3.setBucketLoggingConfiguration(SetBucketLoggingConfigurationRequest)`

Constructor Summary
`BucketLoggingConfiguration()` Creates a new bucket logging configuration, which by default is disabled.
`BucketLoggingConfiguration(String destinationBucketName, String logFilePrefix)` Creates a new bucket logging configuration which enables server access logs to be collected and stored in the specified destination bucket with the specified log file prefix.

Method Summary
`String` | `getDestinationBucketName()`
`String` | `getLogFilePrefix()`
`boolean` | `isLoggingEnabled()`
`void` | `setDestinationBucketName(String destinationBucketName)`
`void` | `setLogFilePrefix(String logFilePrefix)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BucketLoggingConfiguration

    public BucketLoggingConfiguration()

  Creates a new bucket logging configuration, which by default is disabled.

  Passing this new object directly to `AmazonS3.setBucketLoggingConfiguration(SetBucketLoggingConfigurationRequest)` will turn off bucket logging for the specified bucket.

### BucketLoggingConfiguration

    public BucketLoggingConfiguration(String destinationBucketName,
                                      String logFilePrefix)

  Creates a new bucket logging configuration which enables server access logs to be collected and stored in the specified destination bucket with the specified log file prefix.

  Parameters:
    `destinationBucketName` - The name of the bucket to which to delivery server access logs from the target bucket. This may be the same bucket for which logging is being configured.
    `logFilePrefix` - The optional prefix to append to server access logs when they are written to the destination bucket.

Method Detail

### isLoggingEnabled

    public boolean isLoggingEnabled()

### getLogFilePrefix

    public String getLogFilePrefix()

### setLogFilePrefix

    public void setLogFilePrefix(String logFilePrefix)

### getDestinationBucketName

    public String getDestinationBucketName()

### setDestinationBucketName

    public void setDestinationBucketName(String destinationBucketName)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.