Class SetBucketLoggingConfigurationRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.s3.model.SetBucketLoggingConfigurationRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
public class SetBucketLoggingConfigurationRequest extends AmazonWebServiceRequest implements Serializable
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 theGroupGrantee.LogDelivery
group grantee thePermission.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.
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description SetBucketLoggingConfigurationRequest(String bucketName, BucketLoggingConfiguration loggingConfiguration)
Constructs a newSetBucketLoggingConfigurationRequest
to set the bucket logging configuration of the specified bucket.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBucketName()
Gets the name of the bucket whose logging configuration is being set.BucketLoggingConfiguration
getLoggingConfiguration()
Gets the logging configuration for the specified bucket.void
setBucketName(String bucketName)
Sets the name of the bucket whose logging configuration is being set.void
setLoggingConfiguration(BucketLoggingConfiguration loggingConfiguration)
Sets the logging configuration for the specified bucket.SetBucketLoggingConfigurationRequest
withBucketName(String 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.SetBucketLoggingConfigurationRequest
withLoggingConfiguration(BucketLoggingConfiguration loggingConfiguration)
Sets the logging configuration for the specified bucket and returns the updated object, enabling additional method calls to be chained together.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Constructor Detail
-
SetBucketLoggingConfigurationRequest
public SetBucketLoggingConfigurationRequest(String bucketName, BucketLoggingConfiguration loggingConfiguration)
Constructs a newSetBucketLoggingConfigurationRequest
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.
-
-
Method Detail
-
getBucketName
public String getBucketName()
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(String)
,withLoggingConfiguration(BucketLoggingConfiguration)
-
setBucketName
public void setBucketName(String bucketName)
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(String)
-
withBucketName
public SetBucketLoggingConfigurationRequest withBucketName(String 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(String)
-
getLoggingConfiguration
public BucketLoggingConfiguration getLoggingConfiguration()
Gets the logging configuration for the specified bucket.- Returns:
- The logging configuration for the specified bucket.
- See Also:
setLoggingConfiguration(BucketLoggingConfiguration)
,withLoggingConfiguration(BucketLoggingConfiguration)
-
setLoggingConfiguration
public void setLoggingConfiguration(BucketLoggingConfiguration loggingConfiguration)
Sets the logging configuration for the specified bucket.- Parameters:
loggingConfiguration
- The logging configuration for the specified bucket.- See Also:
getLoggingConfiguration()
,withLoggingConfiguration(BucketLoggingConfiguration)
-
withLoggingConfiguration
public SetBucketLoggingConfigurationRequest withLoggingConfiguration(BucketLoggingConfiguration 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(BucketLoggingConfiguration)
-
-