|
||||||||||
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.DeleteVersionRequest
public class DeleteVersionRequest
Options for deleting a specific version of an object in the specified bucket. Once deleted, there is no method to restore or undelete an object version. This is the only way to permanently delete object versions that are protected by versioning.
Since deleting an object version is permanent and irreversible, it is a privileged operation that only the owner of the bucket containing the version may perform.
You can only delete a version of an object if you've enabled versioning for
your bucket. See
AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
for more information about enabling versioning for a bucket.
Note: If you delete an object that does not exist, Amazon S3 will return a success (not an error message).
Constructor Summary | |
---|---|
DeleteVersionRequest(String bucketName,
String key,
String versionId)
Constructs a new DeleteVersionRequest object, ready to be executed to delete the version identified by the specified version ID, in the specified bucket and key. |
|
DeleteVersionRequest(String bucketName,
String key,
String versionId,
MultiFactorAuthentication mfa)
Constructs a new DeleteVersionRequest object, ready to be executed to delete the version identified by the specified version ID, in the specified bucket and key, with the specified Multi-Factor Authentication (MFA) information. |
Method Summary | |
---|---|
String |
getBucketName()
Returns the name of the Amazon S3 bucket containing the version to delete. |
String |
getKey()
Returns the key of the version to delete. |
MultiFactorAuthentication |
getMfa()
Returns the optional Multi-Factor Authentication information included with this request. |
String |
getVersionId()
Returns the version ID uniquely identifying which version of the object to delete. |
void |
setBucketName(String bucketName)
Sets the name of the Amazon S3 bucket containing the version to delete. |
void |
setKey(String key)
Sets the key of the version to delete. |
void |
setMfa(MultiFactorAuthentication mfa)
Sets the optional Multi-Factor Authentication information to include with this request. |
void |
setVersionId(String versionId)
Sets the version version ID uniquely identifying which version of the object to delete. |
DeleteVersionRequest |
withBucketName(String bucketName)
Sets the name of the Amazon S3 bucket containing the version to delete, and returns this object so that additional method calls may be chained together. |
DeleteVersionRequest |
withKey(String key)
Sets the key of the version to delete, and returns this object so that additional method calls may be chained together. |
DeleteVersionRequest |
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. |
DeleteVersionRequest |
withVersionId(String versionId)
Sets the version ID uniquely identifying which version of the object to delete, 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 DeleteVersionRequest(String bucketName, String key, String versionId)
bucketName
- The name of the bucket containing the version to delete.key
- The key of the object version to delete.versionId
- The version ID uniquely identifying the version to delete.public DeleteVersionRequest(String bucketName, String key, String versionId, MultiFactorAuthentication mfa)
BucketVersioningConfiguration
for more details on MFA
Delete.
bucketName
- The name of the bucket containing the version to delete.key
- The key of the object version to delete.versionId
- The version ID uniquely identifying the version to delete.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 Amazon S3 bucket containing the version to
delete.public DeleteVersionRequest withBucketName(String bucketName)
bucketName
- The name of the Amazon S3 bucket containing the version to
delete.
public String getKey()
public void setKey(String key)
key
- The key of the version to delete.public DeleteVersionRequest withKey(String key)
key
- The key of the version to delete.
public String getVersionId()
public void setVersionId(String versionId)
versionId
- The version ID uniquely identifying which version of
the object to delete.public DeleteVersionRequest withVersionId(String versionId)
versionId
- The version ID uniquely identifying which version of the
object to delete.
public MultiFactorAuthentication getMfa()
Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration.
See BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)
for more information on MFADelete.
public void setMfa(MultiFactorAuthentication mfa)
Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration.
See BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)
for more information on MFADelete.
mfa
- The optional Multi-Factor Authentication information to
include with this request.public DeleteVersionRequest withMfa(MultiFactorAuthentication mfa)
Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration
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 |