Amazon.S3.Util.AmazonS3Util.DeleteS3BucketWithObjectsAsync C# (CSharp) Method

DeleteS3BucketWithObjectsAsync() public static method

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions ) : Task
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
deleteOptions Amazon.S3.Util.S3DeleteBucketWithObjectsOptions Options to control the behavior of the delete operation.
return Task
        public static  Task DeleteS3BucketWithObjectsAsync(IAmazonS3 s3Client, string bucketName, S3DeleteBucketWithObjectsOptions deleteOptions)
        {
            var cancelSource = new CancellationTokenSource();
            return  DeleteS3BucketWithObjectsAsync(s3Client, bucketName, deleteOptions, cancelSource.Token);
        }

Same methods

AmazonS3Util::DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName ) : Task
AmazonS3Util::DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, CancellationToken token ) : Task
AmazonS3Util::DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, Action updateCallback, CancellationToken token ) : Task
AmazonS3Util::DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, CancellationToken token ) : Task