存储空间(Bucket)是存储对象(Object)的容器。对象都隶属于存储空间。本文介绍如何删除存储空间。

说明

以下代码用于删除存储空间examplebucket。

OSSDeleteBucketRequest * delete = [OSSDeleteBucketRequest new];
delete.bucketName = @"examplebucket";
OSSTask * deleteTask = [client deleteBucket:delete];
[deleteTask continueWithBlock:^id(OSSTask *task) {
    if (!task.error) {
        NSLog(@"delete bucket success!");
    } else {
        NSLog(@"delete bucket failed, error: %@", task.error);
    }
    return nil;
}];

关于删除存储空间的更多信息,请参见DeleteBucket