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

DeleteS3BucketWithObjects() 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 DeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions ) : void
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 void
        public static void DeleteS3BucketWithObjects(IAmazonS3 s3Client, string bucketName, S3DeleteBucketWithObjectsOptions deleteOptions)
        {
            DeleteS3BucketWithObjectsAsync(s3Client, bucketName, deleteOptions, CancellationToken.None).Wait();
        }
    }

Same methods

AmazonS3Util::DeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName ) : void