public class DeleteBucketRequest extends AmazonWebServiceRequest implements Serializable, S3AccelerateUnsupported, ExpectedBucketOwnerRequest
Provides options for deleting a specified bucket. Amazon S3 buckets can only be deleted when empty.
Note: When attempting to delete a bucket that does not exist, Amazon S3 returns a success message, not an error message.
NOOP
Constructor and Description |
---|
DeleteBucketRequest(String bucketName)
Constructs a new
DeleteBucketRequest ,
ready to be executed to delete the
specified bucket. |
Modifier and Type | Method and Description |
---|---|
String |
getBucketName()
Gets the name of the Amazon S3 bucket to delete.
|
String |
getExpectedBucketOwner()
Returns he account id of the expected bucket owner.
|
void |
setBucketName(String bucketName)
Sets the name of the Amazon S3 bucket to delete.
|
void |
setExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
DeleteBucketRequest |
withExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
addHandlerContext, clone, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public DeleteBucketRequest(String bucketName)
DeleteBucketRequest
,
ready to be executed to delete the
specified bucket.bucketName
- The name of the Amazon S3 bucket to delete.public String getExpectedBucketOwner()
ExpectedBucketOwnerRequest
403 (Access Denied)
error.getExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public DeleteBucketRequest withExpectedBucketOwner(String expectedBucketOwner)
ExpectedBucketOwnerRequest
403 (Access Denied)
error.withExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public void setExpectedBucketOwner(String expectedBucketOwner)
ExpectedBucketOwnerRequest
403 (Access Denied)
error.setExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public void setBucketName(String bucketName)
bucketName
- The name of the Amazon S3 bucket to delete.getBucketName()
public String getBucketName()
setBucketName(String)