Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.s3.model;
 

Contains options for setting the logging configuration for a bucket. The bucket logging configuration object controls whether or not server access logging is enabled for the specified bucket. If server access logging is enabled, this object provides options for specifying where the server access logs are delivered and the optional log file prefix.

In order to deliver server access logs, the destination bucket must have log delivery write permissions. Use the CannedAccessControlList.LogDeliveryWrite ACL to quickly add the correct permissions to the destination bucket. Alternatively, modify the bucket's existing ACL to grant the GroupGrantee.LogDelivery group grantee the Permission.Write permission.

Changes to the logging status for a bucket are visible in the configuration API immediately, but take time to actually affect the delivery of log files. For example, when enabling logging for a bucket, some requests made in the following hour might be logged while others might not. For another example, when changing the target bucket for logging from bucket 'A' to bucket 'B', some logs for the next hour might continue to be delivered to bucket 'A.' Others might be delivered to the new target bucket 'B.' In all cases, the new settings will eventually take effect without any further action from the user.

 
The name of the bucket whose logging configuration is being set.
 
     private String bucketName;
    
    
The new logging configuration for the specified bucket.
 
     private BucketLoggingConfiguration loggingConfiguration;

    
    
Constructs a new SetBucketLoggingConfigurationRequest to set the bucket logging configuration of the specified bucket.

Parameters:
bucketName The name of the bucket whose logging configuration is being set.
loggingConfiguration The new logging configuration for the specified bucket.
 
     public SetBucketLoggingConfigurationRequest(String bucketNameBucketLoggingConfiguration loggingConfiguration) {
         this. = bucketName;
         this. = loggingConfiguration;
     }

    
Gets the name of the bucket whose logging configuration is being set.

Returns:
The name of the bucket whose logging configuration is being set.
See also:
setBucketName(java.lang.String)
withLoggingConfiguration(com.amazonaws.services.s3.model.BucketLoggingConfiguration)
 
     public String getBucketName() {
         return ;
     }

    
Sets the name of the bucket whose logging configuration is being set.

Parameters:
bucketName The name of the bucket whose logging configuration is being set.
See also:
getBucketName()
withBucketName(java.lang.String)
 
    public void setBucketName(String bucketName) {
        this. = bucketName;
    }

    
Sets the name of the bucket whose logging configuration is being set and returns this object, enabling additional method calls to be chained together.

Parameters:
bucketName The name of the bucket whose logging configuration is being set.
Returns:
This SetBucketLoggingConfigurationRequest object, enabling additional method calls may to be chained together.
See also:
getBucketName()
setBucketName(java.lang.String)
        setBucketName(bucketName);
        return this;
    }

    
Gets the logging configuration for the specified bucket.

        return ;
    }

    
Sets the logging configuration for the specified bucket.

Parameters:
loggingConfiguration The logging configuration for the specified bucket.
See also:
getLoggingConfiguration()
withLoggingConfiguration(com.amazonaws.services.s3.model.BucketLoggingConfiguration)
    public void setLoggingConfiguration(BucketLoggingConfiguration loggingConfiguration) {
        this. = loggingConfiguration;
    }

    
Sets the logging configuration for the specified bucket and returns the updated object, enabling additional method calls to be chained together.

Parameters:
loggingConfiguration The logging configuration for the specified bucket.
Returns:
This SetBucketLoggingConfigurationRequest object, enabling additional method calls to be chained together.
See also:
getLoggingConfiguration()
setLoggingConfiguration(com.amazonaws.services.s3.model.BucketLoggingConfiguration)
        setLoggingConfiguration(loggingConfiguration);
        return this;
    }
New to GrepCode? Check out our FAQ X