com.netease.cloud.services.nos.model
public class DeleteObjectRequest extends WebServiceRequest
Provides options for deleting a specified object in a specified bucket. Once deleted, the object can only be restored if versioning was enabled when the object was deleted.
Note: If deleting an object that does not exist, returns a success message, not an error message.
logID, logSeq
Constructor and Description |
---|
DeleteObjectRequest(String bucketName,
String key)
the version id of the object to delete
|
Modifier and Type | Method and Description |
---|---|
String |
getBucketName()
Gets the name of the bucket containing the object to delete.
|
String |
getKey()
Gets the key of the object to delete.
|
void |
setBucketName(String bucketName)
Sets the name of the bucket containing the object to delete.
|
void |
setKey(String key)
Sets the key of the object to delete.
|
DeleteObjectRequest |
withBucketName(String bucketName)
Sets the name of the bucket containing the object to delete and returns
this object, enabling additional method calls to be chained together.
|
DeleteObjectRequest |
withKey(String key)
Sets the key of the object to delete and returns this object, enabling
additional method calls to be chained together.
|
addSpecialHeader, copyPrivateRequestParameters, getAndIncrementLogSeq, getLogID, getLogSeq, getRequestClientOptions, getRequestCredentials, getToken, needSetLogInfo, setLogID, setLogSeq, setRequestCredentials, setToken
public String getBucketName()
setBucketName(String)
public void setBucketName(String bucketName)
bucketName
- The name of the bucket containing the object to delete.getBucketName()
public DeleteObjectRequest withBucketName(String bucketName)
bucketName
- The name of the bucket containing the object to delete.DeleteObjectRequest
object, enabling
additional method calls to be chained together.public String getKey()
setKey(String)
public void setKey(String key)
key
- The key of the object to delete.getKey()
public DeleteObjectRequest withKey(String key)
key
- The key of the object to delete.DeleteObjectRequest
object, enabling
additional method calls to chained together.Copyright © 2017. All Rights Reserved.