Amazon.S3.AmazonS3Client.DeleteBucket C# (CSharp) Method

DeleteBucket() public method

Deletes the bucket. All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.
public DeleteBucket ( DeleteBucketRequest request ) : DeleteBucketResponse
request Amazon.S3.Model.DeleteBucketRequest Container for the necessary parameters to execute the DeleteBucket service method.
return DeleteBucketResponse
        public DeleteBucketResponse DeleteBucket(DeleteBucketRequest request)
        {
            var marshaller = new DeleteBucketRequestMarshaller();
            var unmarshaller = DeleteBucketResponseUnmarshaller.Instance;

            return Invoke<DeleteBucketRequest,DeleteBucketResponse>(request, marshaller, unmarshaller);
        }

Same methods

AmazonS3Client::DeleteBucket ( string bucketName ) : DeleteBucketResponse

Usage Example

 public static void DeleteBucket(string bucketName)
 {
     using (var client = new AmazonS3Client(Settings.AccessKey, Settings.Secret))
     {
         client.DeleteBucket(bucketName);
     }
 }
All Usage Examples Of Amazon.S3.AmazonS3Client::DeleteBucket
AmazonS3Client