@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class BucketAccessLogConfig extends Object implements Serializable, Cloneable, StructuredPojo
Describes the access log configuration for a bucket in the Amazon Lightsail object storage service.
For more information about bucket access logs, see Logging bucket requests using access logging in Amazon Lightsail in the Amazon Lightsail Developer Guide.
Constructor and Description |
---|
BucketAccessLogConfig() |
Modifier and Type | Method and Description |
---|---|
BucketAccessLogConfig |
clone() |
boolean |
equals(Object obj) |
String |
getDestination()
The name of the bucket where the access logs are saved.
|
Boolean |
getEnabled()
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
|
String |
getPrefix()
The optional object prefix for the bucket access log.
|
int |
hashCode() |
Boolean |
isEnabled()
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setDestination(String destination)
The name of the bucket where the access logs are saved.
|
void |
setEnabled(Boolean enabled)
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
|
void |
setPrefix(String prefix)
The optional object prefix for the bucket access log.
|
String |
toString()
Returns a string representation of this object.
|
BucketAccessLogConfig |
withDestination(String destination)
The name of the bucket where the access logs are saved.
|
BucketAccessLogConfig |
withEnabled(Boolean enabled)
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
|
BucketAccessLogConfig |
withPrefix(String prefix)
The optional object prefix for the bucket access log.
|
public void setEnabled(Boolean enabled)
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
enabled
- A Boolean value that indicates whether bucket access logging is enabled for the bucket.public Boolean getEnabled()
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
public BucketAccessLogConfig withEnabled(Boolean enabled)
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
enabled
- A Boolean value that indicates whether bucket access logging is enabled for the bucket.public Boolean isEnabled()
A Boolean value that indicates whether bucket access logging is enabled for the bucket.
public void setDestination(String destination)
The name of the bucket where the access logs are saved. The destination can be a Lightsail bucket in the same account, and in the same Amazon Web Services Region as the source bucket.
This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
destination
- The name of the bucket where the access logs are saved. The destination can be a Lightsail bucket in the
same account, and in the same Amazon Web Services Region as the source bucket. This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
public String getDestination()
The name of the bucket where the access logs are saved. The destination can be a Lightsail bucket in the same account, and in the same Amazon Web Services Region as the source bucket.
This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
public BucketAccessLogConfig withDestination(String destination)
The name of the bucket where the access logs are saved. The destination can be a Lightsail bucket in the same account, and in the same Amazon Web Services Region as the source bucket.
This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
destination
- The name of the bucket where the access logs are saved. The destination can be a Lightsail bucket in the
same account, and in the same Amazon Web Services Region as the source bucket. This parameter is required when enabling the access log for a bucket, and should be omitted when disabling the access log.
public void setPrefix(String prefix)
The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the destination
bucket. For example, if you specify a logs/
prefix, then each log object will begin with the
logs/
prefix in its key (for example, logs/2021-11-01-21-32-16-E568B2907131C0C0
).
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
prefix
- The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the
destination bucket. For example, if you specify a logs/
prefix, then each log object will
begin with the logs/
prefix in its key (for example,
logs/2021-11-01-21-32-16-E568B2907131C0C0
).
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
public String getPrefix()
The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the destination
bucket. For example, if you specify a logs/
prefix, then each log object will begin with the
logs/
prefix in its key (for example, logs/2021-11-01-21-32-16-E568B2907131C0C0
).
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
The prefix is an optional addition to the object key that organizes your access log files in the
destination bucket. For example, if you specify a logs/
prefix, then each log object will
begin with the logs/
prefix in its key (for example,
logs/2021-11-01-21-32-16-E568B2907131C0C0
).
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
public BucketAccessLogConfig withPrefix(String prefix)
The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the destination
bucket. For example, if you specify a logs/
prefix, then each log object will begin with the
logs/
prefix in its key (for example, logs/2021-11-01-21-32-16-E568B2907131C0C0
).
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
prefix
- The optional object prefix for the bucket access log.
The prefix is an optional addition to the object key that organizes your access log files in the
destination bucket. For example, if you specify a logs/
prefix, then each log object will
begin with the logs/
prefix in its key (for example,
logs/2021-11-01-21-32-16-E568B2907131C0C0
).
This parameter can be optionally specified when enabling the access log for a bucket, and should be omitted when disabling the access log.
public String toString()
toString
in class Object
Object.toString()
public BucketAccessLogConfig clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.