Home > Storage > PowerScale (Isilon) > Product Documentation > Protocols > Dell PowerScale: OneFS S3 API Guide > x-isi-force-delete extended header
By default, a bucket cannot be deleted if it is not empty. With the x-isi-force-delete extension, a bucket can be deleted from OneFS while preserving the data under the bucket. This option is effective if it is contained in a request. A value does not have to be assigned for this header, and an empty string is acceptable. The following is an example of adding the extended header through boto3.
import boto3
HOST=<ip/fqdn> # Your SmartConnect name or cluster IP goes here
USERNAME='1_local_user01_accid' # Your access ID
USERKEY='mWQbXkadl2CR_x2_WRj4tYu_d11j' # Your secret key
URL = 'http://{}:9020'.format(HOST)
s3 = boto3.resource('s3')
session = boto3.Session()
s3client = session.client(service_name='s3',aws_access_key_id=USERNAME,aws_secret_access_key=USERKEY,endpoint_url=URL,use_ssl=False,verify=False)
bucket_name='bucket01'
headers = {'x-isi-force-delete': ''}
# pass in custom headers before DeleteBucket call
add_headers = (lambda **kwargs: kwargs['params']['headers'].update(headers))
s3client.meta.events.register('before-call.s3.DeleteBucket', add_headers)
s3client.delete_bucket(Bucket=bkt_name)