|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.s3.model.SetBucketVersioningConfigurationRequest
public class SetBucketVersioningConfigurationRequest
Options for setting the versioning configuration for a bucket.
A bucket's versioning configuration can be in one of three possible states:
BucketVersioningConfiguration.OFF
BucketVersioningConfiguration.ENABLED
BucketVersioningConfiguration.SUSPENDED
By default, new buckets always start off in the
off
state. Once versioning is
enabled for a bucket the status can never be reverted to
off
.
Objects created before versioning was enabled or when versioning is suspended
will be given the default/null version ID (see
Constants.NULL_VERSION_ID
). Note that the
Constants.NULL_VERSION_ID
is a valid version ID and is not the same
as not having a version ID.
The versioning configuration of a bucket has different implications for each operation performed on that bucket or for objects within that bucket. For instance, when versioning is enabled, a PutObject operation creates a unique object version-id for the object being uploaded. The PutObject API guarantees that, if versioning is enabled for a bucket at the time of the request, the new object can only be permanently deleted using the DeleteVersion operation. It can never be overwritten. Additionally, PutObject guarantees that, if versioning is enabled for a bucket the request, no other object will be overwritten by that request. Refer to the documentation sections for each API for information on how versioning status affects the semantics of that particular API.
S3 is eventually consistent. It may take time for the versioning status of a bucket to be propagated throughout the system.
Constructor Summary | |
---|---|
SetBucketVersioningConfigurationRequest(String bucketName,
BucketVersioningConfiguration configuration)
Constructs a new request to set the bucket versioning configuration of the specified bucket. |
|
SetBucketVersioningConfigurationRequest(String bucketName,
BucketVersioningConfiguration configuration,
MultiFactorAuthentication mfa)
Constructs a new request to set the bucket versioning configuration of the specified bucket, including the specified Multi-Factor Authentication (MFA) information, which is required when changing the state of the MFA Delete option. |
Method Summary | |
---|---|
String |
getBucketName()
Returns the name of the bucket whose versioning configuration is being set. |
MultiFactorAuthentication |
getMfa()
Returns the optional Multi-Factor Authentication information included with this request. |
BucketVersioningConfiguration |
getVersioningConfiguration()
Returns the new versioning configuration for the specified bucket. |
void |
setBucketName(String bucketName)
Sets the name of the bucket whose versioning configuration is being set. |
void |
setMfa(MultiFactorAuthentication mfa)
Sets the optional Multi-Factor Authentication information to include with this request. |
void |
setVersioningConfiguration(BucketVersioningConfiguration versioningConfiguration)
Sets the new versioning configuration for the specified bucket. |
SetBucketVersioningConfigurationRequest |
withBucketName(String bucketName)
Sets the name of the bucket whose versioning configuration is being set, and returns this object so that additional method calls may be chained together. |
SetBucketVersioningConfigurationRequest |
withMfa(MultiFactorAuthentication mfa)
Sets the optional Multi-Factor Authentication information to include with this request, and returns this object so that additional method calls may be chained together. |
SetBucketVersioningConfigurationRequest |
withVersioningConfiguration(BucketVersioningConfiguration versioningConfiguration)
Sets the new versioning configuration for the specified bucket, and returns this object so that additional method calls may be chained together. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SetBucketVersioningConfigurationRequest(String bucketName, BucketVersioningConfiguration configuration)
bucketName
- The name of the bucket whose versioning configuration is being
set.configuration
- The new versioning configuration for the specified bucket.public SetBucketVersioningConfigurationRequest(String bucketName, BucketVersioningConfiguration configuration, MultiFactorAuthentication mfa)
bucketName
- The name of the bucket whose versioning configuration is being
set.configuration
- The new versioning configuration for the specified bucket.mfa
- The Multi-Factor Authentication information to include in this
request.Method Detail |
---|
public String getBucketName()
public void setBucketName(String bucketName)
bucketName
- The name of the bucket whose versioning configuration is being
set.public SetBucketVersioningConfigurationRequest withBucketName(String bucketName)
bucketName
- The name of the bucket whose versioning configuration is being
set.
public BucketVersioningConfiguration getVersioningConfiguration()
public void setVersioningConfiguration(BucketVersioningConfiguration versioningConfiguration)
versioningConfiguration
- The new versioning configuration for the specified bucket.public SetBucketVersioningConfigurationRequest withVersioningConfiguration(BucketVersioningConfiguration versioningConfiguration)
versioningConfiguration
- The new versioning configuration for the specified bucket.
public MultiFactorAuthentication getMfa()
Multi-Factor Authentication is required when enabling or disabling MFA Delete functionality for a bucket.
See BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)
for more information on MFADelete.
public void setMfa(MultiFactorAuthentication mfa)
Multi-Factor Authentication is required when enabling or disabling MFA delete functionality for a bucket.
See BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)
for more information on MFADelete.
mfa
- The optional Multi-Factor Authentication information to
include with this request.public SetBucketVersioningConfigurationRequest withMfa(MultiFactorAuthentication mfa)
Multi-Factor Authentication is required when enabling or disabling MFA delete functionality for a bucket.
See BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)
for more information on MFADelete.
mfa
- The optional Multi-Factor Authentication information to
include with this request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |